Volume xml client translate json attribute names

Translate the XML special attribute names
 to the same as we get via the json api.

Also changing the _check_if_bootable will be called only from the
_parse_volume.

Change-Id: I32ba5001a84bbee9459b3c9ce7a70d48fede22bd
Cinder client does not honor disable_ssl_certificate_validation

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

Change-Id: I9bb6ff48a0d53b5b124e58c9959c9a43da8c7e5c
Closes-Bug: 1298019
Add list roles api to identity v3

Identity v3 lack of list roles, so I do the addition.
To test the addition, I add a test in :
- test_role_create_update_get
and rename it :
- test_role_create_update_get_list

Change-Id: I1163df683ad16643773b3c75d895296c7e601b6b
Stop neutron resource leaking even if an error occurs

In some test, if an error occurs in setUpClass(), some resources
are not deleted because of tearDownClass() is not called.
This commit fixes it.

 tempest/api
  +---- baremetal (unnecessary)
  +---- compute
  +---- data_processing (unnecessary)
  +---- database (unnecessary)
  +---- identity
  +---- image (done)
  +---- network         <-- this patch
  +---- object_storage
  +---- orchestration
  +---- queuing (unnecessary)
  +---- telemetry (unnecessary)
  +---- volume (done)

Partially Implements: blueprint stop-leaking

Change-Id: I580be8f974e3daa8ae4895ebb3e4311be8f9c242
Remove unused create_image of Nova v2 API

There are two create_image methods for Nova v2 API, but the one of
images_client.py only is used in most cases.
This patch removes the unused create_image of servers_client.py.

Change-Id: Icd457b6693c076c5c8b9d48bb88da162161c9a1a
Remove variable part of agent dict to fix AgentManagementTest

Agents may vary their configuration while API tests blindly
compare agent dicts. Need to pop items that may change.

Change-Id: I150f4e9f2e79f6e20f18dee69cf061c68a5bed68
Closes-Bug: #1299350
Stress action for volume attach verify

The new stress action is able to verify the volume attachment,
on the guest.

The ``new_volume`` option can help in finding out the issue is on the
nova side (or on things controlled by nova) or on cider side.

Change-Id: I2d4c8548a2617dd33e2f116fce8b0b3d379b808e
Use OS::Nova::Server for NeutronResourcesTestJSON

This is part of an ongoing effort to ensure there are no references to AWS::
resources in tempest.api or tempest.scenario

Partial-Bug: #1187942

Change-Id: I11ce6b164b6fb5507ee95a6b416dbe5d3352c77e
Add and use a StackResourceBuildErrorException

wait_for_resource_status was raising a StackBuildErrorException with incorrect
parameters, leading to an unhelpful error message.

This will log the nova console to help diagnose Related-Bug: #1295396
Closes-Bug: #1295404

Change-Id: I979f9edcc0b57924fd3dd681b60165a3db311e6e
unskip test_list_servers_filtered_by_ip

Bug #1170718 is fixed, so we can unskip the test_list_servers_filtered_by_ip.
Also making the test compatible with tenant+network isolation settings.

Change-Id: I31ec6baac41a084b2106bef2fb686030ba599c7f
Sahara: preparations for new tests

* Method "create_node_group_template" was slightly changed;
* New methods create/get/list/delete for cluster templates to API client were added;
* Method "create_cluster_template" was added;
* tearDownClass method was expanded;
* Some code formatting was done.

Partially implements: blueprint savanna-api-tests

Change-Id: Icbbe2295803ffba8d13b1af2c7fbae2c7e5cb4d4
Add network API test to create/update a port with 2 IP addresses

Test sequence is as follows:
- Create a network with 2 subnets.
- Create a port on the network with single IP addr from
  first subnet.
- Update port with a second IP addr from second subnet.
- Update port to return to a single IP addr.
- Clean up resources (port, subnets, and network) via
  the tearDownClass method of the BaseNetworkTest class.

Change-Id: I0036cd7fe412f4a371027fc5c323a7bc3ccce5b9
Enable security_groups_basic_ops blocking tests

Enable tests for security groups blocking traffic on default.
Check that bug 1252620 and bug 1112912 are fixed

Partially Implements: blueprint neutron-advanced-scenarios

Change-Id: I20d02d97664f1032e43e11c2465a26ae6f5be80e
Improve the extra routes test on router

Insure that the values returned by the
update_extra_routes method are correct and that
the show_router method returns the extra route
information.

Change-Id: I62891ebc522b1aa9689d9b4c0c8f88d9b4910c8b
Add V2 Nova API os-agents tests

This patch adds V2 Nova API - os-agents tests.

Change-Id: I18f1a95ac5e22a646da9aeb52f096f7caa82e8c8
Verify list_virtual_interfaces attributes of API

This patch adds the JSON schema for Nova V2 list_virtual_interfaces
API response and validate the response with added JSON schema
to block the backward incompatibility change in the future.

This patch also adds the mac address in common parameter type for
reusability amongs other schema.

The response body of list_virtual_interfaces V2 APIs is below:
{
    "virtual_interfaces": [
        {
            "id": "%(id)s",
            "mac_address": "%(mac_addr)s",
            "OS-EXT-VIF-NET:net_id": "%(id)s"
        }
    ]
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I261917920aea880cf3419f23478b6df322a10ded
Stop swift resource leaking even if an error occurs

In some test, if an error occurrs in setUpClass(), some resources
are not deleted because of tearDownClass() is not called.
This commit fixes it but doesn't touch the code of creating only one
resource without waiting for the resource creation.

 tempest/api
  +---- baremetal (unnecessary)
  +---- compute
  +---- data_processing (unnecessary)
  +---- database (unnecessary)
  +---- identity
  +---- image (done)
  +---- network
  +---- object_storage         <-- this patch
  +---- orchestration
  +---- queuing (unnecessary)
  +---- telemetry (unnecessary)
  +---- volume (done)

Partially Implements: blueprint stop-leaking

Change-Id: I69dd5bf9dbfa04e463b63f4f236fc0aa9e70e79a
Change to use absolute path in load_template()

If we execute the tempest in other path other than the root path of
tempest, the case will failed because can't find the template files.

Change-Id: Ic585546270b2c6d7a42d3128d752217d8d4e3860
Closes-bug: 1300597
Verify the response attributes of 'shutdown/reboot_host' API

This patch verifies the response attributes of 'shutdown/reboot_host' API.
The response body format of v2:
{
    "host": "d2576862a2144ee6ad37d9e1938460a2",
    "power_action": "shutdown/reboot"
}
The response body format of v3:
{
    "host": {
        "host": "77cfa0002e4d45fe97f185968111b27b",
        "power_action": "shutdown/reboot"
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I2e1ede52f7461e9d6fa583a00afc261f77314908
Add opportunity to directly update headers

Added change in request's methods in rest_client
for directly updating headers.
If someone want to add some custom headers to default headers
he can pass variable extra_headers=True in one of
the request's methods(POST/PUT/...) and headers should be
added to default headers

Change-Id: Ifbe49a9f7a6e2de780953ef9dcd39e443d74d151
Closes-bug: 1295661