Merge "Fix spelling of consistency groups"

This commit is contained in:
Jenkins 2017-01-20 18:20:06 +00:00 committed by Gerrit Code Review
commit e04a4149f2
4 changed files with 14 additions and 14 deletions

View File

@ -79,7 +79,7 @@ def find_backup(cs, backup):
def find_consistencygroup(cs, consistencygroup): def find_consistencygroup(cs, consistencygroup):
"""Gets a consistencygroup by name or ID.""" """Gets a consistency group by name or ID."""
return utils.find_resource(cs.consistencygroups, consistencygroup) return utils.find_resource(cs.consistencygroups, consistencygroup)

View File

@ -43,7 +43,7 @@ class CgsnapshotManager(base.ManagerWithFind):
project_id=None): project_id=None):
"""Creates a cgsnapshot. """Creates a cgsnapshot.
:param consistencygroup: Name or uuid of a consistencygroup :param consistencygroup: Name or uuid of a consistency group
:param name: Name of the cgsnapshot :param name: Name of the cgsnapshot
:param description: Description of the cgsnapshot :param description: Description of the cgsnapshot
:param user_id: User id derived from context :param user_id: User id derived from context

View File

@ -26,11 +26,11 @@ class Consistencygroup(base.Resource):
return "<Consistencygroup: %s>" % self.id return "<Consistencygroup: %s>" % self.id
def delete(self, force='False'): def delete(self, force='False'):
"""Delete this consistencygroup.""" """Delete this consistency group."""
return self.manager.delete(self, force) return self.manager.delete(self, force)
def update(self, **kwargs): def update(self, **kwargs):
"""Update the name or description for this consistencygroup.""" """Update the name or description for this consistency group."""
return self.manager.update(self, **kwargs) return self.manager.update(self, **kwargs)
@ -41,7 +41,7 @@ class ConsistencygroupManager(base.ManagerWithFind):
def create(self, volume_types, name=None, def create(self, volume_types, name=None,
description=None, user_id=None, description=None, user_id=None,
project_id=None, availability_zone=None): project_id=None, availability_zone=None):
"""Creates a consistencygroup. """Creates a consistency group.
:param name: Name of the ConsistencyGroup :param name: Name of the ConsistencyGroup
:param description: Description of the ConsistencyGroup :param description: Description of the ConsistencyGroup
@ -66,7 +66,7 @@ class ConsistencygroupManager(base.ManagerWithFind):
def create_from_src(self, cgsnapshot_id, source_cgid, name=None, def create_from_src(self, cgsnapshot_id, source_cgid, name=None,
description=None, user_id=None, description=None, user_id=None,
project_id=None): project_id=None):
"""Creates a consistencygroup from a cgsnapshot or a source CG. """Creates a consistency group from a cgsnapshot or a source CG.
:param cgsnapshot_id: UUID of a CGSnapshot :param cgsnapshot_id: UUID of a CGSnapshot
:param source_cgid: UUID of a source CG :param source_cgid: UUID of a source CG
@ -92,16 +92,16 @@ class ConsistencygroupManager(base.ManagerWithFind):
return common_base.DictWithMeta(body['consistencygroup'], resp) return common_base.DictWithMeta(body['consistencygroup'], resp)
def get(self, group_id): def get(self, group_id):
"""Get a consistencygroup. """Get a consistency group.
:param group_id: The ID of the consistencygroup to get. :param group_id: The ID of the consistency group to get.
:rtype: :class:`Consistencygroup` :rtype: :class:`Consistencygroup`
""" """
return self._get("/consistencygroups/%s" % group_id, return self._get("/consistencygroups/%s" % group_id,
"consistencygroup") "consistencygroup")
def list(self, detailed=True, search_opts=None): def list(self, detailed=True, search_opts=None):
"""Lists all consistencygroups. """Lists all consistency groups.
:rtype: list of :class:`Consistencygroup` :rtype: list of :class:`Consistencygroup`
""" """
@ -116,7 +116,7 @@ class ConsistencygroupManager(base.ManagerWithFind):
"consistencygroups") "consistencygroups")
def delete(self, consistencygroup, force=False): def delete(self, consistencygroup, force=False):
"""Delete a consistencygroup. """Delete a consistency group.
:param Consistencygroup: The :class:`Consistencygroup` to delete. :param Consistencygroup: The :class:`Consistencygroup` to delete.
""" """
@ -127,7 +127,7 @@ class ConsistencygroupManager(base.ManagerWithFind):
return common_base.TupleWithMeta((resp, body), resp) return common_base.TupleWithMeta((resp, body), resp)
def update(self, consistencygroup, **kwargs): def update(self, consistencygroup, **kwargs):
"""Update the name or description for a consistencygroup. """Update the name or description for a consistency group.
:param Consistencygroup: The :class:`Consistencygroup` to update. :param Consistencygroup: The :class:`Consistencygroup` to update.
""" """
@ -140,7 +140,7 @@ class ConsistencygroupManager(base.ManagerWithFind):
base.getid(consistencygroup), body) base.getid(consistencygroup), body)
def _action(self, action, consistencygroup, info=None, **kwargs): def _action(self, action, consistencygroup, info=None, **kwargs):
"""Perform a consistencygroup "action." """Perform a consistency group "action."
""" """
body = {action: info} body = {action: info}
self.run_hooks('modify_body_for_action', body, **kwargs) self.run_hooks('modify_body_for_action', body, **kwargs)

View File

@ -2191,7 +2191,7 @@ def do_replication_reenable(cs, args):
help='Shows details for all tenants. Admin only.') help='Shows details for all tenants. Admin only.')
@utils.service_type('volumev2') @utils.service_type('volumev2')
def do_consisgroup_list(cs, args): def do_consisgroup_list(cs, args):
"""Lists all consistencygroups.""" """Lists all consistency groups."""
consistencygroups = cs.consistencygroups.list() consistencygroups = cs.consistencygroups.list()
columns = ['ID', 'Status', 'Name'] columns = ['ID', 'Status', 'Name']
@ -2346,7 +2346,7 @@ def do_consisgroup_delete(cs, args):
'separated by commas. Default=None.') 'separated by commas. Default=None.')
@utils.service_type('volumev2') @utils.service_type('volumev2')
def do_consisgroup_update(cs, args): def do_consisgroup_update(cs, args):
"""Updates a consistencygroup.""" """Updates a consistency group."""
kwargs = {} kwargs = {}
if args.name is not None: if args.name is not None: