Extending quota support for neutron LBaaS entities

Part of extending quota mechanism to support neutron
LBaaS entities.
Adding new test for testing the lbaas resources.
The test is skipped if network lbaas extension is not available

This is one of four changes related to the BP.
This one is for tempest project.
Another one is for neutron project
and another one is for python-neutronclient package
and another one for horizon/openstack-dashboard project.

See blueprint neutron-quota-extension for another three changes.

Change-Id: I3b2739c28ff8dfbc4271d6f5d14b0655b6f9e203
Implements: blueprint neutron-quota-extension
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
Enable GET port_detail API to set parameters

We can set patameters(node_uuid, address, ...) to GET port_detail API.
This patch enables it.

Change-Id: I32e95deaffecfddece24c1a7e5c08c3e392380d5
Closes-Bug: #1312503
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
lbaas basic - open firewall for http on vip port

This is necessary for test_load_balancer_basic to work
when the linuxbridge agent is used.

Change-Id: I620882c31461d438add0f011cb916e28e2f266a3
Closes-Bug: 1313117
Add "create a server" test with server group

When creating a server with the scheduler_hint "group", the server
will be in the group.
This patch adds the test for checking its behavior.

Change-Id: If5701d381198b01c5ee876bb22b14e5d4b967499
Related-Bug: #1306367
Related-Bug: #1298494
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
botoclient does not honor disable_ssl_certificate_validation

The keystone Client() class should pass in insecure as the value
of CONF.identity.disable_ssl_certificate_validation, otherwise
many tests will fail if the keystone server is secured with SSL.

Change-Id: Id4759645ca84fd0fd7e41d2ffe72c6ae36d3b604
Closes-Bug: 1307675
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