Add test to rescope token using v3

This adds a test that shows that an unscoped token can be used to
get a scoped token using the identity v3 API.

Change-Id: Ic0807dc8c91b0125bc9c447314cc095b511853ae
Enhance rescope token test using v3

There was a problem in Keystone recently where revoking a token
derived from another token caused the original token to be
revoked, so adding a test here to validate it continues to work
as expected.

Change-Id: Ifd210e49c3e15721264eb47eed453889d4e35942
Enhance test to rescope token using v2

There was a problem in Keystone recently where revoking a token
derived from another token caused the original token to be
revoked, so adding a test here to validate it continues to work
as expected.

Change-Id: I4b6a1440b661c075793e73edc52b4a5919d93d71
Add unit tests for debug

This commit adds unit tests for common.debug.

Partially implements bp unit-tests

Change-Id: I3ab573942293eea72294d395ae40e92c2126708d
Add unit tests for configurable network resources

This commit adds additional tenant isolation unit tests that cover
configuring which network resources are required for an isolated
tenant. In addition to testing network resource creation for the admin
and alt tenants.

Partially implements bp unit-tests

Change-Id: I8cbe836f9a2357f53bbbaeefd2b4ec74553089fb
Verify the response attributes of 'show_host_detail'

This patch verifies the response attributes of 'show_host_detail'.
The response body of v2 and v3 API has the same format:

"host": [
{
"resource": {
"cpu": 1,
"disk_gb": 1028,
"host": "5ca60c6792a1442f9471ff575443f94d",
"memory_mb": 8192,
"project": "(total)"
}
}
]

Partially implements blueprint nova-api-attribute-test
Change-Id: I1b9e698a97d487541abb26aea10fa20e79448f84
Make add_remove_fixed_ip tests executable in Nova gate

The tests of test_add_remove_fixed_ip were introduced in
  I8448de16d2243bd08db50562eb2714e07b62ea63
  I7f8dcead3c42ae01354891d9fe6fd1ced0136b72
But they are not executed in Nova gate now. We should test these APIs
like others.

Change-Id: Ifc02080ddf403cb51aaa48b4235c0d286082d10f
Closes-Bug:#1294912
Add Cinder quota negatives

This set of tests ensures we are denied from creating new volumes,
or snapshots when hitting one of the quota enforcements.

Change-Id: I2eded016f522b1e1c1b5ac961af1546db70de236
Adds "add_dhcp_agent" to test_dhcp_agent_scheduler

This submission is to verify add-dhcp-agent-to-network functionality
and also added required support functions in both XML/JSON interfaces.

Change-Id: I6e9f8336db6d72b1123220f792091ca17b1b1647
Add Keystone role and service test cases

Add two test cases about Keystone role and service:
test_get_role_by_id
test_create_service_without_description

Change-Id: I5c09e82bb9afbb6d1d8a81dfd6e7408b4ffdd58f
Check create/delete keypair attribute of Nova APIs

This patch adds the JSON Schema for response of Nova V2 & V3
create & delete keypair APIs and validate the response with
added JSON Schema to block the backward incompatibility change
in the future.

The response body of V2 & V3 create_keypairs APIs is same and
given below:

{
    "keypair": {
        "fingerprint": "%(fingerprint)s",
        "name": "%(keypair_name)s",
        "public_key": "%(public_key)s",
        "user_id": "fake",
        "private_key": "%(private_key)s"
    }
}

Response status code differ for create and delete keypairs

V2 - create_keypair = 200
V2 - delete_keypair = 202
V3 - create_keypair = 201
V3 - delete_keypair = 204

Partially implements blueprint nova-api-attribute-test

Change-Id: I179f0f11a43324d81ecbb41c0eae2f7072e8979a
Add unit tests for NegativeRestClient class

This commit adds unit tests for NegativeRestClient.

Partially implements bp unit-tests

Change-Id: I47db1b23b85b7636516292d4a6b78fba0afcfe99
Skip volume snapshot tests if feature is not enabled

Not all cinder volume backends support volume snapshot. For instance,
the default NFS backend doesn't. This patch adds a new entry to
CONF.volume_feature_enabled to add the possibility to skip volume
snapshot tests.

Change-Id: I40ce17924bbe4eb6f1c941df974bfa832ec2a999
Typo in config.py

Change-Id: I172f44dc4115b520c7dcac7d632b49780574582d
Stop leaking in images tests

Resources created would not be cleanup if exception raised
in setUpClass. This patch use decorator 'safe_setup' to
cleanup those resources in images tests.

Partially Implements: blueprint stop-leaking

Change-Id: Ifbb534c008af0f6aca2a75d5c98d6e451a71eacd
Validate for list flavor attributes of V2/V3 APIs

This patch adds the JSON schema for Nova V2/V3 list flavor APIs
response and validate the response with added JSON schema to
block the backward incompatibility change in the future.

The response body of V2 & V3 list flavor APIs is same and given below:

{
    "flavors": [
        {
            "name": "m1.tiny",
            "links": [
                {
                    "href": "http://openstack.example.com/v2/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "http://openstack.example.com/flavors/1",
                    "rel": "bookmark"
                }
            ],
            "id": "1"
         }
    ]
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Ie0539e2b81e6a3446cbd705afe223c8a178bd13f
Update documentation for negative testing

Since generate_scenario() call is not needed any longer update the
documentation to the current state.

Change-Id: I34e8b974d5c4851a27f53a20778a181985ff6b5b
factor out templates to yaml files

factor out the heat templates into proper yaml files, and provide
a loader for yaml and json files to make it easier to manage and
review templates vs. code in heat tests.

Change-Id: Iabe8abe113cc48da54cad6fb1ba4e4b48fb17cf5
Removing unnecessary pieces of code from network client

In the file "json/network_client.py" methods "update_vpnservice" and
"update_ikepolicy" does not have any significant meaning here.
All these cases are covered in the "network_client_base.py" file.
This patch implements this requirement.

Change-Id: I2fc3bbd8e1bdde9d4548d0ffba1a60c1742f7895
Check hypervisor statistics attributes of Nova API

This patch adds the JSON Schema for response of Nova V2 & V3
hypervisor statistics APIs ('os-hypervisors/statistics)
and validate the response with added JSON Schema to block
the backward incompatibility change in the future.

The response body of V2 & V3 hypervisor statistics APIs is same
& given below:

{
    "hypervisor_statistics": {
        "count": 1,
        "current_workload": 0,
        "disk_available_least": 0,
        "free_disk_gb": 1028,
        "free_ram_mb": 7680,
        "local_gb": 1028,
        "local_gb_used": 0,
        "memory_mb": 8192,
        "memory_mb_used": 512,
        "running_vms": 0,
        "vcpus": 1,
        "vcpus_used": 0
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I7cd1e81c722e0117b9f2fc98e9b2d2bf7eb5177c