Merge "Fixed typos and repeated docstrings"
This commit is contained in:
@@ -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
|
||||
|
@@ -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):
|
||||
|
@@ -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
|
||||
|
@@ -107,7 +107,6 @@ class SnapshotManager(base.ManagerWithFind):
|
||||
|
||||
:rtype: list of :class:`Snapshot`
|
||||
"""
|
||||
|
||||
if search_opts is None:
|
||||
search_opts = {}
|
||||
|
||||
|
@@ -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):
|
||||
@@ -197,7 +197,6 @@ class VolumeManager(base.ManagerWithFind):
|
||||
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,
|
||||
|
Reference in New Issue
Block a user