The cinder.volume.flows.api.manage_existing Module

class EntryCreateTask(db)

Bases: cinder.flow_utils.CinderTask

Creates an entry for the given volume creation in the database.

Reversion strategy: remove the volume_id created from the database.

default_provides = set(['volume', 'volume_properties'])
execute(context, **kwargs)

Creates a database entry for the given inputs and returns details.

Accesses the database and creates a new entry for the to be created volume using the given volume properties which are extracted from the input kwargs.

revert(context, result, optional_args=None, **kwargs)
class ManageCastTask(scheduler_rpcapi, db)

Bases: cinder.flow_utils.CinderTask

Performs a volume manage cast to the scheduler and to the volume manager.

This which will signal a transition of the api workflow to another child and/or related workflow.

execute(context, volume, **kwargs)
revert(context, result, flow_failures, volume, **kwargs)
get_flow(scheduler_rpcapi, db_api, create_what)

Constructs and returns the api entrypoint flow.

This flow will do the following:

  1. Inject keys & values for dependent tasks.
  2. Extracts and validates the input keys & values.
  3. Creates the database entry.
  4. Casts to volume manager and scheduler for further processing.