# octavia.controller.worker.v2.tasks package

## Submodules

## octavia.controller.worker.v2.tasks.amphora_driver_tasks module

class AmpListenersUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to update the listeners on one amphora.

  execute(loadbalancer, amphora, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmpRetry(attempts=1, name=None, provides=None, requires=None, auto_extract=True, rebind=None, revert_all=False)

  Bases: `taskflow.retry.Times`

  on_failure(history, *args, **kwargs)

    Makes a decision about the future.

    This method will typically use information about prior failures (if this historical failure information is not available or was not persisted the provided history will be empty).

    Returns a retry constant (one of):

    - `RETRY`: when the controlling flow must be reverted and restarted again (for example with new parameters).

    - `REVERT`: when this controlling flow must be completely reverted and the parent flow (if any) should make a decision about further flow execution.

    - `REVERT_ALL`: when this controlling flow and the parent flow (if any) must be reverted and marked as a `FAILURE`.

class AmphoraCertUpload(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Upload a certificate to the amphora.

  execute(amphora, server_pem)

    Execute cert_update_amphora routine.

class AmphoraComputeConnectivityWait(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to wait for the compute instance to be up.

  execute(amphora, raise_retry_exception=False)

    Execute get_info routine for an amphora until it responds.

class AmphoraConfigUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to push a new amphora agent configuration to the amphora.

  execute(amphora, flavor)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraFinalize(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to finalize the amphora before any listeners are configured.

  execute(amphora)

    Execute finalize_amphora routine.

  revert(result, amphora, *args, **kwargs)

    Handle a failed amphora finalize.

class AmphoraGetDiagnostics(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to get diagnostics on the amphora and the loadbalancers.

  execute(amphora)

    Execute get_diagnostic routine for an amphora.

class AmphoraGetInfo(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to get information on an amphora.

  execute(amphora)

    Execute get_info routine for an amphora.

class AmphoraIndexListenerUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to update the listeners on one amphora.

  execute(loadbalancer, amphora_index, amphorae, amphorae_status: dict, new_amphora_id: str, timeout_dict=())

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraIndexListenersReload(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to reload all listeners on an amphora.

  execute(loadbalancer, amphora_index, amphorae, amphorae_status: dict, new_amphora_id: str, timeout_dict=None)

    Execute listener reload routines for listeners on an amphora.

class AmphoraIndexUpdateVRRPInterface(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to get and update the VRRP interface device name from amphora.

  execute(amphora_index, amphorae, amphorae_status: dict, new_amphora_id: str, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraIndexVRRPStart(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to start keepalived on an amphora.

  This will reload keepalived if it is already running.

  execute(amphora_index, amphorae, amphorae_status: dict, new_amphora_id: str, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraIndexVRRPUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to update the VRRP configuration of an amphora.

  execute(loadbalancer_id, amphorae_network_config, amphora_index, amphorae, amphorae_status: dict, amp_vrrp_int: Optional[str], new_amphora_id: str, timeout_dict=None)

    Execute update_vrrp_conf.

class AmphoraPostNetworkPlug(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to notify the amphora post network plug.

  execute(amphora, ports, amphora_network_config)

    Execute post_network_plug routine.

  revert(result, amphora, *args, **kwargs)

    Handle a failed post network plug.

class AmphoraPostVIPPlug(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to notify the amphora post VIP plug.

  execute(amphora, loadbalancer, amphorae_network_config)

    Execute post_vip_routine.

  revert(result, amphora, loadbalancer, *args, **kwargs)

    Handle a failed amphora vip plug notification.

class AmphoraUpdateVRRPInterface(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to get and update the VRRP interface device name from amphora.

  execute(amphora, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraVRRPStart(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to start keepalived on an amphora.

  This will reload keepalived if it is already running.

  execute(amphora, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraVRRPUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to update the VRRP configuration of an amphora.

  execute(loadbalancer_id, amphorae_network_config, amphora, amp_vrrp_int, timeout_dict=None)

    Execute update_vrrp_conf.

class AmphoraeGetConnectivityStatus(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task that checks amphorae connectivity status.

  Check and return the connectivity status of both amphorae in ACTIVE STANDBY load balancers

  execute(amphorae: List[dict], new_amphora_id: str, timeout_dict=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class AmphoraePostNetworkPlug(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to notify the amphorae post network plug.

  execute(loadbalancer, updated_ports, amphorae_network_config)

    Execute post_network_plug routine.

  revert(result, loadbalancer, updated_ports, *args, **kwargs)

    Handle a failed post network plug.

class AmphoraePostVIPPlug(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to notify the amphorae post VIP plug.

  execute(loadbalancer, amphorae_network_config)

    Execute post_vip_plug across the amphorae.

class BaseAmphoraTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to load drivers common to the tasks.

class ListenerDelete(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to delete the listener on the vip.

  execute(listener)

    Execute listener delete routines for an amphora.

  revert(listener, *args, **kwargs)

    Handle a failed listener delete.

class ListenersStart(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to start all listeners on the vip.

  execute(loadbalancer, amphora=None)

    Execute listener start routines for listeners on an amphora.

  revert(loadbalancer, *args, **kwargs)

    Handle failed listeners starts.

class ListenersUpdate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.amphora_driver_tasks.BaseAmphoraTask`

  Task to update amphora with all specified listeners’ configurations.

  execute(loadbalancer_id)

    Execute updates per listener for an amphora.

  revert(loadbalancer_id, *args, **kwargs)

    Handle failed listeners updates.

## octavia.controller.worker.v2.tasks.cert_task module

class BaseCertTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to load drivers common to the tasks.

class GenerateServerPEMTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.cert_task.BaseCertTask`

  Create the server certs for the agent comm

  Use the amphora_id for the CN

  execute(amphora_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

## octavia.controller.worker.v2.tasks.compute_tasks module

class AttachPort(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  execute(amphora, port)

    Attach a port to an amphora instance.

    Parameters

      - amphora – The amphora to attach the port to.

      - port – The port to attach to the amphora.

    Returns

      None

  revert(amphora, port, *args, **kwargs)

    Revert our port attach.

    Parameters

      - amphora – The amphora to detach the port from.

      - port – The port to attach to the amphora.

class BaseComputeTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to load drivers common to the tasks.

class CertComputeCreate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.ComputeCreate`

  execute(amphora_id, server_pem, server_group_id, build_type_priority=40, ports=None, flavor=None, availability_zone=None)

    Create an amphora

    Parameters

      availability_zone – availability zone metadata dictionary

    Returns

      an amphora

class ComputeCreate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  Create the compute instance for a new amphora.

  execute(amphora_id, server_group_id, config_drive_files=None, build_type_priority=40, ports=None, flavor=None, availability_zone=None)

    Create an amphora

    Parameters

      availability_zone – availability zone metadata dictionary

    Returns

      an amphora

  revert(result, amphora_id, *args, **kwargs)

    This method will revert the creation of the

    amphora. So it will just delete it in this flow

class ComputeDelete(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  execute(amphora, passive_failure=False)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class ComputeRetry(attempts=1, name=None, provides=None, requires=None, auto_extract=True, rebind=None, revert_all=False)

  Bases: `taskflow.retry.Times`

  on_failure(history, *args, **kwargs)

    Makes a decision about the future.

    This method will typically use information about prior failures (if this historical failure information is not available or was not persisted the provided history will be empty).

    Returns a retry constant (one of):

    - `RETRY`: when the controlling flow must be reverted and restarted again (for example with new parameters).

    - `REVERT`: when this controlling flow must be completely reverted and the parent flow (if any) should make a decision about further flow execution.

    - `REVERT_ALL`: when this controlling flow and the parent flow (if any) must be reverted and marked as a `FAILURE`.

class ComputeWait(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  Wait for the compute driver to mark the amphora active.

  execute(compute_id, amphora_id, availability_zone)

    Wait for the compute driver to mark the amphora active

    Parameters

      - compute_id – virtual machine UUID

      - amphora_id – id of the amphora object

      - availability_zone – availability zone metadata dictionary

    Raises

      Generic exception if the amphora is not active

    Returns

      An amphora object

class DeleteAmphoraeOnLoadBalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  Delete the amphorae on a load balancer.

  Iterate through amphorae, deleting them

  execute(loadbalancer)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class NovaServerGroupCreate(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  execute(loadbalancer_id)

    Create a server group by nova client api

    Parameters

      - loadbalancer_id – will be used for server group’s name

      - policy – will used for server group’s policy

    Raises

      Generic exception if the server group is not created

    Returns

      server group’s id

  revert(result, *args, **kwargs)

    This method will revert the creation of the

    Parameters

      result – here it refers to server group id

class NovaServerGroupDelete(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.compute_tasks.BaseComputeTask`

  execute(server_group_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

## octavia.controller.worker.v2.tasks.database_tasks module

class AssociateFailoverAmphoraWithLBID(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Associate failover amphora with loadbalancer in the database.

  execute(amphora_id, loadbalancer_id)

    Associate failover amphora with loadbalancer in the database.

    Parameters

      - amphora_id – Id of an amphora to update

      - loadbalancer_id – Id of a load balancer to be associated with a given amphora.

    Returns

      None

  revert(amphora_id, *args, **kwargs)

    Remove amphora-load balancer association.

    Parameters

      amphora_id – Id of an amphora that couldn’t be associated with a load balancer.

    Returns

      None

class BaseDatabaseTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to load drivers common to the tasks.

class CountPoolChildrenForQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Counts the pool child resources for quota management.

  Since the children of pools are cleaned up by the sqlalchemy cascade delete settings, we need to collect the quota counts for the child objects early.

  execute(pool_id)

    Count the pool child resources for quota management

    Parameters

      pool_id – pool_id of pool object to count children on

    Returns

      None

class CreateAmphoraInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to create an initial amphora in the Database.

  execute(*args, loadbalancer_id=None, **kwargs)

    Creates an pending create amphora record in the database.

    Returns

      The created amphora object

  revert(result, *args, **kwargs)

    Revert by storing the amphora in error state in the DB

    In a future version we might change the status to DELETED if deleting the amphora was successful

    Parameters

      result – Id of created amphora.

    Returns

      None

class CreateVRRPGroupForLB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Create a VRRP group for a load balancer.

  execute(loadbalancer_id)

    Create a VRRP group for a load balancer.

    Parameters

      loadbalancer_id – Load balancer ID for which a VRRP group should be created

class DecrementHealthMonitorQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the health monitor quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(project_id)

    Decrements the health monitor quota.

    Parameters

      project_id – The project_id to decrement the quota on.

    Returns

      None

  revert(project_id, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      project_id – The project_id to decrement the quota on.

    Returns

      None

class DecrementL7policyQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the l7policy quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Decrements the l7policy quota.

    Parameters

      l7policy – The l7policy to decrement the quota on.

    Returns

      None

  revert(l7policy, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      l7policy – The l7policy to decrement the quota on.

    Returns

      None

class DecrementL7ruleQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the l7rule quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Decrements the l7rule quota.

    Parameters

      l7rule – The l7rule to decrement the quota on.

    Returns

      None

  revert(l7rule, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      l7rule – The l7rule to decrement the quota on.

    Returns

      None

class DecrementListenerQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the listener quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(project_id)

    Decrements the listener quota.

    Parameters

      project_id – The project_id to decrement the quota on.

    Returns

      None

  revert(project_id, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      project_id – The project_id to decrement the quota on.

    Returns

      None

class DecrementLoadBalancerQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the load balancer quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(project_id)

    Decrements the load balancer quota.

    Parameters

      project_id – Project id where quota should be reduced

    Returns

      None

  revert(project_id, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      project_id – The project id to decrement the quota on.

    Returns

      None

class DecrementMemberQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the member quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(project_id)

    Decrements the member quota.

    Parameters

      member – The member to decrement the quota on.

    Returns

      None

  revert(project_id, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      member – The member to decrement the quota on.

    Returns

      None

class DecrementPoolQuota(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Decrements the pool quota for a project.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(project_id, pool_child_count)

    Decrements the pool quota.

    Parameters

      project_id – project_id where the pool to decrement the quota on

    Returns

      None

  revert(project_id, pool_child_count, result, *args, **kwargs)

    Re-apply the quota

    Parameters

      project_id – The id of project to decrement the quota on

    Returns

      None

class DeleteHealthMonitorInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the health monitor in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon)

    Delete the health monitor in DB

    Parameters

      health_mon – The health monitor which should be deleted

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor ERROR since the mark active couldn’t happen

    Parameters

      health_mon – The health monitor which couldn’t be deleted

    Returns

      None

class DeleteHealthMonitorInDBByPool(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.DeleteHealthMonitorInDB`

  Delete the health monitor in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Delete the health monitor in the DB.

    Parameters

      pool_id – ID of pool which health monitor should be deleted.

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the health monitor ERROR since the mark active couldn’t happen

    Parameters

      pool_id – ID of pool which health monitor couldn’t be deleted

    Returns

      None

class DeleteL7PolicyInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the L7 policy in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Delete the l7policy in DB

    Parameters

      l7policy – The l7policy to be deleted

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy ERROR since the delete couldn’t happen

    Parameters

      l7policy – L7 policy that failed to get deleted

    Returns

      None

class DeleteL7RuleInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the L7 rule in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Delete the l7rule in DB

    Parameters

      l7rule – The l7rule to be deleted

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the l7rule ERROR since the delete couldn’t happen

    Parameters

      l7rule – L7 rule that failed to get deleted

    Returns

      None

class DeleteListenerInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the listener in the DB.

  execute(listener)

    Delete the listener in DB

    Parameters

      listener – The listener to delete

    Returns

      None

  revert(listener, *args, **kwargs)

    Mark the listener ERROR since the listener didn’t delete

    Parameters

      listener – Listener that failed to get deleted

    Returns

      None

class DeleteMemberInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the member in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member)

    Delete the member in the DB

    Parameters

      member – The member to be deleted

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member ERROR since the delete couldn’t happen

    Parameters

      member – Member that failed to get deleted

    Returns

      None

class DeletePoolInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Delete the pool in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Delete the pool in DB

    Parameters

      pool_id – The pool_id to be deleted

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool ERROR since the delete couldn’t happen

    Parameters

      pool_id – pool_id that failed to get deleted

    Returns

      None

class DisableAmphoraHealthMonitoring(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Disable amphora health monitoring.

  This disables amphora health monitoring by removing it from the amphora_health table.

  execute(amphora)

    Disable health monitoring for an amphora

    Parameters

      amphora – The amphora to disable health monitoring for

    Returns

      None

class DisableLBAmphoraeHealthMonitoring(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Disable health monitoring on the LB amphorae.

  This disables amphora health monitoring by removing it from the amphora_health table for each amphora on a load balancer.

  execute(loadbalancer)

    Disable health monitoring for amphora on a load balancer

    Parameters

      loadbalancer – The load balancer to disable health monitoring on

    Returns

      None

class GetAmphoraDetails(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to retrieve amphora network details.

  execute(amphora)

    Retrieve amphora network details.

    Parameters

      amphora – Amphora which network details are required

    Returns

      Amphora data dict

class GetAmphoraeFromLoadbalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to pull the amphorae from a loadbalancer.

  execute(loadbalancer_id)

    Pull the amphorae from a loadbalancer.

    Parameters

      loadbalancer_id – Load balancer ID to get amphorae from

    Returns

      A list of Listener objects

class GetListenersFromLoadbalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to pull the listeners from a loadbalancer.

  execute(loadbalancer)

    Pull the listeners from a loadbalancer.

    Parameters

      loadbalancer – Load balancer which listeners are required

    Returns

      A list of Listener objects

class GetLoadBalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Get an load balancer object from the database.

  execute(loadbalancer_id, *args, **kwargs)

    Get an load balancer object from the database.

    Parameters

      loadbalancer_id – The load balancer ID to lookup

    Returns

      The load balancer object

class GetVipFromLoadbalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to pull the vip from a loadbalancer.

  execute(loadbalancer)

    Pull the vip from a loadbalancer.

    Parameters

      loadbalancer – Load balancer which VIP is required

    Returns

      VIP associated with a given load balancer

class MarkAmphoraAllocatedInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Will mark an amphora as allocated to a load balancer in the database.

  Assume sqlalchemy made sure the DB got retried sufficiently - so just abort

  execute(amphora, loadbalancer_id)

    Mark amphora as allocated to a load balancer in DB.

    Parameters

      - amphora – Amphora to be updated.

      - loadbalancer_id – Id of a load balancer to which an amphora should be allocated.

    Returns

      None

  revert(result, amphora, loadbalancer_id, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      - result – Execute task result

      - amphora – Amphora that was updated.

      - loadbalancer_id – Id of a load balancer to which an amphora failed to be allocated.

    Returns

      None

class MarkAmphoraBackupInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks._MarkAmphoraRoleAndPriorityInDB`

  Alter the amphora role to: Backup.

  execute(amphora)

    Mark amphora as BACKUP in db.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

  revert(result, amphora, *args, **kwargs)

    Removes amphora role association.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

class MarkAmphoraBootingInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the amphora as booting in the database.

  execute(amphora_id, compute_id)

    Mark amphora booting in DB.

    Parameters

      - amphora_id – Id of the amphora to update

      - compute_id – Id of a compute on which an amphora resides

    Returns

      None

  revert(result, amphora_id, compute_id, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      - result – Execute task result

      - amphora_id – Id of the amphora that failed to update

      - compute_id – Id of a compute on which an amphora resides

    Returns

      None

class MarkAmphoraDeletedInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the amphora deleted in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(amphora)

    Mark the amphora as deleted in DB.

    Parameters

      amphora – Amphora to be updated.

    Returns

      None

  revert(amphora, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      amphora – Amphora that was updated.

    Returns

      None

class MarkAmphoraHealthBusy(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark amphora health monitoring busy.

  This prevents amphora failover by marking the amphora busy in the amphora_health table.

  execute(amphora)

    Mark amphora health monitoring busy

    Parameters

      amphora – The amphora to mark amphora health busy

    Returns

      None

class MarkAmphoraMasterInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks._MarkAmphoraRoleAndPriorityInDB`

  Alter the amphora role to: MASTER.

  execute(amphora)

    Mark amphora as MASTER in db.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

  revert(result, amphora, *args, **kwargs)

    Removes amphora role association.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

class MarkAmphoraPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the amphora pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(amphora)

    Mark the amphora as pending delete in DB.

    Parameters

      amphora – Amphora to be updated.

    Returns

      None

  revert(amphora, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      amphora – Amphora that was updated.

    Returns

      None

class MarkAmphoraPendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the amphora pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(amphora)

    Mark the amphora as pending update in DB.

    Parameters

      amphora – Amphora to be updated.

    Returns

      None

  revert(amphora, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      amphora – Amphora that was updated.

    Returns

      None

class MarkAmphoraReadyInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  This task will mark an amphora as ready in the database.

  Assume sqlalchemy made sure the DB got retried sufficiently - so just abort

  execute(amphora)

    Mark amphora as ready in DB.

    Parameters

      amphora – Amphora to be updated.

    Returns

      None

  revert(amphora, *args, **kwargs)

    Mark the amphora as broken and ready to be cleaned up.

    Parameters

      amphora – Amphora that was updated.

    Returns

      None

class MarkAmphoraStandAloneInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks._MarkAmphoraRoleAndPriorityInDB`

  Alter the amphora role to: Standalone.

  execute(amphora)

    Mark amphora as STANDALONE in db.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

  revert(result, amphora, *args, **kwargs)

    Removes amphora role association.

    Parameters

      amphora – Amphora to update role.

    Returns

      None

class MarkHealthMonitorActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the health monitor ACTIVE in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon)

    Mark the health monitor ACTIVE in DB.

    Parameters

      health_mon – Health Monitor object to be updated

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor as broken

    Parameters

      health_mon – Health Monitor object that failed to update

    Returns

      None

class MarkHealthMonitorPendingCreateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the health monitor pending create in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon)

    Mark the health monitor as pending create in DB.

    Parameters

      health_mon – Health Monitor object to be updated

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor as broken

    Parameters

      health_mon – Health Monitor object that failed to update

    Returns

      None

class MarkHealthMonitorPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the health monitor pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon)

    Mark the health monitor as pending delete in DB.

    Parameters

      health_mon – Health Monitor object to be updated

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor as broken

    Parameters

      health_mon – Health Monitor object that failed to update

    Returns

      None

class MarkHealthMonitorPendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the health monitor pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon)

    Mark the health monitor as pending update in DB.

    Parameters

      health_mon – Health Monitor object to be updated

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor as broken

    Parameters

      health_mon – Health Monitor object that failed to update

    Returns

      None

class MarkHealthMonitorsOnlineInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark all enabled health monitors Online

  Parameters

    loadbalancer – Dictionary of a Load Balancer that has associated health monitors

  Returns

    None

  execute(loadbalancer: dict)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class MarkL7PolicyActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7policy ACTIVE in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Mark the l7policy ACTIVE in DB.

    Parameters

      l7policy – L7Policy object to be updated

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy as broken

    Parameters

      l7policy – L7Policy object that failed to update

    Returns

      None

class MarkL7PolicyPendingCreateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7policy pending create in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Mark the l7policy as pending create in DB.

    Parameters

      l7policy – L7Policy object to be updated

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy as broken

    Parameters

      l7policy – L7Policy object that failed to update

    Returns

      None

class MarkL7PolicyPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7policy pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Mark the l7policy as pending delete in DB.

    Parameters

      l7policy – L7Policy object to be updated

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy as broken

    Parameters

      l7policy – L7Policy object that failed to update

    Returns

      None

class MarkL7PolicyPendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7policy pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy)

    Mark the l7policy as pending update in DB.

    Parameters

      l7policy – L7Policy object to be updated

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy as broken

    Parameters

      l7policy – L7Policy object that failed to update

    Returns

      None

class MarkL7RuleActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7rule ACTIVE in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Mark the l7rule ACTIVE in DB.

    Parameters

      l7rule – L7Rule object to be updated

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the l7rule as broken

    Parameters

      l7rule – L7Rule object that failed to update

    Returns

      None

class MarkL7RulePendingCreateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7rule pending create in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Mark the l7rule as pending create in DB.

    Parameters

      l7rule – L7Rule object to be updated

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the l7rule as broken

    Parameters

      l7rule – L7Rule object that failed to update

    Returns

      None

class MarkL7RulePendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7rule pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Mark the l7rule as pending delete in DB.

    Parameters

      l7rule – L7Rule object to be updated

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the l7rule as broken

    Parameters

      l7rule – L7Rule object that failed to update

    Returns

      None

class MarkL7RulePendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the l7rule pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule)

    Mark the l7rule as pending update in DB.

    Parameters

      l7rule – L7Rule object to be updated

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the l7rule as broken

    Parameters

      l7rule – L7Rule object that failed to update

    Returns

      None

class MarkLBActiveInDB(mark_subobjects=False, **kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the load balancer active in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(loadbalancer)

    Mark the load balancer as active in DB.

    This also marks ACTIVE all sub-objects of the load balancer if self.mark_subobjects is True.

    Parameters

      loadbalancer – Load balancer object to be updated

    Returns

      None

  revert(loadbalancer, *args, **kwargs)

    Mark the load balancer as broken and ready to be cleaned up.

    This also puts all sub-objects of the load balancer to ERROR state if self.mark_subobjects is True

    Parameters

      loadbalancer – Load balancer object that failed to update

    Returns

      None

class MarkLBActiveInDBByListener(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the load balancer active in the DB using a listener dict.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(listener)

    Mark the load balancer as active in DB.

    Parameters

      listener – Listener dictionary

    Returns

      None

class MarkLBAmphoraeDeletedInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Task to mark a list of amphora deleted in the Database.

  execute(loadbalancer)

    Update load balancer’s amphorae statuses to DELETED in the database.

    Parameters

      loadbalancer – The load balancer which amphorae should be marked DELETED.

    Returns

      None

class MarkLBAmphoraeHealthBusy(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark amphorae health monitoring busy for the LB.

  This prevents amphorae failover by marking each amphora of a given load balancer busy in the amphora_health table.

  execute(loadbalancer)

    Marks amphorae health busy for each amphora on a load balancer

    Parameters

      loadbalancer – The load balancer to mark amphorae health busy

    Returns

      None

class MarkLBAndListenersActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the load balancer and specified listeners active in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(loadbalancer_id, listeners)

    Mark the load balancer and listeners as active in DB.

    Parameters

      - loadbalancer_id – The load balancer ID to be updated

      - listeners – Listener objects to be updated

    Returns

      None

  revert(loadbalancer_id, listeners, *args, **kwargs)

    Mark the load balancer and listeners as broken.

    Parameters

      - loadbalancer_id – The load balancer ID to be updated

      - listeners – Listener objects that failed to update

    Returns

      None

class MarkLBDeletedInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the load balancer deleted in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(loadbalancer)

    Mark the load balancer as deleted in DB.

    Parameters

      loadbalancer – Load balancer object to be updated

    Returns

      None

class MarkLBPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the load balancer pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(loadbalancer)

    Mark the load balancer as pending delete in DB.

    Parameters

      loadbalancer – Load balancer object to be updated

    Returns

      None

class MarkListenerDeletedInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the listener deleted in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(listener)

    Mark the listener as deleted in DB

    Parameters

      listener – The listener to be marked deleted

    Returns

      None

  revert(listener, *args, **kwargs)

    Mark the listener ERROR since the delete couldn’t happen

    Parameters

      listener – The listener that couldn’t be updated

    Returns

      None

class MarkListenerPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the listener pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(listener)

    Mark the listener as pending delete in DB.

    Parameters

      listener – The listener to be updated

    Returns

      None

  revert(listener, *args, **kwargs)

    Mark the listener as broken and ready to be cleaned up.

    Parameters

      listener – The listener that couldn’t be updated

    Returns

      None

class MarkMemberActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the member ACTIVE in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member)

    Mark the member ACTIVE in DB.

    Parameters

      member – Member object to be updated

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member as broken

    Parameters

      member – Member object that failed to update

    Returns

      None

class MarkMemberPendingCreateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the member pending create in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member)

    Mark the member as pending create in DB.

    Parameters

      member – Member object to be updated

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member as broken

    Parameters

      member – Member object that failed to update

    Returns

      None

class MarkMemberPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the member pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member)

    Mark the member as pending delete in DB.

    Parameters

      member – Member object to be updated

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member as broken

    Parameters

      member – Member object that failed to update

    Returns

      None

class MarkMemberPendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the member pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member)

    Mark the member as pending update in DB.

    Parameters

      member – Member object to be updated

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member as broken

    Parameters

      member – Member object that failed to update

    Returns

      None

class MarkPoolActiveInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the pool ACTIVE in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Mark the pool ACTIVE in DB.

    Parameters

      pool_id – pool_id to be updated

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool as broken

    Parameters

      pool_id – pool_id that failed to update

    Returns

      None

class MarkPoolPendingCreateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the pool pending create in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Mark the pool as pending create in DB.

    Parameters

      pool_id – pool_id of pool object to be updated

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool as broken

    Parameters

      pool_id – pool_id of pool object that failed to update

    Returns

      None

class MarkPoolPendingDeleteInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the pool pending delete in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Mark the pool as pending delete in DB.

    Parameters

      pool_id – pool_id of pool object to be updated

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool as broken

    Parameters

      pool_id – pool_id of pool object that failed to update

    Returns

      None

class MarkPoolPendingUpdateInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Mark the pool pending update in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id)

    Mark the pool as pending update in DB.

    Parameters

      pool_id – pool_id of pool object to be updated

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool as broken

    Parameters

      pool_id – pool_id of pool object that failed to update

    Returns

      None

class ReloadAmphora(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Get an amphora object from the database.

  execute(amphora)

    Get an amphora object from the database.

    Parameters

      amphora_id – The amphora ID to lookup

    Returns

      The amphora object

class ReloadLoadBalancer(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Get an load balancer object from the database.

  execute(loadbalancer_id, *args, **kwargs)

    Get an load balancer object from the database.

    Parameters

      loadbalancer_id – The load balancer ID to lookup

    Returns

      The load balancer object

class UpdateAmpFailoverDetails(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update amphora failover details in the database.

  execute(amphora, vip, base_port)

    Update amphora failover details in the database.

    Parameters

      - amphora – The amphora to update

      - vip – The VIP object associated with this amphora.

      - base_port – The base port object associated with the amphora.

    Returns

      None

class UpdateAmphoraCertBusyToFalse(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the amphora cert_busy flag to be false.

  execute(amphora_id)

    Update the amphora cert_busy flag to be false.

    Parameters

      amphora – Amphora to be updated.

    Returns

      None

class UpdateAmphoraComputeId(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Associate amphora with a compute in DB.

  execute(amphora_id, compute_id)

    Associate amphora with a compute in DB.

    Parameters

      - amphora_id – Id of the amphora to update

      - compute_id – Id of a compute on which an amphora resides

    Returns

      None

class UpdateAmphoraDBCertExpiration(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the amphora expiration date with new cert file date.

  execute(amphora_id, server_pem)

    Update the amphora expiration date with new cert file date.

    Parameters

      - amphora_id – Id of the amphora to update

      - server_pem – Certificate in PEM format

    Returns

      None

class UpdateAmphoraInfo(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update amphora with compute instance details.

  execute(amphora_id, compute_obj)

    Update amphora with compute instance details.

    Parameters

      - amphora_id – Id of the amphora to update

      - compute_obj – Compute on which an amphora resides

    Returns

      Updated amphora object

class UpdateAmphoraVIPData(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update amphorae VIP data.

  execute(amp_data)

    Update amphorae VIP data.

    Parameters

      amps_data – Amphorae update dicts.

    Returns

      None

class UpdateAmphoraeVIPData(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update amphorae VIP data.

  execute(amps_data)

    Update amphorae VIP data.

    Parameters

      amps_data – Amphorae update dicts.

    Returns

      None

class UpdateHealthMonInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the health monitor in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(health_mon, update_dict)

    Update the health monitor in the DB

    Parameters

      - health_mon – The health monitor to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(health_mon, *args, **kwargs)

    Mark the health monitor ERROR since the update couldn’t happen

    Parameters

      health_mon – The health monitor that couldn’t be updated

    Returns

      None

class UpdateL7PolicyInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the L7 policy in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7policy, update_dict)

    Update the L7 policy in the DB

    Parameters

      - l7policy – The L7 policy to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(l7policy, *args, **kwargs)

    Mark the l7policy ERROR since the update couldn’t happen

    Parameters

      l7policy – L7 policy that couldn’t be updated

    Returns

      None

class UpdateL7RuleInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the L7 rule in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(l7rule, update_dict)

    Update the L7 rule in the DB

    Parameters

      - l7rule – The L7 rule to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(l7rule, *args, **kwargs)

    Mark the L7 rule ERROR since the update couldn’t happen

    Parameters

      l7rule – L7 rule that couldn’t be updated

    Returns

      None

class UpdateLBServerGroupInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the server group id info for load balancer in DB.

  execute(loadbalancer_id, server_group_id)

    Update the server group id info for load balancer in DB.

    Parameters

      - loadbalancer_id – Id of a load balancer to update

      - server_group_id – Id of a server group to associate with the load balancer

    Returns

      None

  revert(loadbalancer_id, server_group_id, *args, **kwargs)

    Remove server group information from a load balancer in DB.

    Parameters

      - loadbalancer_id – Id of a load balancer that failed to update

      - server_group_id – Id of a server group that couldn’t be associated with the load balancer

    Returns

      None

class UpdateListenerInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the listener in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(listener, update_dict)

    Update the listener in the DB

    Parameters

      - listener – The listener to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(listener, *args, **kwargs)

    Mark the listener ERROR since the update couldn’t happen

    Parameters

      listener – The listener that couldn’t be updated

    Returns

      None

class UpdateLoadbalancerInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the loadbalancer in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(loadbalancer, update_dict)

    Update the loadbalancer in the DB

    Parameters

      - loadbalancer – The load balancer to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

class UpdateMemberInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the member in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(member, update_dict)

    Update the member in the DB

    Parameters

      - member – The member to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(member, *args, **kwargs)

    Mark the member ERROR since the update couldn’t happen

    Parameters

      member – The member that couldn’t be updated

    Returns

      None

class UpdatePoolInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update the pool in the DB.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id, update_dict)

    Update the pool in the DB

    Parameters

      - pool_id – The pool_id to be updated

      - update_dict – The dictionary of updates to apply

    Returns

      None

  revert(pool_id, *args, **kwargs)

    Mark the pool ERROR since the update couldn’t happen

    Parameters

      pool_id – The pool_id that couldn’t be updated

    Returns

      None

class UpdatePoolMembersOperatingStatusInDB(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Updates the members of a pool operating status.

  Since sqlalchemy will likely retry by itself always revert if it fails

  execute(pool_id, operating_status)

    Update the members of a pool operating status in DB.

    Parameters

      - pool_id – pool_id of pool object to be updated

      - operating_status – Operating status to set

    Returns

      None

class UpdateVIPAfterAllocation(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.database_tasks.BaseDatabaseTask`

  Update a VIP associated with a given load balancer.

  execute(loadbalancer_id, vip)

    Update a VIP associated with a given load balancer.

    Parameters

      - loadbalancer_id – Id of a load balancer which VIP should be updated.

      - vip – data_models.Vip object with update data.

    Returns

      The load balancer object.

## octavia.controller.worker.v2.tasks.lifecycle_tasks module

class AmphoraIDToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to checkpoint Amphora lifecycle milestones.

  execute(amphora_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(amphora_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class AmphoraToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.AmphoraIDToErrorOnRevertTask`

  Task to checkpoint Amphora lifecycle milestones.

  execute(amphora)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(amphora, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class BaseLifecycleTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to instansiate common classes.

class HealthMonitorToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a member to ERROR on revert.

  execute(health_mon, listeners, loadbalancer)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(health_mon, listeners, loadbalancer, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class L7PolicyToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a l7policy to ERROR on revert.

  execute(l7policy, listeners, loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(l7policy, listeners, loadbalancer_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class L7RuleToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a l7rule to ERROR on revert.

  execute(l7rule, l7policy_id, listeners, loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(l7rule, l7policy_id, listeners, loadbalancer_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class ListenerToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a listener to ERROR on revert.

  execute(listener)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(listener, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class ListenersToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a listener to ERROR on revert.

  execute(listeners)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(listeners, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class LoadBalancerIDToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set the load balancer to ERROR on revert.

  execute(loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(loadbalancer_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class LoadBalancerToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.LoadBalancerIDToErrorOnRevertTask`

  Task to set the load balancer to ERROR on revert.

  execute(loadbalancer)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(loadbalancer, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class MemberToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a member to ERROR on revert.

  execute(member, listeners, loadbalancer, pool_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(member, listeners, loadbalancer, pool_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class MembersToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set members to ERROR on revert.

  execute(members, listeners, loadbalancer, pool_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(members, listeners, loadbalancer, pool_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class PoolToErrorOnRevertTask(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.lifecycle_tasks.BaseLifecycleTask`

  Task to set a pool to ERROR on revert.

  execute(pool_id, listeners, loadbalancer)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(pool_id, listeners, loadbalancer, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

## octavia.controller.worker.v2.tasks.network_tasks module

class AdminDownPort(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  execute(port_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(result, port_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class AllocateVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to allocate a VIP.

  execute(loadbalancer)

    Allocate a vip to the loadbalancer.

  revert(result, loadbalancer, *args, **kwargs)

    Handle a failure to allocate vip.

class AllocateVIPforFailover(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.AllocateVIP`

  Task to allocate/validate the VIP for a failover flow.

  revert(result, loadbalancer, *args, **kwargs)

    Handle a failure to allocate vip.

class ApplyQos(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Apply Quality of Services to the VIP

  execute(loadbalancer, amps_data=None, update_dict=None)

    Apply qos policy on the vrrp ports which are related with vip.

  revert(result, loadbalancer, amps_data=None, update_dict=None, *args, **kwargs)

    Handle a failure to apply QoS to VIP

class ApplyQosAmphora(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Apply Quality of Services to the VIP

  execute(loadbalancer, amp_data=None, update_dict=None)

    Apply qos policy on the vrrp ports which are related with vip.

  revert(result, loadbalancer, amp_data=None, update_dict=None, *args, **kwargs)

    Handle a failure to apply QoS to VIP

class BaseNetworkTask(**kwargs)

  Bases: `taskflow.task.Task`

  Base task to load drivers common to the tasks.

  property network_driver

class CalculateAmphoraDelta(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  default_provides = 'delta'
  execute(loadbalancer, amphora, availability_zone)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class CalculateDelta(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to calculate the delta between

  the nics on the amphora and the ones we need. Returns a list for plumbing them.

  default_provides = 'deltas'
  execute(loadbalancer, availability_zone)

    Compute which NICs need to be plugged

    for the amphora to become operational.

    Parameters

      - loadbalancer – the loadbalancer to calculate deltas for all amphorae

      - availability_zone – availability zone metadata dict

    Returns

      dict of octavia.network.data_models.Delta keyed off amphora id

class CreateVIPBasePort(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to create the VIP base port for an amphora.

  execute(vip, vip_sg_id, amphora_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

  revert(result, vip, vip_sg_id, amphora_id, *args, **kwargs)

    Revert this atom.

    This method should undo any side-effects caused by previous execution of the atom using the result of the `execute()` method and information on the failure which triggered reversion of the flow the atom is contained in (if applicable).

    Parameters

      - args – positional arguments that the atom required to execute.

      - kwargs – any keyword arguments that the atom required to execute; the special key `'result'` will contain the `execute()` result (if any) and the `**kwargs` key `'flow_failures'` will contain any failure information.

class DeallocateVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to deallocate a VIP.

  execute(loadbalancer)

    Deallocate a VIP.

class DeletePort(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to delete a network port.

  execute(port_id, passive_failure=False)

    Delete the network port.

class FailoverPreparationForAmphora(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to prepare an amphora for failover.

  execute(amphora)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class GetAmphoraNetworkConfigs(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to retrieve amphora network details.

  execute(loadbalancer, amphora=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class GetAmphoraNetworkConfigsByID(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to retrieve amphora network details.

  execute(loadbalancer_id, amphora_id=None)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class GetAmphoraeNetworkConfigs(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to retrieve amphorae network details.

  execute(loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class GetMemberPorts(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  execute(loadbalancer, amphora)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class GetPlumbedNetworks(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to figure out the NICS on an amphora.

  This will likely move into the amphora driver :returns: Array of networks

  default_provides = 'nics'
  execute(amphora)

    Get plumbed networks for the amphora.

class GetSubnetFromVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plumb a VIP.

  execute(loadbalancer)

    Plumb a vip to an amphora.

class GetVIPSecurityGroupID(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  execute(loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class HandleNetworkDelta(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plug and unplug networks

  Plug or unplug networks based on delta

  execute(amphora, delta)

    Handle network plugging based off deltas.

  revert(result, amphora, delta, *args, **kwargs)

    Handle a network plug or unplug failures.

class HandleNetworkDeltas(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plug and unplug networks

  Loop through the deltas and plug or unplug networks based on delta

  execute(deltas, loadbalancer)

    Handle network plugging based off deltas.

  revert(result, deltas, *args, **kwargs)

    Handle a network plug or unplug failures.

class PlugNetworks(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plug the networks.

  This uses the delta to add all missing networks/nics

  execute(amphora, delta)

    Update the amphora networks for the delta.

  revert(amphora, delta, *args, **kwargs)

    Handle a failed network plug by removing all nics added.

class PlugPorts(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plug neutron ports into a compute instance.

  execute(amphora, ports)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class PlugVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plumb a VIP.

  execute(loadbalancer)

    Plumb a vip to an amphora.

  revert(result, loadbalancer, *args, **kwargs)

    Handle a failure to plumb a vip.

class PlugVIPAmphora(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to plumb a VIP.

  execute(loadbalancer, amphora, subnet)

    Plumb a vip to an amphora.

  revert(result, loadbalancer, amphora, subnet, *args, **kwargs)

    Handle a failure to plumb a vip.

class RetrievePortIDsOnAmphoraExceptLBNetwork(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task retrieving all the port ids on an amphora, except lb network.

  execute(amphora)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class UnPlugNetworks(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to unplug the networks

  Loop over all nics and unplug them based on delta

  execute(amphora, delta)

    Unplug the networks.

class UnplugVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to unplug the vip.

  execute(loadbalancer)

    Unplug the vip.

class UpdateVIP(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to update a VIP.

  execute(listeners)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class UpdateVIPForDelete(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to update a VIP for listener delete flows.

  execute(loadbalancer_id)

    Activate a given atom which will perform some operation and return.

    This method can be used to perform an action on a given set of input requirements (passed in via `*args` and `**kwargs`) to accomplish some type of operation. This operation may provide some named outputs/results as a result of it executing for later reverting (or for other atoms to depend on).

    NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).

    Parameters

      - args – positional arguments that atom requires to execute.

      - kwargs – any keyword arguments that atom requires to execute.

class UpdateVIPSecurityGroup(**kwargs)

  Bases: `octavia.controller.worker.v2.tasks.network_tasks.BaseNetworkTask`

  Task to setup SG for LB.

  execute(loadbalancer_id)

    Task to setup SG for LB.

## octavia.controller.worker.v2.tasks.retry_tasks module

class SleepingRetryTimesController(attempts=1, name=None, provides=None, requires=None, auto_extract=True, rebind=None, revert_all=False, interval=1)

  Bases: `taskflow.retry.Times`

  A retry controller to attempt subflow retries a number of times.

  This retry controller overrides the Times on_failure to inject a sleep interval between retries. It also adds a log message when all of the retries are exhausted.

  Parameters

    - attempts (int) – number of attempts to retry the associated subflow before giving up

    - name – Meaningful name for this atom, should be something that is distinguishable and understandable for notification, debugging, storing and any other similar purposes.

    - provides – A set, string or list of items that this will be providing (or could provide) to others, used to correlate and associate the thing/s this atom produces, if it produces anything at all.

    - requires – A set or list of required inputs for this atom’s `execute` method.

    - rebind – A dict of key/value pairs used to define argument name conversions for inputs to this atom’s `execute` method.

    - revert_all (bool) – when provided this will cause the full flow to revert when the number of attempts that have been tried has been reached (when false, it will only locally revert the associated subflow)

    - interval (int) – Interval, in seconds, between retry attempts.

  on_failure(history, *args, **kwargs)

    Makes a decision about the future.

    This method will typically use information about prior failures (if this historical failure information is not available or was not persisted the provided history will be empty).

    Returns a retry constant (one of):

    - `RETRY`: when the controlling flow must be reverted and restarted again (for example with new parameters).

    - `REVERT`: when this controlling flow must be completely reverted and the parent flow (if any) should make a decision about further flow execution.

    - `REVERT_ALL`: when this controlling flow and the parent flow (if any) must be reverted and marked as a `FAILURE`.

  revert(history, *args, **kwargs)

    Reverts this retry.

    On revert call all results that had been provided by previous tries and all errors caused during reversion are provided. This method will be called only if a subflow must be reverted without the retry (that is to say that the controller has ran out of resolution options and has either given up resolution or has failed to handle a execution failure).

    Parameters

      - args – positional arguments that the retry required to execute.

      - kwargs – any keyword arguments that the retry required to execute.

## Module contents

this page last updated: 2026-03-10 21:33:29

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