Volume actions

1. extend_size(volume_id, **attrs)

extend the size

Parameters:

Name Type Description
volume_id string target volume’s id
new_size int should be bigger than the big one

Parameters example:

cloud.volumev2.extend_size(volume.id, new_size=45)

Return value: None

2. reset_statuses(volume_id, **attrs)

reset the statuses

Parameters:

Name Type Description
volume_id string target volume’s id
status (Optional) xsd:string The volume status.
attach_status (Optional) xsd:string The volume attach status.
migration_status (Optional) xsd:string The volume migration status.

Return value: None

3. set_image_metadata(volume_id, **attrs)

set the image metadata

Parameters:

Name Type Description
volume_id string target volume’s id
metadata xsd:dict The image metadata to add to the volume as a set of metadata key and value pairs.

Parameters example:

metadata = {
  ‘image_id’ : ‘hi’
}
cloud.volumev2.set_image_metadata(volume.id, metadata=metadata)

Return value: None

4. remove_image_metadata(volume_id, **attrs)

remove the image metadata

Parameters:

Name Type Description
volume_id string target volume’s id
key xsd:string The metadata key name for the metadata that you want to remove

Return value: None

5. attach_to_server(volume_id, **attrs)

attach to server

Parameters:

Name Type Description
volume_id string target volume’s id
instance_uuid (Optional) csapi:UUID The UUID of the attaching instance.
host_name (Optional) xsd:string The name of the attaching host.
mountpoint (Optional) xsd:string The attaching mount point.

Return value: None

6. unmanage(volume_id)

Removes a volume from Block Storage management without removing the back-end storage object

Parameters:

Name Type Description
volume_id string target volume’s id

Return value: None

7. force_detach(volume_id, **attrs)

Forces a volume to detach

Parameters:

Name Type Description
volume_id string target volume’s id
connector xsd:dict The connector object.
attachment_id (Optional) csapi:UUID The interface ID

Return value: None

  1. promote_replicated(volume_id) Promotes a replicated volume.

Parameters:

Name Type Description
volume_id string target volume’s id

Return value: None

9. reenable_replication(volume_id)

Re-enables replication of a volume

Parameters:

Name Type Description
volume_id string target volume’s id

Return value: None

results matching ""

    No results matching ""