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")
|
return self._create("/qos-specs", body, "qos_specs")
|
||||||
|
|
||||||
def set_keys(self, qos_specs, 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 qos_specs: The ID of qos specs
|
||||||
:param specs: A dict of key/value pairs to be set
|
: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)
|
return self._update("/qos-specs/%s" % qos_specs, body)
|
||||||
|
|
||||||
def unset_keys(self, qos_specs, specs):
|
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 qos_specs: The ID of qos specs
|
||||||
:param specs: A list of key to be unset
|
: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')
|
return self._info.get('os-extended-snapshot-attributes:project_id')
|
||||||
|
|
||||||
def reset_state(self, state):
|
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)
|
self.manager.reset_state(self, state)
|
||||||
|
|
||||||
def set_metadata(self, metadata):
|
def set_metadata(self, metadata):
|
||||||
|
@@ -86,7 +86,7 @@ class QoSSpecsManager(base.ManagerWithFind):
|
|||||||
return self._create("/qos-specs", body, "qos_specs")
|
return self._create("/qos-specs", body, "qos_specs")
|
||||||
|
|
||||||
def set_keys(self, qos_specs, 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 qos_specs: The ID of qos specs
|
||||||
:param specs: A dict of key/value pairs to be set
|
: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)
|
return self._update("/qos-specs/%s" % qos_specs, body)
|
||||||
|
|
||||||
def unset_keys(self, qos_specs, specs):
|
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 qos_specs: The ID of qos specs
|
||||||
:param specs: A list of key to be unset
|
:param specs: A list of key to be unset
|
||||||
|
@@ -107,7 +107,6 @@ class SnapshotManager(base.ManagerWithFind):
|
|||||||
|
|
||||||
:rtype: list of :class:`Snapshot`
|
:rtype: list of :class:`Snapshot`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if search_opts is None:
|
if search_opts is None:
|
||||||
search_opts = {}
|
search_opts = {}
|
||||||
|
|
||||||
|
@@ -115,10 +115,10 @@ class Volume(base.Resource):
|
|||||||
|
|
||||||
def extend(self, volume, new_size):
|
def extend(self, volume, new_size):
|
||||||
"""Extend the size of the specified volume.
|
"""Extend the size of the specified volume.
|
||||||
|
|
||||||
:param volume: The UUID of the volume to extend
|
:param volume: The UUID of the volume to extend
|
||||||
:param new_size: The desired size to extend volume to.
|
:param new_size: The desired size to extend volume to.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.manager.extend(self, new_size)
|
self.manager.extend(self, new_size)
|
||||||
|
|
||||||
def migrate_volume(self, host, force_host_copy):
|
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
|
:param scheduler_hints: (optional extension) arbitrary key-value pairs
|
||||||
specified by the client to help boot an instance
|
specified by the client to help boot an instance
|
||||||
:rtype: :class:`Volume`
|
:rtype: :class:`Volume`
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if metadata is None:
|
if metadata is None:
|
||||||
volume_metadata = {}
|
volume_metadata = {}
|
||||||
else:
|
else:
|
||||||
@@ -480,6 +479,10 @@ class VolumeManager(base.ManagerWithFind):
|
|||||||
'disk_format': disk_format})
|
'disk_format': disk_format})
|
||||||
|
|
||||||
def force_delete(self, volume):
|
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))
|
return self._action('os-force_delete', base.getid(volume))
|
||||||
|
|
||||||
def reset_state(self, volume, state):
|
def reset_state(self, volume, state):
|
||||||
@@ -487,6 +490,11 @@ class VolumeManager(base.ManagerWithFind):
|
|||||||
return self._action('os-reset_status', volume, {'status': state})
|
return self._action('os-reset_status', volume, {'status': state})
|
||||||
|
|
||||||
def extend(self, volume, new_size):
|
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',
|
return self._action('os-extend',
|
||||||
base.getid(volume),
|
base.getid(volume),
|
||||||
{'new_size': new_size})
|
{'new_size': new_size})
|
||||||
@@ -507,7 +515,6 @@ class VolumeManager(base.ManagerWithFind):
|
|||||||
:param host: The destination host
|
:param host: The destination host
|
||||||
:param force_host_copy: Skip driver optimizations
|
:param force_host_copy: Skip driver optimizations
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return self._action('os-migrate_volume',
|
return self._action('os-migrate_volume',
|
||||||
volume,
|
volume,
|
||||||
{'host': host, 'force_host_copy': force_host_copy})
|
{'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 new_volume: The new temporary :class:`Volume` in the migration
|
||||||
:param error: Inform of an error to cause migration cleanup
|
:param error: Inform of an error to cause migration cleanup
|
||||||
"""
|
"""
|
||||||
|
|
||||||
new_volume_id = base.getid(new_volume)
|
new_volume_id = base.getid(new_volume)
|
||||||
return self._action('os-migrate_volume_completion',
|
return self._action('os-migrate_volume_completion',
|
||||||
old_volume,
|
old_volume,
|
||||||
|
Reference in New Issue
Block a user