Check non json type on glance client json_request method

This patch adds Content-Type headers for request and responses in
glance_http json_request methods based on what was discussed in a
previous patch.
(https://review.openstack.org/#/c/84454/4/tempest/tests/test_glance_http.py)
Also includes a couple of unit tests to assure the behavior.

Related to bp unit-tests

Change-Id: I570c86401f878ab8048194be252ce82d1b44f5b4
Use a more sensible network topology for some router tests

This is achieved by creating subnets on separate logical
networks. A negative tests is also added to verify that
interface attachment fails when done with overlapping
subnets.

Closes-bug: #1316742

Change-Id: Idb1965e32d30acd962e1a3fa755b6c8b25c1bc31
Sahara: add API tests for job binary internals

* create/list/get/delete API tests for job binary internals were added
* "get_job_binary_internal_data" method to Sahara API client was added
* "test_job_binary_internal_get_data" test was added

Partially implements: blueprint savanna-api-tests

Change-Id: Ieaa765a1e941e5c1ac1b866099dbf966d64399b2
tests the Keystone extensions V2 API

This patch adds the JSON/XML clients and tests for
Keystone discover extensions V2 API.

Change-Id: I9e869b9a5ba9302a77027581de7ae970f8d56305
Remove nova v2 client in ListSnapshotImagesTest

ListSnapshotImagesTest should only use nova v3 client for creating
snapshot as the similar test which uses nova v2 client already exist
in nova v2 images api tests(compute/images/test_list_image_filters.py).
This patch removes nova v2 client from ListSnapshotImagesTest.

Change-Id: I04e34f7cd34f760d7bc1361a3037c1f1fe1341d8
Closes-Bug: #1311712
Use old dict generator syntax in baremetal/test_ports

The old syntax is compatible with Python 2.6 as well.

Change-Id: I9397c92bde3aa2ea4f7831d1995fd52fe5e1788a
Test script for CRUD operations on regions

Adds test_regions.py test script to identity v3.
Also adds related XML and JSON supporting methos in client file
region_client.py. Modified the identity base.py and common file
clients.py with details about region_client.
The test cases in the test script are
test_create_update_get_delete_region,
test_create_region_with_specific_id and
test_list_regions.

Change-Id: Ib0f07d04f6c31729bacdcfde065777e64fb76333
Deduplicate status call checks

This commit updates the jsonschema validation method validate_response()
to use the rest client method expected_success() to check that the
correct status code response is received. Previously validate response
was doing the same check despite there already being a method available
for doing the check. As a part of using expected_success() to validate
the status codes using the jsonschema it was necessary to expand
expected_successs() to handle both single expected codes as well as a
list of codes. This is because it's perfectly valid for the jsonschema
to specify a list of expected responses.

Change-Id: I400bb9aff89c18f3964a1d8ec45bfb8dfd75301d
Don't store duplicate policies for server_group

It doesn't make sense to store same policies in a server_group.
We only need to store one and ignore the duplicate policies.

This patch relates to the bug I4f3ad544aef78cbbc076c7a47cca04832a2f5b4b
in Nova. So I need to skip one test-case here firstly in order to modify the
issue in Nova.

After the Nova's patch merged, this test-case will be restored,
and more correlate cases will definitly be supplied in tempest.

Change-Id: I26449a2a881be396daf75838451cfe01a915f513
Closes-Bug: #1324348
Add veritification to name property in cinder volume

Currently the name property in cinder volume is not
verified. Templates and assertations are modified to
verify name property in cinder volume.

Change-Id: I5f3e035dca70da0e780ac042d17ffeae00346e3c
Closes-Bug: #1323471
Sahara: add API tests for cluster templates

* create/list/get/delete API tests for cluster templates were added

Partially implements: blueprint savanna-api-tests

Change-Id: Ia8aca9d3001cd0401a2c2a7a4111e8f0e8bcbee7
Verify 'update-server-metadata' APIs attributes

This patch verifies the response attributes of 'update-server-metadata'.

The response attributes of v2 and v3 are the same:
{
    "metadata": {
        "foo": "Foo Value"
    }
}

Response code for V3 API is 201.

Partially implements blueprint nova-api-attribute-test

Change-Id: If70c4cd31ed513276d0a714edc06d4878913ec48
Enhanced Trove (database) flavor API tests

 - Added test to make sure trove flavors matched OS (nova) flavors
 - Added response status checks to existing tests

Partially implements: blueprint trove-tempest

Change-Id: I59cc551ef5ec58fe43b794ae8dbd6a89c40c774b
Add compute notifications tests for ceilometer

Added ceilometer test for measurements:
instance, instance:<type>, memory, vcpus, disk.root.size,
disk.ephemeral.size

Change-Id: Ic99229d38f17cd81e147d86031aca75c13171057
Partially implements: blueprint add-basic-ceilometer-tests
Reworked scenario tests to use their own non-default security groups

Moved _create_security_group_nova to base OfficialClientTest class, so
that now it can be used by all scenario tests. All scenario tests now
create security group with "loginable" rules explicitly and attach it to
servers instead of using "default" security group.

Change-Id: If82c681b4a7f62808f46b03c57d113f8f5c97f6f
Closes-Bug: #1247060
Add CLI test of "nova server-group-list"

Test case added for nova cli server-group-list

Change-Id: I04212576ca88bc6bf71db2e7ab8bf09d69124fdc
Add cinder CLI tests "qos-list" and "encryption-type-list"

Below two tests are added for cinder cli:
qos-list
encryption-type-list

Change-Id: Ic025ec401135b1de64871ef1df368cd13f85f7a3
Nodestate API test for power state set

This patch implements Nodestate API tests, to set the power state of
the node for the following power states -
1. power on
2. rebooting
3. power off

Change-Id: Icbb2719ffae772878f183c0c77c1e9d9028655c1
Clarify API extension description of Nova API

On Nova API, we can see two names for each API extension. The one is
"Name", the other is "Alias". The "Name" is represented with camelcase
and the "Alias" is done with characters and hyphens:

 $ nova list-extensions
 +--------------+-----------------------+------------------+---------+
 | Name         | Summary               | Alias            | Updated |
 +--------------+-----------------------+------------------+---------+
 | AdminActions | Enable admin-only ... | os-admin-actions | ...     |
 | Agents       | Agents support.       | os-agents        | ...     |
 | ConsoleOutput| Console log output... | os-console-output| ...     |
 | Consoles     | Interactive Console.. | os-consoles      | ...     |

In Tempest, we can select API extensions what we test and it should be
based on "Alias", because on Nova side we have been a lot stricter about
format/uniqueness for the alias which is seen as the canonical name.
This patch clarifies it.

Change-Id: I3e753c81182af83e01ad3a1f2eb9782c8abb6f50
adds the missing _interface variable

This patch adds the _interface variable in the JSON
test class 'AvailabilityZoneTestJSON'

Change-Id: Ib50626c9e163f13e2cb99b3faa356a17974ab548
Closes-Bug: 1326347