AmphoraProviderDriver
[source]¶Bases: octavia_lib.api.drivers.provider_base.ProviderDriver
create_vip_port
(loadbalancer_id, project_id, vip_dictionary, additional_vip_dicts=None)[source]¶Creates a port for a load balancer VIP.
If the driver supports creating VIP ports, the driver will create a VIP port with the primary VIP and all additional VIPs added to the port, and return the vip_dictionary populated with the vip_port_id and a list of vip_dictionaries populated with data from the additional VIPs (which are guaranteed to be in the same Network). This might look like: {‘port_id’: port_id, ‘subnet_id’: subnet_id_1, ‘ip_address’: ip1}, [{‘subnet_id’: subnet_id_2, ‘ip_address’: ip2}, {…}, {…}] If the driver does not support port creation, the driver will raise a NotImplementedError.
loadbalancer_id (string) – ID of loadbalancer.
project_id (string) – The project ID to create the VIP under.
vip_dictionary: The VIP dictionary.
additional_vip_dicts: A list of additional VIP dictionaries, with subnets guaranteed to be in the same network as the primary vip_dictionary.
VIP dictionary with vip_port_id + a list of additional VIP dictionaries (vip_dict, additional_vip_dicts).
DriverError – An unexpected error occurred in the driver.
NotImplementedError – The driver does not support creating VIP ports.
get_supported_availability_zone_metadata
()[source]¶Returns the valid availability zone metadata keys and descriptions.
This extracts the valid availability zone metadata keys and descriptions from the JSON validation schema and returns it as a dictionary.
Dictionary of availability zone metadata keys and descriptions
DriverError – An unexpected error occurred.
get_supported_flavor_metadata
()[source]¶Returns the valid flavor metadata keys and descriptions.
This extracts the valid flavor metadata keys and descriptions from the JSON validation schema and returns it as a dictionary.
Dictionary of flavor metadata keys and descriptions.
DriverError – An unexpected error occurred.
health_monitor_create
(healthmonitor)[source]¶Creates a new health monitor.
healthmonitor (object) – The health monitor object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
health_monitor_delete
(healthmonitor)[source]¶Deletes a healthmonitor_id.
healthmonitor (object) – The monitor to delete.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
health_monitor_update
(old_healthmonitor, new_healthmonitor)[source]¶Updates a health monitor.
old_healthmonitor (object) – The baseline health monitor object.
new_healthmonitor (object) – The updated health monitor object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
l7policy_create
(l7policy)[source]¶Creates a new L7 policy.
l7policy (object) – The L7 policy object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
l7policy_delete
(l7policy)[source]¶Deletes an L7 policy.
l7policy (object) – The L7 policy to delete.
Nothing if the delete request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
l7policy_update
(old_l7policy, new_l7policy)[source]¶Updates an L7 policy.
old_l7policy (object) – The baseline L7 policy object.
new_l7policy (object) – The updated L7 policy object.
Nothing if the update request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
l7rule_create
(l7rule)[source]¶Creates a new L7 rule.
l7rule (object) – The L7 rule object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
l7rule_delete
(l7rule)[source]¶Deletes an L7 rule.
l7rule (object) – The L7 rule to delete.
Nothing if the delete request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
l7rule_update
(old_l7rule, new_l7rule)[source]¶Updates an L7 rule.
old_l7rule (object) – The baseline L7 rule object.
new_l7rule (object) – The updated L7 rule object.
Nothing if the update request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
listener_create
(listener)[source]¶Creates a new listener.
listener (object) – The listener object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
listener_delete
(listener)[source]¶Deletes a listener.
listener (object) – The listener to delete.
Nothing if the delete request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
listener_update
(old_listener, new_listener)[source]¶Updates a listener.
old_listener (object) – The baseline listener object.
new_listener (object) – The updated listener object.
Nothing if the update request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
loadbalancer_create
(loadbalancer)[source]¶Creates a new load balancer.
loadbalancer (object) – The load balancer object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – The driver does not support create.
UnsupportedOptionError – The driver does not support one of the configuration options.
loadbalancer_delete
(loadbalancer, cascade=False)[source]¶Deletes a load balancer.
loadbalancer (object) – The load balancer to delete.
cascade (bool) – If True, deletes all child objects (listeners, pools, etc.) in addition to the load balancer.
Nothing if the delete request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
loadbalancer_failover
(loadbalancer_id)[source]¶Performs a fail over of a load balancer.
loadbalancer_id (string) – ID of the load balancer to failover.
Nothing if the failover request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError if driver does not support request.
loadbalancer_update
(old_loadbalancer, new_loadbalancer)[source]¶Updates a load balancer.
old_loadbalancer (object) – The baseline load balancer object.
new_loadbalancer (object) – The updated load balancer object.
Nothing if the update request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – The driver does not support request.
UnsupportedOptionError – The driver does not support one of the configuration options.
member_batch_update
(pool_id, members)[source]¶Creates, updates, or deletes a set of pool members.
pool_id (string) – The id of the pool to update.
members (list) – List of member objects.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
member_create
(member)[source]¶Creates a new member for a pool.
member (object) – The member object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
member_delete
(member)[source]¶Deletes a pool member.
member (object) – The member to delete.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
member_update
(old_member, new_member)[source]¶Updates a pool member.
old_member (object) – The baseline member object.
new_member (object) – The updated member object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
pool_create
(pool)[source]¶Creates a new pool.
pool (object) – The pool object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
pool_delete
(pool)[source]¶Deletes a pool and its members.
pool (object) – The pool to delete.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
pool_update
(old_pool, new_pool)[source]¶Updates a pool.
pool (object) – The baseline pool object.
pool – The updated pool object.
Nothing if the create request was accepted.
DriverError – An unexpected error occurred in the driver.
NotImplementedError – if driver does not support request.
UnsupportedOptionError – if driver does not support one of the configuration options.
validate_availability_zone
(availability_zone_dict)[source]¶Validates availability zone profile data.
This will validate an availability zone profile dataset against the availability zone settings the amphora driver supports.
availability_zone_dict (dict) – The availability zone dict to validate.
None
DriverError – An unexpected error occurred.
UnsupportedOptionError – If the driver does not support one of the availability zone settings.
validate_flavor
(flavor_dict)[source]¶Validates flavor profile data.
This will validate a flavor profile dataset against the flavor settings the amphora driver supports.
flavor_dict – The flavor dictionary to validate.
None
DriverError – An unexpected error occurred.
UnsupportedOptionError – If the driver does not support one of the flavor settings.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.