cinder.volume.flows.manager.manage_existing module¶
- class ManageExistingTask(db, driver)¶
Bases:
CinderTask
Brings an existing volume under Cinder management.
- default_provides = {'volume'}¶
- execute(context, volume, manage_existing_ref, size)¶
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 PrepareForQuotaReservationTask(db, driver)¶
Bases:
CinderTask
Gets the volume size from the driver.
- default_provides = {'size', 'volume_properties', 'volume_spec', 'volume_type_id'}¶
- execute(context, volume, manage_existing_ref)¶
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(context, result, flow_failures, volume, **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 theexecute()
result (if any) and the**kwargs
key'flow_failures'
will contain any failure information.
- get_flow(context, db, driver, host, volume, ref)¶
Constructs and returns the manager entrypoint flow.