T4xx fixes

T404 WONTFIX

Change-Id: I2e94fa4762615b686635b82e1843bdc1c10dabb0
diff --git a/stress/state.py b/stress/state.py
index 3a9f12e..9c31b76 100644
--- a/stress/state.py
+++ b/stress/state.py
@@ -16,7 +16,8 @@
 class ClusterState(object):
     """A class to store the state of various persistent objects in the Nova
     cluster, e.g. instances, volumes.  Use methods to query to state which than
-    can be compared to the current state of the objects in Nova"""
+    can be compared to the current state of the objects in Nova.
+    """
 
     def __init__(self, **kwargs):
         self._max_vms = kwargs.get('max_vms', 32)
@@ -84,7 +85,8 @@
 
 class ServerAssociatedState(object):
     """Class that tracks resources that are associated with a particular server
-    such as a volume or floating ip"""
+    such as a volume or floating ip.
+    """
 
     def __init__(self, resource_id):
         # The id of the server.
diff --git a/tempest/common/glance_http.py b/tempest/common/glance_http.py
index faac1a0..45737be 100644
--- a/tempest/common/glance_http.py
+++ b/tempest/common/glance_http.py
@@ -129,7 +129,7 @@
         LOG.debug('\n'.join(dump))
 
     def _http_request(self, url, method, **kwargs):
-        """ Send an http request with the specified characteristics.
+        """Send an http request with the specified characteristics.
 
         Wrapper around httplib.HTTP(S)Connection.request to handle tasks such
         as setting headers and error handling.
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index e163126..170a137 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -80,7 +80,7 @@
     def clear_auth(self):
         """
         Can be called to clear the token and base_url so that the next request
-        will fetch a new token and base_url
+        will fetch a new token and base_url.
         """
 
         self.token = None
@@ -88,7 +88,8 @@
 
     def get_auth(self):
         """Returns the token of the current request or sets the token if
-        none"""
+        none.
+        """
 
         if not self.token:
             self._set_auth()
@@ -97,7 +98,7 @@
 
     def basic_auth(self, user, password, auth_url):
         """
-        Provides authentication for the target API
+        Provides authentication for the target API.
         """
 
         params = {}
@@ -114,7 +115,7 @@
 
     def keystone_auth(self, user, password, auth_url, service, tenant_name):
         """
-        Provides authentication via Keystone
+        Provides authentication via Keystone.
         """
 
         # Normalize URI to ensure /tokens is in it.
diff --git a/tempest/openstack/common/cfg.py b/tempest/openstack/common/cfg.py
index 08d9b47..cae4ecc 100644
--- a/tempest/openstack/common/cfg.py
+++ b/tempest/openstack/common/cfg.py
@@ -1437,7 +1437,7 @@
         logger.log(lvl, "=" * 80)
 
         def _sanitize(opt, value):
-            """Obfuscate values of options declared secret"""
+            """Obfuscate values of options declared secret."""
             return value if not opt.secret else '*' * len(str(value))
 
         for opt_name in sorted(self._opts):
diff --git a/tempest/openstack/common/iniparser.py b/tempest/openstack/common/iniparser.py
index 9bf399f..9a8762a 100644
--- a/tempest/openstack/common/iniparser.py
+++ b/tempest/openstack/common/iniparser.py
@@ -100,15 +100,15 @@
             self._assignment(key, value)
 
     def assignment(self, key, value):
-        """Called when a full assignment is parsed"""
+        """Called when a full assignment is parsed."""
         raise NotImplementedError()
 
     def new_section(self, section):
-        """Called when a new section is started"""
+        """Called when a new section is started."""
         raise NotImplementedError()
 
     def comment(self, comment):
-        """Called when a comment is parsed"""
+        """Called when a comment is parsed."""
         pass
 
     def error_invalid_assignment(self, line):
diff --git a/tempest/openstack/common/setup.py b/tempest/openstack/common/setup.py
index 35680b3..2fb9cf2 100644
--- a/tempest/openstack/common/setup.py
+++ b/tempest/openstack/common/setup.py
@@ -277,7 +277,8 @@
 def _get_version_from_git(pre_version):
     """Return a version which is equal to the tag that's on the current
     revision if there is one, or tag plus number of additional revisions
-    if the current revision has no tag."""
+    if the current revision has no tag.
+    """
 
     if os.path.isdir('.git'):
         if pre_version:
diff --git a/tempest/services/compute/xml/common.py b/tempest/services/compute/xml/common.py
index 6469761..bbc4e38 100644
--- a/tempest/services/compute/xml/common.py
+++ b/tempest/services/compute/xml/common.py
@@ -96,7 +96,8 @@
     """This does a really braindead conversion of an XML tree to
     something that looks like a json dump. In cases where the XML
     and json structures are the same, then this "just works". In
-    others, it requires a little hand-editing of the result."""
+    others, it requires a little hand-editing of the result.
+    """
     json = {}
     for attr in node.keys():
         json[attr] = node.get(attr)
diff --git a/tempest/services/compute/xml/servers_client.py b/tempest/services/compute/xml/servers_client.py
index 8be342d..40bdcf8 100644
--- a/tempest/services/compute/xml/servers_client.py
+++ b/tempest/services/compute/xml/servers_client.py
@@ -55,7 +55,7 @@
 
 
 def _translate_server_xml_to_json(xml_dom):
-    """ Convert server XML to server JSON.
+    """Convert server XML to server JSON.
 
     The addresses collection does not convert well by the dumb xml_to_json.
     This method does some pre and post-processing to deal with that.
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index dc70cb7..89ea89f 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -70,7 +70,7 @@
         return resp, xml_to_json(body)
 
     def create_snapshot(self, volume_id, **kwargs):
-        """ Creates a new snapshot.
+        """Creates a new snapshot.
         volume_id(Required): id of the volume.
         force: Create a snapshot even if the volume attached (Default=False)
         display_name: Optional snapshot Name.
diff --git a/tempest/test.py b/tempest/test.py
index 58fadeb..616a866 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -31,7 +31,8 @@
 
     This decorator applies the nose attr decorator as well as the
     the testtools.testcase.attr if it is in the list of attributes
-    to testtools we want to apply."""
+    to testtools we want to apply.
+    """
 
     def decorator(f):
         testtool_attributes = ('smoke')
diff --git a/tempest/testboto.py b/tempest/testboto.py
index 14844b3..f5f5d8b 100644
--- a/tempest/testboto.py
+++ b/tempest/testboto.py
@@ -144,7 +144,8 @@
     @classmethod
     def addResourceCleanUp(cls, function, *args, **kwargs):
         """Adds CleanUp callable, used by tearDownClass.
-        Recommended to a use (deep)copy on the mutable args"""
+        Recommended to a use (deep)copy on the mutable args.
+        """
         cls._sequence = cls._sequence + 1
         cls._resource_trash_bin[cls._sequence] = (function, args, kwargs)
         return cls._sequence
@@ -161,7 +162,8 @@
             self.assertBotoError(self.ec2_error_code.client.
                                  InvalidKeyPair.Duplicate,
                                  self.client.create_keypair,
-                                 key_name)"""
+                                 key_name)
+        """
         try:
             callableObj(*args, **kwargs)
         except BotoServerError as exc:
@@ -173,8 +175,9 @@
 
     @classmethod
     def tearDownClass(cls):
-        """ Calls the callables added by addResourceCleanUp,
-        when you overwire this function dont't forget to call this too"""
+        """Calls the callables added by addResourceCleanUp,
+        when you overwire this function dont't forget to call this too.
+        """
         fail_count = 0
         trash_keys = sorted(cls._resource_trash_bin, reverse=True)
         for key in trash_keys:
diff --git a/tempest/tests/object_storage/test_object_expiry.py b/tempest/tests/object_storage/test_object_expiry.py
index 1738ddf..8411ef5 100644
--- a/tempest/tests/object_storage/test_object_expiry.py
+++ b/tempest/tests/object_storage/test_object_expiry.py
@@ -39,7 +39,8 @@
         """The test script fails in tear down class
         as the container contains expired objects (LP bug 1069849).
         But delete action for the expired object is raising
-        NotFound exception and also non empty container cannot be deleted."""
+        NotFound exception and also non empty container cannot be deleted.
+        """
 
         #Get list of all object in the container
         objlist = \
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 52dbe39..20dcefa 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -38,6 +38,8 @@
 
 
 def print_help():
+    """This prints Help."""
+
     help = """
     Tempest development environment setup is complete.