Fix H404/405 violations for common code

There is a lot of H404/405 violations in Tempest now, and that leads
difficult to migrate the code to tempest-lib or the other projects'
repos. This patch fixes these violations for common code.

Change-Id: I5ddedcdd4d00ddbd53e1006ba40dce447fba3c20
diff --git a/tempest/common/cred_client.py b/tempest/common/cred_client.py
index 79a502a..13baafb 100644
--- a/tempest/common/cred_client.py
+++ b/tempest/common/cred_client.py
@@ -24,10 +24,11 @@
 
 @six.add_metaclass(abc.ABCMeta)
 class CredsClient(object):
-    """This class is a wrapper around the identity clients, to provide a
-     single interface for managing credentials in both v2 and v3 cases.
-     It's not bound to created credentials, only to a specific set of admin
-     credentials used for generating credentials.
+    """This class is a wrapper around the identity clients
+
+     to provide a single interface for managing credentials in both v2 and v3
+     cases. It's not bound to created credentials, only to a specific set of
+     admin credentials used for generating credentials.
     """
 
     def __init__(self, identity_client):
diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index e5f24b3..aa237e0 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -28,6 +28,7 @@
     def __init__(self, identity_version, name=None, network_resources=None,
                  credentials_domain=None, admin_role=None):
         """A CredentialProvider supplies credentials to test classes.
+
         :param identity_version: Identity version of the credentials provided
         :param name: Name of the calling test. Included in provisioned
                      credentials when credentials are provisioned on the fly
diff --git a/tempest/common/credentials_factory.py b/tempest/common/credentials_factory.py
index 486b7fd..75639b2 100644
--- a/tempest/common/credentials_factory.py
+++ b/tempest/common/credentials_factory.py
@@ -292,10 +292,7 @@
 
 
 class ConfiguredUserManager(clients.Manager):
-    """
-    Manager object that uses the `user` credentials for its
-    managed client objects
-    """
+    """Manager that uses user credentials for its managed client objects"""
 
     def __init__(self, service=None):
         super(ConfiguredUserManager, self).__init__(
@@ -304,11 +301,7 @@
 
 
 class AdminManager(clients.Manager):
-
-    """
-    Manager object that uses the admin credentials for its
-    managed client objects
-    """
+    """Manager that uses admin credentials for its managed client objects"""
 
     def __init__(self, service=None):
         super(AdminManager, self).__init__(
diff --git a/tempest/common/custom_matchers.py b/tempest/common/custom_matchers.py
index 839088c..8ba33ed 100644
--- a/tempest/common/custom_matchers.py
+++ b/tempest/common/custom_matchers.py
@@ -19,8 +19,7 @@
 
 
 class ExistsAllResponseHeaders(object):
-    """
-    Specific matcher to check the existence of Swift's response headers
+    """Specific matcher to check the existence of Swift's response headers
 
     This matcher checks the existence of common headers for each HTTP method
     or the target, which means account, container or object.
@@ -30,7 +29,8 @@
     """
 
     def __init__(self, target, method):
-        """
+        """Initialization of ExistsAllResponseHeaders
+
         param: target Account/Container/Object
         param: method PUT/GET/HEAD/DELETE/COPY/POST
         """
@@ -38,7 +38,8 @@
         self.method = method
 
     def match(self, actual):
-        """
+        """Check headers
+
         param: actual HTTP response headers
         """
         # Check common headers for all HTTP methods
@@ -95,10 +96,7 @@
 
 
 class NonExistentHeader(object):
-    """
-    Informs an error message for end users in the case of missing a
-    certain header in Swift's responses
-    """
+    """Informs an error message in the case of missing a certain header"""
 
     def __init__(self, header):
         self.header = header
@@ -111,9 +109,7 @@
 
 
 class AreAllWellFormatted(object):
-    """
-    Specific matcher to check the correctness of formats of values of Swift's
-    response headers
+    """Specific matcher to check the correctness of formats of values
 
     This matcher checks the format of values of response headers.
     When checking the format of values of 'specific' headers such as
@@ -149,10 +145,7 @@
 
 
 class InvalidFormat(object):
-    """
-    Informs an error message for end users if a format of a certain header
-    is invalid
-    """
+    """Informs an error message if a format of a certain header is invalid"""
 
     def __init__(self, key, value):
         self.key = key
@@ -166,8 +159,9 @@
 
 
 class MatchesDictExceptForKeys(object):
-    """Matches two dictionaries. Verifies all items are equals except for those
-    identified by a list of keys.
+    """Matches two dictionaries.
+
+    Verifies all items are equals except for those identified by a list of keys
     """
 
     def __init__(self, expected, excluded_keys=None):
diff --git a/tempest/common/dynamic_creds.py b/tempest/common/dynamic_creds.py
index ae53543..e950c3e 100644
--- a/tempest/common/dynamic_creds.py
+++ b/tempest/common/dynamic_creds.py
@@ -72,9 +72,9 @@
             self.identity_admin_client, self.creds_domain_name)
 
     def _get_admin_clients(self):
-        """
-        Returns a tuple with instances of the following admin clients (in this
-        order):
+        """Returns a tuple with instances of the following admin clients
+
+        (in this order):
             identity
             network
         """
diff --git a/tempest/common/generator/base_generator.py b/tempest/common/generator/base_generator.py
index 3e09300..a66002f 100644
--- a/tempest/common/generator/base_generator.py
+++ b/tempest/common/generator/base_generator.py
@@ -41,9 +41,7 @@
 
 
 def simple_generator(fn):
-    """
-    Decorator for simple generators that return one value
-    """
+    """Decorator for simple generators that return one value"""
     @functools.wraps(fn)
     def wrapped(self, schema):
         result = fn(self, schema)
@@ -110,9 +108,7 @@
         jsonschema.validate(schema, self.schema)
 
     def generate_scenarios(self, schema, path=None):
-        """
-        Generates the scenario (all possible test cases) out of the given
-        schema.
+        """Generate scenario (all possible test cases) out of the given schema
 
         :param schema: a dict style schema (see ``BasicGeneratorSet.schema``)
         :param path: the schema path if the given schema is a subschema
@@ -157,9 +153,10 @@
         return scenarios
 
     def generate_payload(self, test, schema):
-        """
-        Generates one jsonschema out of the given test. It's mandatory to use
-        generate_scenarios before to register all needed variables to the test.
+        """Generates one jsonschema out of the given test.
+
+        It's mandatory to use generate_scenarios before to register all needed
+        variables to the test.
 
         :param test: A test object (scenario) with all _negtest variables on it
         :param schema: schema for the test
diff --git a/tempest/common/glance_http.py b/tempest/common/glance_http.py
index 868a3e9..e5431a0 100644
--- a/tempest/common/glance_http.py
+++ b/tempest/common/glance_http.py
@@ -203,8 +203,7 @@
 
 
 class OpenSSLConnectionDelegator(object):
-    """
-    An OpenSSL.SSL.Connection delegator.
+    """An OpenSSL.SSL.Connection delegator.
 
     Supplies an additional 'makefile' method which httplib requires
     and is not present in OpenSSL.SSL.Connection.
@@ -225,9 +224,8 @@
 
 
 class VerifiedHTTPSConnection(httplib.HTTPSConnection):
-    """
-    Extended HTTPSConnection which uses the OpenSSL library
-    for enhanced SSL support.
+    """Extended HTTPSConnection which uses OpenSSL library for enhanced SSL
+
     Note: Much of this functionality can eventually be replaced
           with native Python 3.3 code.
     """
@@ -247,11 +245,10 @@
 
     @staticmethod
     def host_matches_cert(host, x509):
-        """
-        Verify that the the x509 certificate we have received
-        from 'host' correctly identifies the server we are
-        connecting to, ie that the certificate's Common Name
-        or a Subject Alternative Name matches 'host'.
+        """Verify that the x509 certificate we have received from 'host'
+
+        Identifies the server we are connecting to, ie that the certificate's
+        Common Name or a Subject Alternative Name matches 'host'.
         """
         # First see if we can match the CN
         if x509.get_subject().commonName == host:
@@ -289,9 +286,7 @@
             return preverify_ok
 
     def setcontext(self):
-        """
-        Set up the OpenSSL context.
-        """
+        """Set up the OpenSSL context."""
         self.context = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
 
         if self.ssl_compression is False:
@@ -336,10 +331,7 @@
             self.context.set_default_verify_paths()
 
     def connect(self):
-        """
-        Connect to an SSL port using the OpenSSL library and apply
-        per-connection parameters.
-        """
+        """Connect to SSL port and apply per-connection parameters."""
         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         if self.timeout is not None:
             # '0' microseconds
diff --git a/tempest/common/negative_rest_client.py b/tempest/common/negative_rest_client.py
index abd8b31..d97411c 100644
--- a/tempest/common/negative_rest_client.py
+++ b/tempest/common/negative_rest_client.py
@@ -22,9 +22,7 @@
 
 
 class NegativeRestClient(service_client.ServiceClient):
-    """
-    Version of RestClient that does not raise exceptions.
-    """
+    """Version of RestClient that does not raise exceptions."""
     def __init__(self, auth_provider, service,
                  build_interval=None, build_timeout=None,
                  disable_ssl_certificate_validation=None,
@@ -43,9 +41,7 @@
             trace_requests=trace_requests)
 
     def _get_region_and_endpoint_type(self, service):
-        """
-        Returns the region for a specific service
-        """
+        """Returns the region for a specific service"""
         service_region = None
         service_endpoint_type = None
         for cfgname in dir(CONF._config):
diff --git a/tempest/common/service_client.py b/tempest/common/service_client.py
index 87e925d..b3a5a09 100644
--- a/tempest/common/service_client.py
+++ b/tempest/common/service_client.py
@@ -57,8 +57,7 @@
 
 
 class ResponseBodyData(object):
-    """Class that wraps an http response and string data into a single value.
-    """
+    """Class that wraps an http response and string data into a single value"""
 
     def __init__(self, response, data):
         self.response = response
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 3bead88..10654ff 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -57,6 +57,7 @@
 
     def validate_authentication(self):
         """Validate ssh connection and authentication
+
            This method raises an Exception when the validation fails.
         """
         self.ssh_client.test_connection_auth()