From 9faa9d47aad697885eb463cb37bc7eb53f211cea Mon Sep 17 00:00:00 2001
From: Dao Cong Tien <tiendc@vn.fujitsu.com>
Date: Wed, 6 Apr 2016 11:19:14 +0700
Subject: [PATCH] Fix typos in docstrings and comments

Update a comment to be more meaningful

Change-Id: Ie1aa46917c1a253db92a0dc819803a1d3e795b07
---
 glanceclient/common/utils.py | 6 +++---
 glanceclient/shell.py        | 7 ++++---
 glanceclient/v2/images.py    | 2 +-
 glanceclient/v2/metadefs.py  | 6 +++---
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/glanceclient/common/utils.py b/glanceclient/common/utils.py
index 878c1a53..7c88ff91 100644
--- a/glanceclient/common/utils.py
+++ b/glanceclient/common/utils.py
@@ -51,7 +51,7 @@ REQUIRED_FIELDS_ON_DATA = ('disk_format', 'container_format')
 # Decorator for cli-args
 def arg(*args, **kwargs):
     def _decorator(func):
-        # Because of the sematics of decorator composition if we just append
+        # Because of the semantics of decorator composition if we just append
         # to the options list positional options will appear to be backwards.
         func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs))
         return func
@@ -133,7 +133,7 @@ def schema_args(schema_getter, omit=None):
                 if isinstance(type_str, list):
                     # NOTE(flaper87): This means the server has
                     # returned something like `['null', 'string']`,
-                    # therfore we use the first non-`null` type as
+                    # therefore we use the first non-`null` type as
                     # the valid type.
                     for t in type_str:
                         if t != 'null':
@@ -159,7 +159,7 @@ def schema_args(schema_getter, omit=None):
 
                     # NOTE(flaper87): Make sure all values are `str/unicode`
                     # for the `join` to succeed. Enum types can also be `None`
-                    # therfore, join's call would fail without the following
+                    # therefore, join's call would fail without the following
                     # list comprehension
                     vals = [six.text_type(val) for val in property.get('enum')]
                     description += ('Valid values: ' + ', '.join(vals))
diff --git a/glanceclient/shell.py b/glanceclient/shell.py
index db8d3dd6..1a5f20fa 100755
--- a/glanceclient/shell.py
+++ b/glanceclient/shell.py
@@ -214,7 +214,8 @@ class OpenStackImagesShell(object):
 
     def _find_actions(self, subparsers, actions_module):
         for attr in (a for a in dir(actions_module) if a.startswith('do_')):
-            # I prefer to be hypen-separated instead of underscores.
+            # Replace underscores with hyphens in the commands
+            # displayed to the user
             command = attr[3:].replace('_', '-')
             callback = getattr(actions_module, attr)
             desc = callback.__doc__ or ''
@@ -457,7 +458,7 @@ class OpenStackImagesShell(object):
             except OSError as e:
                 # This avoids glanceclient to crash if it can't write to
                 # ~/.glanceclient, which may happen on some env (for me,
-                # it happens in Jenkins, as Glanceclient can't write to
+                # it happens in Jenkins, as glanceclient can't write to
                 # /var/lib/jenkins).
                 msg = '%s' % e
                 print(encodeutils.safe_decode(msg), file=sys.stderr)
@@ -519,7 +520,7 @@ class OpenStackImagesShell(object):
             endpoint = self._get_image_url(options)
             endpoint, url_version = utils.strip_version(endpoint)
         except ValueError:
-            # NOTE(flaper87): ValueError is raised if no endpoint is povided
+            # NOTE(flaper87): ValueError is raised if no endpoint is provided
             url_version = None
 
         # build available subcommands based on version
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py
index 2f2527c7..a9a5e99e 100644
--- a/glanceclient/v2/images.py
+++ b/glanceclient/v2/images.py
@@ -253,7 +253,7 @@ class Controller(object):
 
         :param image_id: ID of the image to modify.
         :param remove_props: List of property names to remove
-        :param \*\*kwargs: Image attribute names and their new values.
+        :param kwargs: Image attribute names and their new values.
         """
         unvalidated_image = self.get(image_id)
         image = self.model(**unvalidated_image)
diff --git a/glanceclient/v2/metadefs.py b/glanceclient/v2/metadefs.py
index 879a4693..28d0db6b 100644
--- a/glanceclient/v2/metadefs.py
+++ b/glanceclient/v2/metadefs.py
@@ -202,7 +202,7 @@ class ResourceTypeController(object):
         return self.model(**body)
 
     def deassociate(self, namespace, resource):
-        """Deasociate a resource type with a namespace."""
+        """Deassociate a resource type with a namespace."""
         url = '/v2/metadefs/namespaces/{0}/resource_types/{1}'. \
             format(namespace, resource)
         self.http_client.delete(url)
@@ -337,7 +337,7 @@ class ObjectController(object):
         """Update an object.
 
         :param namespace: Name of a namespace the object belongs.
-        :param prop_name: Name of an object (old one).
+        :param object_name: Name of an object (old one).
         :param kwargs: Unpacked object.
         """
         obj = self.get(namespace, object_name)
@@ -441,7 +441,7 @@ class TagController(object):
         """Update a tag.
 
         :param namespace: Name of a namespace the Tag belongs.
-        :param prop_name: Name of the Tag (old one).
+        :param tag_name: Name of the Tag (old one).
         :param kwargs: Unpacked tag.
         """
         tag = self.get(namespace, tag_name)