Bases: object
Bases: AbstractNetworkDriver
Allocates a virtual ip.
Reserves it for later use as the frontend connection of a load balancer.
load_balancer – octavia.common.data_models.LoadBalancer instance
octavia.common.data_models.Vip, list(octavia.common.data_models.AdditionalVip)
AllocateVIPException, PortNotFound, SubnetNotFound
Creates a network port.
fixed_ips = [{‘subnet_id’: <id>, (‘ip_address’: <IP>’)},] ip_address is optional in the fixed_ips dictionary.
network_id – The network the port should be created on.
name – The name to apply to the port.
fixed_ips – A list of fixed IP dicts.
secondary_ips – A list of secondary IPs to add to the port.
security_group_ids – A list of security group IDs for the port.
qos_policy_id – The QoS policy ID to apply to the port.
A port data model object.
Removes any resources that reserved this virtual ip.
vip – octavia.common.data_models.VIP instance
None
DeallocateVIPException, VIPInUseException, VIPConfiigurationNotFound
Delete a network port.
port_id – The port ID to delete.
None
Prepare an amphora for failover.
amphora – amphora object to failover
None
PortNotFound
Retrieves network from network id.
network_id – id of an network to retrieve
context – A request context
octavia.network.data_models.Network
NetworkException, NetworkNotFound
Retrieves network from network name.
network_name – name of a network to retrieve
octavia.network.data_models.Network
NetworkException, NetworkNotFound
Retrieve network configurations
This method assumes that a dictionary of AmphoraNetworkConfigs keyed off of the related amphora id are returned. The configs contain data pertaining to each amphora that is later used for finalization of the entire load balancer configuration. The data provided to these configs is left up to the driver, this means the driver is responsible for providing data that is appropriate for the amphora network configurations.
Example return: {<amphora.id>: <AmphoraNetworkConfig>}
load_balancer – The load_balancer configuration
amphora – Optional amphora to only query.
dict of octavia.network.data_models.AmphoraNetworkConfig keyed off of the amphora id the config is associated with.
NotFound, NetworkNotFound, SubnetNotFound, PortNotFound
Retrieves network IP availability.
network – octavia.network.data_models.Network
octavia.network.data_models.Network_IP_Availability
NetworkException, NetworkNotFound
Retrieves the current plugged networking configuration.
compute_id – id of an amphora in the compute service
[octavia.network.data_models.Instance]
Retrieves port from port id.
port_id – id of a port to retrieve
context – A request context
octavia.network.data_models.Port
NetworkException, PortNotFound
Retrieves port from port name.
port_name – name of a port to retrieve
octavia.network.data_models.Port
NetworkException, PortNotFound
Retrieves port from network id and device id.
network_id – id of a network to filter by
device_id – id of a network device to filter by
octavia.network.data_models.Port
NetworkException, PortNotFound
Retrieves the security group by it’s name.
sg_name – The security group name.
octavia.network.data_models.SecurityGroup, None if not enabled
NetworkException, SecurityGroupNotFound
Retrieves subnet from subnet id.
subnet_id – id of a subnet to retrieve
context – A request context
octavia.network.data_models.Subnet
NetworkException, SubnetNotFound
Retrieves subnet from subnet name.
subnet_name – name of a subnet to retrieve
octavia.network.data_models.Subnet
NetworkException, SubnetNotFound
Plugs the AAP port to the amp
load_balancer – Load Balancer to prepare the VIP for
vip – The VIP to plug
amphora – The amphora to plug the VIP into
subnet – The subnet to plug the aap into
Plug a fixed ip to an existing port.
If ip_address is not specified, one will be auto-assigned.
port_id – id of a port to add a fixed ip
subnet_id – id of a subnet
ip_address – specific ip_address to add
octavia.network.data_models.Port
NetworkException, PortNotFound
Connects an existing amphora to an existing network.
compute_id – id of an amphora in the compute service
network_id – id of a network
octavia.network.data_models.Interface instance
PlugNetworkException, AmphoraNotFound, NetworkNotFound
Plug a neutron port in to a compute instance
amphora – amphora object to plug the port into
port – port to plug into the compute instance
None
PlugNetworkException, AmphoraNotFound, NetworkNotFound
Plugs a virtual ip as the frontend connection of a load balancer.
Sets up the routing of traffic from the vip to the load balancer and its amphorae.
load_balancer – octavia.common.data_models.LoadBalancer instance
vip – octavia.common.data_models.VIP instance
dict consisting of amphora_id as key and bind_ip as value. bind_ip is the ip that the amphora should listen on to receive traffic to load balance.
PlugVIPException, PortNotFound
Set the admin state of a port. True is up, False is down.
port_id – The port ID to update.
state – True for up, False for down.
None
Unplugs the AAP port to the amp
vip – The VIP to plug
amphora – The amphora to plug the VIP into
subnet – The subnet to plug the aap into
Unplug a fixed ip from an existing port.
port_id – id of a port to remove the fixed ip from
subnet_id – id of a subnet
octavia.network.data_models.Port
NetworkException, PortNotFound
Disconnects an existing amphora from an existing network.
If ip_address is not specified, all the interfaces plugged on network_id should be unplugged.
compute_id – id of an amphora in the compute service
network_id – id of a network
None
UnplugNetworkException, AmphoraNotFound, NetworkNotFound, NetworkException
Unplugs a virtual ip as the frontend connection of a load balancer.
Removes the routing of traffic from the vip to the load balancer and its amphorae.
load_balancer – octavia.common.data_models.LoadBalancer instance
vip – octavia.common.data_models.VIP instance
octavia.common.data_models.VIP instance
UnplugVIPException, PluggedVIPNotFound
Hook for the driver to update the VIP information.
This method will be called upon the change of a load_balancer configuration. It is an optional method to be implemented by drivers. It allows the driver to update any VIP information based on the state of the passed in load_balancer.
load_balancer – octavia.common.data_models.LoadBalancer instance
for_delete – Boolean indicating if this update is for a delete
MissingVIPSecurityGroup
None
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.