class Service extends AbstractService

Network v2 service for OpenStack.

Traits

Methods

createNetwork (array $options) : Network

Create a new network resource.

createNetworks (array $options) : array

Create a new network resources.

getNetwork (string $id) : Network

Retrieve a network object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Network::retrieve}.

listNetworks (array $options = array()) : Generator

List networks.

createSubnet (array $options) : Subnet

Create a new subnet resource.

createSubnets (array $options) : []Subnet

Create a new subnet resources.

getSubnet (string $id) : Subnet

Retrieve a subnet object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Subnet::retrieve}.

listSubnets (array $options = array()) : Generator

List subnets.

createPort (array $options) : Port

Create a new port resource.

createPorts (array $options) : []Port

Create new port resources.

getPort (string $id) : Port

Retrieve a subnet object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Port::retrieve}.

listPorts (array $options = array()) : Generator

List ports.

Lists quotas for projects with non-default quota values.

getQuota (string $tenantId) : Quota

Lists quotas for a project.

getDefaultQuota (string $tenantId) : Quota

Lists default quotas for a project

Lists loadbalancers for projects

getLoadBalancer (string $id) : LoadBalancer

Retrieve an instance of a LoadBalancer object

createLoadBalancer (array $options) : LoadBalancer

Create a new loadbalancer resource.

Lists loadbalancer listeners

Retrieve an instance of a loadbalancer listener object

Create a new loadbalancer Listener resource.

Lists loadbalancer pools

Retrieve an instance of a loadbalancer Pool object

Create a new loadbalancer Pool resource.

listLoadBalancerMembers (string $poolId) : Generator

Lists loadbalancer members

getLoadBalancerMember (string $poolId, string $memberId) : LoadBalancerMember

Retrieve an instance of a loadbalancer Member object

Create a new loadbalancer member resource.

Lists loadbalancer healthmonitors

Retrieve an instance of a loadbalancer healthmonitor object

Create a new loadbalancer healthmonitor resource.

Details

createNetwork(array $options)

Create a new network resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postNetwork}

Return value

Network

Example code

$network = $service->createNetwork($options);

createNetworks(array $options)

Create a new network resources.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postNetworks}

Return value

array

Example code

$array = $service->createNetworks($options);

getNetwork(string $id)

Retrieve a network object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Network::retrieve}.

Parameters

$id string

Return value

Network

Example code

$network = $service->getNetwork($id);

listNetworks(array $options = array())

List networks.

Parameters

$options array {see \OpenStack\Networking\v2\Api::getNetworks}

Return value

Generator

Example code

$generator = $service->listNetworks($options);

createSubnet(array $options)

Create a new subnet resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postSubnet}

Return value

Subnet

Example code

$subnet = $service->createSubnet($options);

createSubnets(array $options)

Create a new subnet resources.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postSubnets}

Return value

[]Subnet

Example code

$v2 = $service->createSubnets($options);

getSubnet(string $id)

Retrieve a subnet object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Subnet::retrieve}.

Parameters

$id string

Return value

Subnet

Example code

$subnet = $service->getSubnet($id);

listSubnets(array $options = array())

List subnets.

Parameters

$options array {see \OpenStack\Networking\v2\Api::getSubnets}

Return value

Generator

Example code

$generator = $service->listSubnets($options);

createPort(array $options)

Create a new port resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postSinglePort}

Return value

Port

Example code

$port = $service->createPort($options);

createPorts(array $options)

Create new port resources.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postMultiplePorts}

Return value

[]Port

Example code

$v2 = $service->createPorts($options);

getPort(string $id)

Retrieve a subnet object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Port::retrieve}.

Parameters

$id string

Return value

Port

Example code

$port = $service->getPort($id);

listPorts(array $options = array())

List ports.

Parameters

$options array {see \OpenStack\Networking\v2\Api::getPorts}

Return value

Generator

Example code

$generator = $service->listPorts($options);

listQuotas()

Lists quotas for projects with non-default quota values.

Return value

Generator

Example code

$generator = $service->listQuotas();

getQuota(string $tenantId)

Lists quotas for a project.

Retrieve a quota object without calling the remote API. Any values provided in the array will populate the empty object, allowing you greater control without the expense of network transactions. To call the remote API and have the response populate the object, call {see Quota::retrieve}.

Parameters

$tenantId string

Return value

Quota

Example code

$quota = $service->getQuota($tenantId);

getDefaultQuota(string $tenantId)

Lists default quotas for a project

Parameters

$tenantId string

Return value

Quota

Example code

$quota = $service->getDefaultQuota($tenantId);

listLoadBalancers()

Lists loadbalancers for projects

Return value

Generator

Example code

$generator = $service->listLoadBalancers();

getLoadBalancer(string $id)

Retrieve an instance of a LoadBalancer object

Parameters

$id string

Return value

LoadBalancer

Example code

$loadBalancer = $service->getLoadBalancer($id);

createLoadBalancer(array $options)

Create a new loadbalancer resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postLoadBalancer}

Return value

LoadBalancer

Example code

$loadBalancer = $service->createLoadBalancer($options);

listLoadBalancerListeners()

Lists loadbalancer listeners

Return value

Generator

Example code

$generator = $service->listLoadBalancerListeners();

getLoadBalancerListener(string $id)

Retrieve an instance of a loadbalancer listener object

Parameters

$id string

Return value

LoadBalancerListener

Example code

$loadBalancerListener = $service->getLoadBalancerListener($id);

createLoadBalancerListener(array $options)

Create a new loadbalancer Listener resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postLoadBalancerListener}

Return value

LoadBalancerListener

Example code

$loadBalancerListener = $service->createLoadBalancerListener($options);

listLoadBalancerPools()

Lists loadbalancer pools

Return value

Generator

Example code

$generator = $service->listLoadBalancerPools();

getLoadBalancerPool(string $id)

Retrieve an instance of a loadbalancer Pool object

Parameters

$id string

Return value

LoadBalancerPool

Example code

$loadBalancerPool = $service->getLoadBalancerPool($id);

createLoadBalancerPool(array $options)

Create a new loadbalancer Pool resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postLoadBalancerPool}

Return value

LoadBalancerPool

Example code

$loadBalancerPool = $service->createLoadBalancerPool($options);

listLoadBalancerMembers(string $poolId)

Lists loadbalancer members

Parameters

$poolId string

Return value

Generator

Example code

$generator = $service->listLoadBalancerMembers($poolId);

getLoadBalancerMember(string $poolId, string $memberId)

Retrieve an instance of a loadbalancer Member object

Parameters

$poolId string
$memberId string

Return value

LoadBalancerMember

Example code

$loadBalancerMember = $service->getLoadBalancerMember($poolId, $memberId);

createLoadBalancerMember(array $options)

Create a new loadbalancer member resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postLoadBalancerMember}

Return value

LoadBalancerMember

Example code

$loadBalancerMember = $service->createLoadBalancerMember($options);

listLoadBalancerHealthMonitors()

Lists loadbalancer healthmonitors

Return value

Generator

Example code

$generator = $service->listLoadBalancerHealthMonitors();

getLoadBalancerHealthMonitor(string $id)

Retrieve an instance of a loadbalancer healthmonitor object

Parameters

$id string

Return value

LoadBalancerHealthMonitor

Example code

$loadBalancerHealthMonitor = $service->getLoadBalancerHealthMonitor($id);

createLoadBalancerHealthMonitor(array $options)

Create a new loadbalancer healthmonitor resource.

Parameters

$options array {see \OpenStack\Networking\v2\Api::postLoadBalancerHealthMonitor}

Return value

LoadBalancerHealthMonitor

Example code

$loadBalancerHealthMonitor = $service->createLoadBalancerHealthMonitor($options);