DLB v3 API¶
For details on how to use database, see /sdk/guides/vlb (NEEDS TO BE DONE)
The VLB Class¶
The database high-level interface is available through the vlb
member of a
Connection
object. The vlb
member will only
be added if the otcextensions.sdk.register_otc_extensions(conn)
method is
called.
AvailabilityZone Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
availability_zones
(**query) Retrieve a generator of availability zones
- Returns
A AvailabilityZone instance
- Return type
AvailabilityZone
-
Certificate Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_certificate
(**attrs) Create a new certificate from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
Certificate
, comprised of the properties on the Certificate class.- Returns
The results of the Certificate Creation
- Return type
-
certificates
(**query) Return a generator of certificates
- Parameters
query (dict) – Optional query parameters to be sent to limit the resources being returned.
- Returns
A generator of certificates objects.
-
delete_certificate
(certificate, ignore_missing=True) Delete a certificate
- Parameters
certificate – The value can be the ID of a ELB certificate or a
Certificate
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the certificate does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent certificate.
- Returns
None
-
get_certificate
(certificate) Get a single certificate
- Parameters
certificate – The value can be the ID of a ELB certificate or a
Certificate
instance.- Returns
One :class: ~otcextensions.sdk.vlb.v3.certificate.Certificate
- Raises
ResourceNotFound
when no resource can be found.
-
update_certificate
(certificate, **attrs) Update a certificate
- Parameters
certificate – The value can be either the ID of a ELB certificate or a
Certificate
instance.attrs (dict) – The attributes to update on the certificate represented by
certificate
.
- Returns
The updated certificate.
- Return type
Certificate
-
find_certificate
(name_or_id, ignore_missing=False) Find a single certificate
- Parameters
name_or_id – The name or ID of a ELB certificate
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the certificate does not exist. When set toTrue
, no exception will be set when attempting to find a nonexistent certificate.
- Returns
One
Certificate
orNone
-
Flavor Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
flavors
(**query) List all load balancer flavors that are available to a specific user in a specific region.
- Parameters
engine_name – database engine name
region – region
- Returns
A generator of flavor
- Return type
-
get_flavor
(flavor) Get a single flavor
-
find_flavor
(name_or_id, ignore_missing=True) Find a single flavor
- Parameters
name_or_id – The name or ID of a flavor
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the flavor does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent flavor.
- Returns
None
-
HealthMonitor Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
find_health_monitor
(name_or_id, ignore_missing=True) Find a single health monitor
- Parameters
name_or_id (str) – The name or ID of a health monitor.
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
HealthMonitor
or None- Raises
openstack.exceptions.DuplicateResource
if more than one resource is found for this request.- Raises
openstack.exceptions.ResourceNotFound
if nothing is found and ignore_missing isFalse
.
-
create_health_monitor
(**attrs) Create a new health monitor from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
HealthMonitor
, comprised of the properties on the Member class.- Returns
The results of health monitor creation
- Return type
HealthMonitor
-
get_health_monitor
(healthmonitor) Get a single health monitor
- Parameters
healthmonitor – The value can be the ID of a health monitor or a
HealthMonitor
instance.- Returns
One
HealthMonitor
- Raises
ResourceNotFound
when no resource can be found.
-
health_monitors
(**query) Return a generator of health monitors
- Parameters
query (dict) – Optional query parameters to be sent to limit the resources being returned.
- Returns
A generator of health monitor objects
- Return type
HealthMonitor
-
delete_health_monitor
(healthmonitor, ignore_missing=True) Delete a health monitor
- Parameters
healthmonitor – The value can be either the ID of a health monitor or a
HealthMonitor
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the member does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent health monitor.
- Returns
None
-
update_health_monitor
(healthmonitor, **attrs) Update a health monitor
- Parameters
healthmonitor – The healthmonitor can be either the ID of the health monitor or a
HealthMonitor
instanceattrs (dict) – The attributes to update on the health monitor represented by
healthmonitor
.
- Returns
The updated health monitor
- Return type
HealthMonitor
-
IpAddressGroup Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_ip_address_group
(**attrs) Create a new ip address group from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
IpAddressGroup
, comprised of the properties on the IpAddressGroup class.- Returns
The results of ip address group creation
- Return type
IpAddressGroup
-
get_ip_address_group
(ip_address_group) Get an ip address group
- Parameters
ip_address_group – The value can be the name of an ip_address_group or
IpAddressGroup
instance.- Returns
One
IpAddressGroup
-
ip_address_groups
(**query) Retrieve a generator of an ip address group
- Returns
A generator of ip address group instances
-
delete_ip_address_group
(ip_address_group, ignore_missing=True) Delete an ip address group
- Parameters
ip_address_group – The ip address group can be either the name or a
IpAddressGroup
instanceignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the ip address group does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent ip address group.
- Returns
None
-
find_ip_address_group
(name_or_id, ignore_missing=True) Find a single ip address group
- Parameters
name_or_id – The name or ID of an ip address group
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the ip address group does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent ip address group.
- Returns
None
-
update_ip_address_group
(ip_address_group, **attrs) Update a ip address group
- Parameters
ip_address_group – The ip_address_group can be either the name or a
IpAddressGroup
instanceattrs (dict) – The attributes to update on the ip address group represented by
ip_address_group
.
- Returns
The updated ip_address_group
- Return type
IpAddressGroup
-
L7Policy Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_l7_policy
(**attrs) Create a new l7policy from attributes
-
delete_l7_policy
(l7_policy, ignore_missing=True) Delete a l7policy
- Parameters
l7_policy – The value can be either the ID of a l7policy or a
L7Policy
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the l7policy does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent l7policy.
- Returns
None
-
find_l7_policy
(name_or_id, ignore_missing=True) Find a single l7policy
- Parameters
name_or_id (str) – The name or ID of a l7policy.
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
L7Policy
or None- Raises
openstack.exceptions.DuplicateResource
if more than one resource is found for this request.- Raises
openstack.exceptions.ResourceNotFound
if nothing is found and ignore_missing isFalse
.
-
get_l7_policy
(l7_policy) Get a single l7policy
- Parameters
healthmonitor – The value can be the ID of a l7policy or a
L7Policy
instance.- Returns
One
L7Policy
- Raises
ResourceNotFound
when no resource can be found.
-
l7_policies
(**query) Return a generator of l7policies
- Parameters
query (dict) – Optional query parameters to be sent to limit the resources being returned.
- Returns
A generator of l7policies objects
- Return type
-
update_l7_policy
(l7_policy, **attrs) Update a l7policy
- Parameters
l7_policy – The l7policy can be either the ID of the l7policy or a
L7Policy
instanceattrs (dict) – The attributes to update on the l7policy represented by
L7policy
.
- Returns
The updated l7policy
- Return type
-
L7Rule Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_l7_rule
(l7_policy, **attrs) Create a new l7rule from attributes
- Parameters
- Returns
The results of l7rule creation
- Return type
-
delete_l7_rule
(l7rule, l7_policy, ignore_missing=True) Delete a l7rule
- Parameters
l7rule – The l7rule can be either the ID of a l7rule or a
L7Rule
instance.l7_policy – The l7_policy can be either the ID of a l7policy or
L7Policy
instance that the l7rule belongs to.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the l7rule does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent l7rule.
- Returns
None
-
find_l7_rule
(name_or_id, l7_policy, ignore_missing=True) Find a single l7rule
- Parameters
name_or_id (str) – The name or ID of a l7rule.
l7_policy – The l7_policy can be either the ID of a l7policy or
L7Policy
instance that the l7rule belongs to.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
L7Rule
or None
-
get_l7_rule
(l7rule, l7_policy) Get a single l7rule
-
l7_rules
(l7_policy, **query) Return a generator of l7rules
-
update_l7_rule
(l7rule, l7_policy, **attrs) Update a l7rule
- Parameters
- Returns
The updated l7rule
- Return type
-
Listener Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_listener
(**attrs) Create a new listener from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
Listener
, comprised of the properties on the Listener class.- Returns
The results of listener creation
- Return type
-
delete_listener
(listener, ignore_missing=True) Delete a listener
- Parameters
listener – The value can be either the ID of a listner or a
Listener
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the listner does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent listener.
- Returns
None
-
update_listener
(listener, **attrs) Update a listener
-
find_listener
(name_or_id, ignore_missing=True) Find a single listener
- Parameters
name_or_id – The name or ID of a listener.
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
Listener
or None
-
get_listener
(listener) Get a single listener
-
listeners
(**query) Retrieve a generator of listeners
- Returns
A generator of listeners instances
- Return type
-
LoadBalancer Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_load_balancer
(**attrs) Create a new load balancer from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
LoadBalancer
, comprised of the properties on the LoadBalancer class.- Returns
The results of load balancer creation
- Return type
-
get_load_balancer
(*attrs) Get a load balancer
- Parameters
load_balancer – The value can be the name of a load balancer or
LoadBalancer
instance.- Returns
One
LoadBalancer
-
get_load_balancer_statistics
(name_or_id) Get the load balancer statistics
- Parameters
name_or_id – The name or ID of a load balancer
- Returns
One
LoadBalancerStats
-
load_balancers
(**query) Retrieve a generator of load balancers
- Returns
A generator of load balancer instances
-
delete_load_balancer
(load_balancer, ignore_missing=True) Delete a load balancer
- Parameters
load_balancer – The load_balancer can be either the name or a
LoadBalancer
instanceignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the load balancer does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent load balancer.
- Returns
None
-
find_load_balancer
(name_or_id, ignore_missing=True) Find a single load balancer
- Parameters
name_or_id – The name or ID of a load balancer
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the load balancer does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent load balancer.
- Returns
None
-
update_load_balancer
(load_balancer, **attrs) Update a load balancer
- Parameters
load_balancer – The load_balancer can be either the name or a
LoadBalancer
instanceattrs (dict) – The attributes to update on the load balancer represented by
load_balancer
.
- Returns
The updated load_balancer
- Return type
-
Member Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_member
(pool, **attrs) Create a new member from attributes
-
delete_member
(member, pool, ignore_missing=True) Delete a member
- Parameters
member – The member can be either the ID of a member or a
Member
instance.pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the member does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent member.
- Returns
None
-
find_member
(name_or_id, pool, ignore_missing=True) Find a single member
- Parameters
name_or_id (str) – The name or ID of a member.
pool – The pool can be either the ID of a pool or a
Pool
instance that the member belongs to.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the resource does not exist. When set toTrue
, None will be returned when attempting to find a nonexistent resource.
- Returns
One
Member
or None
-
get_member
(member, pool) Get a single member
-
members
(pool, **query) Return a generator of members
-
update_member
(member, pool, **attrs) Update a member
-
Pool Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_pool
(**attrs) Create a new pool from attributes
-
get_pool
(*attrs) Get a single pool
- Parameters
attrs (dict) – Keyword arguments which will be used to get a
Pool
instance.- Returns
One :class: ~otcextensions.sdk.vlb.v3.pool.Pool
- Raises
ResourceNotFound
when no resource can be found.
-
pools
(**query) Return a generator of pool
- Parameters
query (dict) – Optional query parameters to be sent to limit the resources being returned.
- Returns
A generator of pools objects.
-
delete_pool
(pool, ignore_missing=True) Delete a pool
- Parameters
pool – The value can be the ID of a ELB pool or a
Pool
instance.ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the pool does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent pool.
- Returns
None
-
find_pool
(name_or_id, ignore_missing=True) Find a single pool
- Parameters
name_or_id – The name or ID of a pool
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the pool does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent pool.
- Returns
None
-
update_pool
(pool, **attrs) Update a pool
- Parameters
pool – The value can be either the ID of a ELB pool or a
Pool
instance.attrs (dict) – The attributes to update on the pool represented by
pool
.
- Returns
The updated pool.
- Return type
Pool
-
Quota Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
get_quotas
() Retrieve a quotas
- Returns
A quota instance
- Return type
-
Security Policy Operations¶
-
class
otcextensions.sdk.vlb.v3._proxy.
Proxy
(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs) -
create_security_policy
(**attrs) Create a new security policy from attributes
- Parameters
attrs (dict) – Keyword arguments which will be used to create a
SecurityPolicy
, comprised of the properties on the SecurityPolicy class.- Returns
The results of security policy creation
- Return type
SecurityPolicy
-
get_security_policy
(security_policy) Get a security policy
- Parameters
security_policy – The value can be the name of an security_policy or
SecurityPolicy
instance.- Returns
One
SecurityPolicy
-
security_policies
(**query) Retrieve a generator of security policies
- Returns
A generator of security policies
-
update_security_policy
(security_policy, **attrs) Update a security policy
- Parameters
security_policy – The security_policy can be either the id or a
SecurityPolicy
instanceattrs (dict) – The attributes to update on the security policy represented by
security_policy
.
- Returns
The updated security_policy
- Return type
SecurityPolicy
-
find_security_policy
(name_or_id, ignore_missing=True) Find a single security policy
- Parameters
name_or_id – The name or ID of an security policy
ignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the security policy does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent security policy.
- Returns
None
-
delete_security_policy
(security_policy, ignore_missing=True) Delete a security policy
- Parameters
security_policy – The security_policy can be either the name or a
SecurityPolicy
instanceignore_missing (bool) – When set to
False
ResourceNotFound
will be raised when the security policy does not exist. When set toTrue
, no exception will be set when attempting to delete a nonexistent security policy.
- Returns
None
-