openstack.load_balancer.v2.load_balancer

The LoadBalancer Class

The LoadBalancer class inherits from Resource.

class openstack.load_balancer.v2.load_balancer.LoadBalancer(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'loadbalancer'

Singular form of key for resource.

resources_key = 'loadbalancers'

Plural form of key for resource.

base_path = '/lbaas/loadbalancers'

The base part of the URI for this resource.

allow_create = True

Allow create operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_commit = True

Allow update operation for this resource.

allow_delete = True

Allow delete operation for this resource.

allow_list = True

Allow list operation for this resource.

is_admin_state_up

The administrative state of the load balancer Type: bool

availability_zone

Name of the target Octavia availability zone

created_at

Timestamp when the load balancer was created

description

The load balancer description

flavor_id

The load balancer flavor ID

listeners

List of listeners associated with this load balancer

name

The load balancer name

operating_status

Operating status of the load balancer

pools

List of pools associated with this load balancer

project_id

The ID of the project this load balancer is associated with.

provider

Provider name for the load balancer.

provisioning_status

The provisioning status of this load balancer

updated_at

Timestamp when the load balancer was last updated

vip_address

VIP address of load balancer

vip_network_id

VIP netowrk ID

vip_port_id

VIP port ID

vip_subnet_id

VIP subnet ID

additional_vips

Additional VIPs

delete(session, error_message=None)

Delete the remote resource based on this instance.

Parameters:
  • session (Adapter) – The session to use for making this request.

  • microversion (str) – API version to override the negotiated one.

  • kwargs (dict) – Parameters that will be passed to _prepare_request()

Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_commit is not set to True.

Raises:

ResourceNotFound if the resource was not found.

The LoadBalancerStats Class

The LoadBalancerStats class inherits from Resource.

class openstack.load_balancer.v2.load_balancer.LoadBalancerStats(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

resource_key = 'stats'

Singular form of key for resource.

base_path = '/lbaas/loadbalancers/%(lb_id)s/stats'

The base part of the URI for this resource.

allow_create = False

Allow create operation for this resource.

allow_fetch = True

Allow get operation for this resource.

allow_commit = False

Allow update operation for this resource.

allow_delete = False

Allow delete operation for this resource.

allow_list = False

Allow list operation for this resource.

lb_id

The ID of the load balancer.

active_connections

The currently active connections.

bytes_in

The total bytes received.

bytes_out

The total bytes sent.

request_errors

The total requests that were unable to be fulfilled.

total_connections

The total connections handled.

The LoadBalancerFailover Class

The LoadBalancerFailover class inherits from Resource.

class openstack.load_balancer.v2.load_balancer.LoadBalancerFailover(_synchronized=False, connection=None, **attrs)

The base resource

Parameters:
  • _synchronized (bool) – This is not intended to be used directly. See new() and existing().

  • connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow Resource objects to be used without an active Connection, such as in unit tests. Use of self._connection in Resource code should protect itself with a check for None.

base_path = '/lbaas/loadbalancers/%(lb_id)s/failover'

The base part of the URI for this resource.

allow_create = False

Allow create operation for this resource.

allow_fetch = False

Allow get operation for this resource.

allow_commit = True

Allow update operation for this resource.

allow_delete = False

Allow delete operation for this resource.

allow_list = False

Allow list operation for this resource.

allow_empty_commit = True

Commits happen without header or body being dirty.

requires_id = False

Do calls for this resource require an id

lb_id

The ID of the load balancer.

commit(session, base_path=None)

Commit the state of the instance to the remote resource.

Parameters:
  • session (Adapter) – The session to use for making this request.

  • prepend_key – A boolean indicating whether the resource_key should be prepended in a resource update request. Default to True.

  • retry_on_conflict (bool) – Whether to enable retries on HTTP CONFLICT (409). Value of None leaves the Adapter defaults.

  • base_path (str) – Base part of the URI for modifying resources, if different from base_path.

  • microversion (str) – API version to override the negotiated one.

  • kwargs (dict) – Parameters that will be passed to _prepare_request()

Returns:

This Resource instance.

Raises:

MethodNotSupported if Resource.allow_commit is not set to True.