diff --git a/cinderclient/v1/qos_specs.py b/cinderclient/v1/qos_specs.py index b4e4272ae..c7944cb48 100644 --- a/cinderclient/v1/qos_specs.py +++ b/cinderclient/v1/qos_specs.py @@ -86,7 +86,7 @@ class QoSSpecsManager(base.ManagerWithFind): return self._create("/qos-specs", body, "qos_specs") def set_keys(self, qos_specs, specs): - """Update a qos specs with new specifications. + """Add/Update keys in a qos_specs. :param qos_specs: The ID of qos specs :param specs: A dict of key/value pairs to be set @@ -101,7 +101,7 @@ class QoSSpecsManager(base.ManagerWithFind): return self._update("/qos-specs/%s" % qos_specs, body) def unset_keys(self, qos_specs, specs): - """Update a qos specs with new specifications. + """Remove keys from a qos specs. :param qos_specs: The ID of qos specs :param specs: A list of key to be unset diff --git a/cinderclient/v1/volume_snapshots.py b/cinderclient/v1/volume_snapshots.py index 3b1e17c80..6ce8ecc87 100644 --- a/cinderclient/v1/volume_snapshots.py +++ b/cinderclient/v1/volume_snapshots.py @@ -56,7 +56,7 @@ class Snapshot(base.Resource): return self._info.get('os-extended-snapshot-attributes:project_id') def reset_state(self, state): - """Update the snapshot with the privided state.""" + """Update the snapshot with the provided state.""" self.manager.reset_state(self, state) def set_metadata(self, metadata): diff --git a/cinderclient/v2/qos_specs.py b/cinderclient/v2/qos_specs.py index b4e4272ae..948fc0648 100644 --- a/cinderclient/v2/qos_specs.py +++ b/cinderclient/v2/qos_specs.py @@ -86,7 +86,7 @@ class QoSSpecsManager(base.ManagerWithFind): return self._create("/qos-specs", body, "qos_specs") def set_keys(self, qos_specs, specs): - """Update a qos specs with new specifications. + """Add/Update keys in qos specs. :param qos_specs: The ID of qos specs :param specs: A dict of key/value pairs to be set @@ -101,7 +101,7 @@ class QoSSpecsManager(base.ManagerWithFind): return self._update("/qos-specs/%s" % qos_specs, body) def unset_keys(self, qos_specs, specs): - """Update a qos specs with new specifications. + """Remove keys from a qos specs. :param qos_specs: The ID of qos specs :param specs: A list of key to be unset diff --git a/cinderclient/v2/volume_snapshots.py b/cinderclient/v2/volume_snapshots.py index 90ea1cfcc..21ce24510 100644 --- a/cinderclient/v2/volume_snapshots.py +++ b/cinderclient/v2/volume_snapshots.py @@ -107,7 +107,6 @@ class SnapshotManager(base.ManagerWithFind): :rtype: list of :class:`Snapshot` """ - if search_opts is None: search_opts = {} diff --git a/cinderclient/v2/volumes.py b/cinderclient/v2/volumes.py index 28e812954..b1ce3bc8d 100644 --- a/cinderclient/v2/volumes.py +++ b/cinderclient/v2/volumes.py @@ -115,10 +115,10 @@ class Volume(base.Resource): def extend(self, volume, new_size): """Extend the size of the specified volume. + :param volume: The UUID of the volume to extend :param new_size: The desired size to extend volume to. """ - self.manager.extend(self, new_size) def migrate_volume(self, host, force_host_copy): @@ -196,8 +196,7 @@ class VolumeManager(base.ManagerWithFind): :param scheduler_hints: (optional extension) arbitrary key-value pairs specified by the client to help boot an instance :rtype: :class:`Volume` - """ - + """ if metadata is None: volume_metadata = {} else: @@ -480,6 +479,10 @@ class VolumeManager(base.ManagerWithFind): 'disk_format': disk_format}) def force_delete(self, volume): + """Delete the specified volume ignoring its current state. + + :param volume: The :class:`Volume` to force-delete. + """ return self._action('os-force_delete', base.getid(volume)) def reset_state(self, volume, state): @@ -487,6 +490,11 @@ class VolumeManager(base.ManagerWithFind): return self._action('os-reset_status', volume, {'status': state}) def extend(self, volume, new_size): + """Extend the size of the specified volume. + + :param volume: The UUID of the volume to extend. + :param new_size: The requested size to extend volume to. + """ return self._action('os-extend', base.getid(volume), {'new_size': new_size}) @@ -507,7 +515,6 @@ class VolumeManager(base.ManagerWithFind): :param host: The destination host :param force_host_copy: Skip driver optimizations """ - return self._action('os-migrate_volume', volume, {'host': host, 'force_host_copy': force_host_copy}) @@ -519,7 +526,6 @@ class VolumeManager(base.ManagerWithFind): :param new_volume: The new temporary :class:`Volume` in the migration :param error: Inform of an error to cause migration cleanup """ - new_volume_id = base.getid(new_volume) return self._action('os-migrate_volume_completion', old_volume,