CreateVolumeFromSpecTask
(manager, db, driver, image_volume_cache=None)¶Bases: cinder.flow_utils.CinderTask
Creates a volume from a provided specification.
Reversion strategy: N/A
default_provides
= 'volume_spec'¶execute
(context, volume, volume_spec)¶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: |
|
---|
CreateVolumeOnFinishTask
(db, event_suffix)¶Bases: cinder.volume.flows.manager.create_volume.NotifyVolumeActionTask
On successful volume creation this will perform final volume actions.
When a volume is created successfully it is expected that MQ notifications and database updates will occur to ‘signal’ to others that the volume is now ready for usage. This task does those notifications and updates in a reliable manner (not re-raising exceptions if said actions can not be triggered).
Reversion strategy: N/A
execute
(context, volume, volume_spec)¶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: |
|
---|
ExtractVolumeRefTask
(db, host, set_error=True)¶Bases: cinder.flow_utils.CinderTask
Extracts volume reference for given volume id.
default_provides
= 'refreshed'¶execute
(context, volume)¶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: |
|
---|
revert
(context, volume, result, **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: |
|
---|
ExtractVolumeSpecTask
(db)¶Bases: cinder.flow_utils.CinderTask
Extracts a spec of a volume to be created into a common structure.
This task extracts and organizes the input requirements into a common and easier to analyze structure for later tasks to use. It will also attach the underlying database volume reference which can be used by other tasks to reference for further details about the volume to be.
Reversion strategy: N/A
default_provides
= 'volume_spec'¶execute
(context, volume, request_spec)¶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: |
|
---|
revert
(context, result, **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: |
|
---|
NotifyVolumeActionTask
(db, event_suffix)¶Bases: cinder.flow_utils.CinderTask
Performs a notification about the given volume when called.
Reversion strategy: N/A
execute
(context, volume)¶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: |
|
---|
OnFailureRescheduleTask
(reschedule_context, db, driver, scheduler_rpcapi, do_reschedule)¶Bases: cinder.flow_utils.CinderTask
Triggers a rescheduling request to be sent when reverting occurs.
If rescheduling doesn’t occur this task errors out the volume.
Reversion strategy: Triggers the rescheduling mechanism whereby a cast gets sent to the scheduler rpc api to allow for an attempt X of Y for scheduling this volume elsewhere.
execute
(**kwargs)¶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: |
|
---|
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: |
|
---|
get_flow
(context, manager, db, driver, scheduler_rpcapi, host, volume, allow_reschedule, reschedule_context, request_spec, filter_properties, image_volume_cache=None)¶Constructs and returns the manager entrypoint flow.
This flow will do the following:
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.