# octavia.network.drivers.noop_driver package

## Submodules

## octavia.network.drivers.noop_driver.driver module

class NoopManager

  Bases: `object`

  allocate_vip(loadbalancer)
  apply_qos_on_port(qos_id, port_id)
  create_port(network_id, name=None, fixed_ips=(), secondary_ips=(), security_group_ids=(), admin_state_up=True, qos_policy_id=None)
  deallocate_vip(vip)
  delete_port(port_id)
  failover_preparation(amphora)
  get_network(network_id)
  get_network_by_name(network_name)
  get_network_configs(loadbalancer, amphora=None)
  get_network_ip_availability(network)
  get_plugged_networks(compute_id)
  get_port(port_id)
  get_port_by_name(port_name)
  get_port_by_net_id_device_id(network_id, device_id)
  get_qos_policy(qos_policy_id)
  get_security_group(sg_name)
  get_subnet(subnet_id)
  get_subnet_by_name(subnet_name)
  plug_aap_port(load_balancer, vip, amphora, subnet)
  plug_fixed_ip(port_id, subnet_id, ip_address=None)
  plug_network(compute_id, network_id)
  plug_port(amphora, port)
  plug_vip(loadbalancer, vip)
  qos_enabled()
  set_port_admin_state_up(port_id, state)
  unplug_aap_port(vip, amphora, subnet)
  unplug_fixed_ip(port_id, subnet_id)
  unplug_network(compute_id, network_id)
  unplug_vip(loadbalancer, vip)
  update_vip(loadbalancer, for_delete=False)
  update_vip_sg(load_balancer, vip)
  wait_for_port_detach(amphora)

class NoopNetworkDriver

  Bases: `octavia.network.base.AbstractNetworkDriver`

  allocate_vip(loadbalancer)

    Allocates a virtual ip.

    Reserves it for later use as the frontend connection of a load balancer.

    Parameters

      load_balancer – octavia.common.data_models.LoadBalancer instance

    Returns

      octavia.common.data_models.VIP

    Raises

      AllocateVIPException, PortNotFound, SubnetNotFound

  apply_qos_on_port(qos_id, port_id)
  create_port(network_id, name=None, fixed_ips=(), secondary_ips=(), security_group_ids=(), admin_state_up=True, qos_policy_id=None)

    Creates a network port.

    fixed_ips = [{‘subnet_id’: <id>, (‘ip_address’: <IP>’)},] ip_address is optional in the fixed_ips dictionary.

    Parameters

      - 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.

    Returns port

      A port data model object.

  deallocate_vip(vip)

    Removes any resources that reserved this virtual ip.

    Parameters

      vip – octavia.common.data_models.VIP instance

    Returns

      None

    Raises

      DeallocateVIPException, VIPInUseException, VIPConfiigurationNotFound

  delete_port(port_id)

    Delete a network port.

    Parameters

      port_id – The port ID to delete.

    Returns

      None

  failover_preparation(amphora)

    Prepare an amphora for failover.

    Parameters

      amphora – amphora object to failover

    Returns

      None

    Raises

      PortNotFound

  get_network(network_id, context=None)

    Retrieves network from network id.

    Parameters

      - network_id – id of an network to retrieve

      - context – A request context

    Returns

      octavia.network.data_models.Network

    Raises

      NetworkException, NetworkNotFound

  get_network_by_name(network_name)

    Retrieves network from network name.

    Parameters

      network_name – name of a network to retrieve

    Returns

      octavia.network.data_models.Network

    Raises

      NetworkException, NetworkNotFound

  get_network_configs(loadbalancer, amphora=None)

    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>}

    Parameters

      - load_balancer – The load_balancer configuration

      - amphora – Optional amphora to only query.

    Returns

      dict of octavia.network.data_models.AmphoraNetworkConfig keyed off of the amphora id the config is associated with.

    Raises

      NotFound, NetworkNotFound, SubnetNotFound, PortNotFound

  get_network_ip_availability(network)

    Retrieves network IP availability.

    Parameters

      network – octavia.network.data_models.Network

    Returns

      octavia.network.data_models.Network_IP_Availability

    Raises

      NetworkException, NetworkNotFound

  get_plugged_networks(compute_id)

    Retrieves the current plugged networking configuration.

    Parameters

      compute_id – id of an amphora in the compute service

    Returns

      [octavia.network.data_models.Instance]

  get_port(port_id, context=None)

    Retrieves port from port id.

    Parameters

      - port_id – id of a port to retrieve

      - context – A request context

    Returns

      octavia.network.data_models.Port

    Raises

      NetworkException, PortNotFound

  get_port_by_name(port_name)

    Retrieves port from port name.

    Parameters

      port_name – name of a port to retrieve

    Returns

      octavia.network.data_models.Port

    Raises

      NetworkException, PortNotFound

  get_port_by_net_id_device_id(network_id, device_id)

    Retrieves port from network id and device id.

    Parameters

      - network_id – id of a network to filter by

      - device_id – id of a network device to filter by

    Returns

      octavia.network.data_models.Port

    Raises

      NetworkException, PortNotFound

  get_qos_policy(qos_policy_id)
  get_security_group(sg_name)

    Retrieves the security group by it’s name.

    Parameters

      sg_name – The security group name.

    Returns

      octavia.network.data_models.SecurityGroup, None if not enabled

    Raises

      NetworkException, SecurityGroupNotFound

  get_subnet(subnet_id, context=None)

    Retrieves subnet from subnet id.

    Parameters

      - subnet_id – id of a subnet to retrieve

      - context – A request context

    Returns

      octavia.network.data_models.Subnet

    Raises

      NetworkException, SubnetNotFound

  get_subnet_by_name(subnet_name)

    Retrieves subnet from subnet name.

    Parameters

      subnet_name – name of a subnet to retrieve

    Returns

      octavia.network.data_models.Subnet

    Raises

      NetworkException, SubnetNotFound

  plug_aap_port(load_balancer, vip, amphora, subnet)

    Plugs the AAP port to the amp

    Parameters

      - 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_fixed_ip(port_id, subnet_id, ip_address=None)

    Plug a fixed ip to an existing port.

    If ip_address is not specified, one will be auto-assigned.

    Parameters

      - port_id – id of a port to add a fixed ip

      - subnet_id – id of a subnet

      - ip_address – specific ip_address to add

    Returns

      octavia.network.data_models.Port

    Raises

      NetworkException, PortNotFound

  plug_network(compute_id, network_id)

    Connects an existing amphora to an existing network.

    Parameters

      - compute_id – id of an amphora in the compute service

      - network_id – id of a network

    Returns

      octavia.network.data_models.Interface instance

    Raises

      PlugNetworkException, AmphoraNotFound, NetworkNotFound

  plug_port(amphora, port)

    Plug a neutron port in to a compute instance

    Parameters

      - amphora – amphora object to plug the port into

      - port – port to plug into the compute instance

    Returns

      None

    Raises

      PlugNetworkException, AmphoraNotFound, NetworkNotFound

  plug_vip(loadbalancer, vip)

    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.

    Parameters

      - load_balancer – octavia.common.data_models.LoadBalancer instance

      - vip – octavia.common.data_models.VIP instance

    Returns

      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.

    Raises

      PlugVIPException, PortNotFound

  qos_enabled()

    Whether QoS is enabled

    Returns

      Boolean

  set_port_admin_state_up(port_id, state)

    Set the admin state of a port. True is up, False is down.

    Parameters

      - port_id – The port ID to update.

      - state – True for up, False for down.

    Returns

      None

  unplug_aap_port(vip, amphora, subnet)

    Unplugs the AAP port to the amp

    Parameters

      - vip – The VIP to plug

      - amphora – The amphora to plug the VIP into

      - subnet – The subnet to plug the aap into

  unplug_fixed_ip(port_id, subnet_id)

    Unplug a fixed ip from an existing port.

    Parameters

      - port_id – id of a port to remove the fixed ip from

      - subnet_id – id of a subnet

    Returns

      octavia.network.data_models.Port

    Raises

      NetworkException, PortNotFound

  unplug_network(compute_id, network_id)

    Disconnects an existing amphora from an existing network.

    If ip_address is not specified, all the interfaces plugged on network_id should be unplugged.

    Parameters

      - compute_id – id of an amphora in the compute service

      - network_id – id of a network

    Returns

      None

    Raises

      UnplugNetworkException, AmphoraNotFound, NetworkNotFound, NetworkException

  unplug_vip(loadbalancer, vip)

    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.

    Parameters

      - load_balancer – octavia.common.data_models.LoadBalancer instance

      - vip – octavia.common.data_models.VIP instance

    Returns

      octavia.common.data_models.VIP instance

    Raises

      UnplugVIPException, PluggedVIPNotFound

  update_vip(loadbalancer, for_delete=False)

    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.

    Parameters

      - load_balancer – octavia.common.data_models.LoadBalancer instance

      - for_delete – Boolean indicating if this update is for a delete

    Raises

      MissingVIPSecurityGroup

    Returns

      None

  update_vip_sg(load_balancer, vip)

    Updates the security group for a VIP

    Parameters

      - load_balancer – Load Balancer to rpepare the VIP for

      - vip – The VIP to plug

  wait_for_port_detach(amphora)

    Waits for the amphora ports device_id to be unset.

    This method waits for the ports on an amphora device_id parameter to be ‘’ or None which signifies that nova has finished detaching the port from the instance.

    Parameters

      amphora – Amphora to wait for ports to detach.

    Returns

      None

    Raises

      - TimeoutException – Port did not detach in interval.

      - PortNotFound – Port was not found by neutron.

## Module contents

this page last updated: 2025-07-16 18:40:57

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug