Merge "De-duplicate test class names"
diff --git a/HACKING.rst b/HACKING.rst
index 8e0ac44..a918f4a 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -72,11 +72,10 @@
 Most other assert method can include more information by default.
 For example ``self.assertIn`` can include the whole set.
 
-It is recommended to use testtools matcher for the more tricky assertions.
-`[doc] <http://testtools.readthedocs.org/en/latest/for-test-authors.html#matchers>`_
+It is recommended to use testtools `matcher`_ for the more tricky assertions.
+You can implement your own specific `matcher`_ as well.
 
-You can implement your own specific matcher as well.
-`[doc] <http://testtools.readthedocs.org/en/latest/for-test-authors.html#writing-your-own-matchers>`_
+.. _matcher: http://testtools.readthedocs.org/en/latest/for-test-authors.html#matchers
 
 If the test case fails you can see the related logs and the information
 carried by the exception (exception class, backtrack and exception info).
@@ -158,8 +157,8 @@
 sections for the test (one of those is mandatory):
 
  - A resource (part of the URL of the request): Resources needed for a test
- must be created in `setUpClass` and registered with `set_resource` e.g.:
- `cls.set_resource("server", server['id'])`
+   must be created in `setUpClass` and registered with `set_resource` e.g.:
+   `cls.set_resource("server", server['id'])`
 
  - A json schema: defines properties for a request.
 
diff --git a/README.rst b/README.rst
index d94fbdd..7108eaf 100644
--- a/README.rst
+++ b/README.rst
@@ -191,8 +191,6 @@
 
     $> testr run --parallel
 
-.. _testr: http://testrepository.readthedocs.org/en/latest/MANUAL.html
-
 To run one single test serially ::
 
     $> testr run tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_reboot_non_existent_server
diff --git a/REVIEWING.rst b/REVIEWING.rst
index 74bd2ad..12ccb75 100644
--- a/REVIEWING.rst
+++ b/REVIEWING.rst
@@ -34,7 +34,7 @@
 
 
 Reject Copy and Paste Test Code
-------------------------
+-------------------------------
 When creating new tests that are similar to existing tests it is tempting to
 simply copy the code and make a few modifications. This increases code size and
 the maintenance burden. Such changes should not be approved if it is easy to
diff --git a/doc/source/account_generator.rst b/doc/source/account_generator.rst
index 1c30473..032a20d 100644
--- a/doc/source/account_generator.rst
+++ b/doc/source/account_generator.rst
@@ -1,5 +1,5 @@
---------------------------------
+--------------------------------------
 Tempest Test-Account Generator Utility
---------------------------------
+--------------------------------------
 
-.. automodule:: tempest.cmd.account_generator
\ No newline at end of file
+.. automodule:: tempest.cmd.account_generator
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 3c109b5..ec430b7 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -6,7 +6,8 @@
 This guide is a starting point for configuring tempest. It aims to elaborate
 on and explain some of the mandatory and common configuration settings and how
 they are used in conjunction. The source of truth on each option is the sample
-config file which explains the purpose of each individual option.
+config file which explains the purpose of each individual option. You can see
+the sample config file here: :ref:`tempest-sampleconf`
 
 Lock Path
 ---------
diff --git a/doc/source/index.rst b/doc/source/index.rst
index e9f2161..fe6074f 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -24,7 +24,6 @@
 
    field_guide/index
    field_guide/api
-   field_guide/cli
    field_guide/scenario
    field_guide/stress
    field_guide/thirdparty
diff --git a/setup.cfg b/setup.cfg
index ab40f12..46e21f1 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -42,5 +42,8 @@
 build-dir = doc/build
 source-dir = doc/source
 
+[pbr]
+warnerrors = True
+
 [wheel]
 universal = 1
diff --git a/tempest/README.rst b/tempest/README.rst
index fec2874..f93a173 100644
--- a/tempest/README.rst
+++ b/tempest/README.rst
@@ -57,7 +57,7 @@
 stress job.
 
 :ref:`third_party_field_guide`
------------------------------
+------------------------------
 
 Many openstack components include 3rdparty API support. It is
 completely legitimate for Tempest to include tests of 3rdparty APIs,
diff --git a/tempest/api/compute/servers/test_virtual_interfaces.py b/tempest/api/compute/servers/test_virtual_interfaces.py
index 85f0041..7aa6d34 100644
--- a/tempest/api/compute/servers/test_virtual_interfaces.py
+++ b/tempest/api/compute/servers/test_virtual_interfaces.py
@@ -57,4 +57,5 @@
         for virt_iface in virt_ifaces['virtual_interfaces']:
             mac_address = virt_iface['mac_address']
             self.assertTrue(netaddr.valid_mac(mac_address),
-                            "Invalid mac address detected.")
+                            "Invalid mac address detected. mac address: %s"
+                            % mac_address)
diff --git a/tempest/cmd/account_generator.py b/tempest/cmd/account_generator.py
index e05cab3..3d24547 100755
--- a/tempest/cmd/account_generator.py
+++ b/tempest/cmd/account_generator.py
@@ -25,7 +25,7 @@
 **Usage:** ``tempest-account-generator [-h] [OPTIONS] accounts_file.yaml``.
 
 Positional Arguments
------------------
+--------------------
 **accounts_file.yaml** (Required) Provide an output accounts yaml file. Utility
 creates a .yaml file in the directory where the command is ran. The appropriate
 name for the file is *accounts.yaml* and it should be placed in *tempest/etc*
@@ -49,7 +49,7 @@
     +----------+------------------+----------------------+
 
 Optional Arguments
------------------
+------------------
 **-h**, **--help** (Optional) Shows help message with the description of
 utility and its arguments, and exits.
 
diff --git a/tempest/services/compute/json/floating_ip_pools_client.py b/tempest/services/compute/json/floating_ip_pools_client.py
index 7a4434f..c83537a 100644
--- a/tempest/services/compute/json/floating_ip_pools_client.py
+++ b/tempest/services/compute/json/floating_ip_pools_client.py
@@ -13,8 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import json
-
+from oslo_serialization import jsonutils as json
 from six.moves.urllib import parse as urllib
 
 from tempest.api_schema.response.compute.v2_1 import floating_ips as schema
diff --git a/tempest/services/compute/json/floating_ips_bulk_client.py b/tempest/services/compute/json/floating_ips_bulk_client.py
index c51f77e..cabeeb1 100644
--- a/tempest/services/compute/json/floating_ips_bulk_client.py
+++ b/tempest/services/compute/json/floating_ips_bulk_client.py
@@ -13,7 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import json
+from oslo_serialization import jsonutils as json
 
 from tempest.api_schema.response.compute.v2_1 import floating_ips as schema
 from tempest.common import service_client
diff --git a/tempest/services/compute/json/security_group_rules_client.py b/tempest/services/compute/json/security_group_rules_client.py
index c9096d0..c1c6b1a 100644
--- a/tempest/services/compute/json/security_group_rules_client.py
+++ b/tempest/services/compute/json/security_group_rules_client.py
@@ -13,8 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import json
-
+from oslo_serialization import jsonutils as json
 from tempest_lib import exceptions as lib_exc
 
 from tempest.api_schema.response.compute.v2_1 import security_groups as schema
diff --git a/tempest/services/compute/json/server_groups_client.py b/tempest/services/compute/json/server_groups_client.py
index 30e9e5b..33501fb 100644
--- a/tempest/services/compute/json/server_groups_client.py
+++ b/tempest/services/compute/json/server_groups_client.py
@@ -14,7 +14,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import json
+from oslo_serialization import jsonutils as json
 
 from tempest.api_schema.response.compute.v2_1 import servers as schema
 from tempest.common import service_client
diff --git a/tempest/services/database/json/limits_client.py b/tempest/services/database/json/limits_client.py
index 9358a33..da495d7 100644
--- a/tempest/services/database/json/limits_client.py
+++ b/tempest/services/database/json/limits_client.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from oslo_serialization import jsonutils as json
 from six.moves.urllib import parse as urllib
 
 from tempest.common import service_client
@@ -27,4 +28,5 @@
             url += '?%s' % urllib.urlencode(params)
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
+        body = json.loads(body)
         return service_client.ResponseBody(resp, body)
diff --git a/tempest/services/database/json/versions_client.py b/tempest/services/database/json/versions_client.py
index 43d253b..7a560d9 100644
--- a/tempest/services/database/json/versions_client.py
+++ b/tempest/services/database/json/versions_client.py
@@ -13,6 +13,7 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+from oslo_serialization import jsonutils as json
 from six.moves.urllib import parse as urllib
 
 from tempest.common import service_client
@@ -43,4 +44,5 @@
 
         resp, body = self.get(url)
         self.expected_success(200, resp.status)
+        body = json.loads(body)
         return service_client.ResponseBody(resp, body)