Cleanup common.debug

The debug module has a list of iptables tables but not used it. This
commit fixes it.

Change-Id: Iefb1d6a17ddc01823d5c0a524ffda8723df4d9da
Verify the response attributes of 'get_aggregate'

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

{
    "aggregate": {
        "availability_zone": "nova",
        "created_at": "2013-08-18T12:17:56.380226",
        "deleted": false,
        "deleted_at": null,
        "hosts": [],
        "id": 1,
        "metadata": {
            "availability_zone": "nova"
        },
        "name": "name",
        "updated_at": null
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Ic23926ee6c4e1585a9a464df2d485f51bbf87972
Add os-migration tests for Nova v2 API

v2 os-migration API returns a body which includes the info like:

  {
    "migrations": [
      {
        "id": 1,
        "status": "finished",
        "instance_uuid": "e9e4fdd7-f956-44ff-bfeb-d654a96ab3a2",
        "source_node": "localhost-dev",
        "source_compute": "localhost-dev",
        "dest_node": "localhost-dev",
        "dest_compute": "localhost-dev",
        "dest_host": "192.168.11.100",
        "old_instance_type_id": 6,
        "new_instance_type_id": 2,
        "created_at": "2014-03-18T00:14:49.000000",
        "updated_at": "2014-03-18T00:15:15.000000"
      }
    ]
  }

This patch adds this API tests.

This patch adds tests for JSON format only without XML format because
the XML support has been marked as deprecated in Nova with the commit
I4acc15ce5f487738bb34a95c2261a5d05d827d8d and it will be removed in
Juno cycle.

Change-Id: I0e19b776313eff98d157e1249333174908061798
Verify the create/delete volume APIs attributes

This patch adds the JSON schema for volume create & delete APIs
and validate the response of Nova Volume list APIs with added JSON
schema to block the backward incompatibility change in the future.

The response body of Nova API volume create is the below:

{
    "volume": {
        "id": "%(uuid)s",
        "status": "in-use",
        "displayName": "%(volume_name)s", null
        "availabilityZone": "zone1:host1",
        "createdAt":  "%(timestamp)s",
        "displayDescription": "%(volume_desc)s",
        "volumeType": "Backup",
        "snapshotId": null,
        "metadata": {},
        "size": 100,
        "attachments": [
            { "device": "/",
              "serverId": "%(uuid)s",
              "id": "%(uuid)s",
              "volumeId": "%(uuid)s"
            }
        ]
    }
}

delete volume API does not return any response body.

Partially implements blueprint nova-api-attribute-test

Change-Id: I84069dae64a70bc2a4f2313bb3da4e86630e4b1b
Adds Ironic test_baremetal_basic_ops scenario test

Adds an Ironic scenario test that validates a full instance
boot using Ironic.  In addition to verifying the Nova instance
boots and has connectivity, it monitors power and state transitions
on the Ironic side.  It currently validates orchestration of the pxe_ssh
driver but the goal would be to support other drivers, and test them
conditionally based on the driver associated with the configured Ironic
node.

Change-Id: I7a98ab9c771fe17387dfb591df5a40d27194a5c8
Verify detail_list flavor attributes of V2/V3 APIs

This patch adds the JSON schema for Nova V2/V3 detail_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 detail_list flavor API is below:

{
    "flavors": [
        {
            "name": "m1.tiny",
            "links": [
                {
                    "href": "http://openstack.example.com/
                             v2/openstack/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "http://openstack.example.com/
                            openstack/flavors/1",
                    "rel": "bookmark"
                }
            ],
            "ram": 512,
            "vcpus": 1,
            "swap": "",
            "disk": 1,
            "id": "1",
            "OS-FLV-DISABLED:disabled": false,
            "os-flavor-access:is_public": true,
            "rxtx_factor": 1.0,
            "OS-FLV-EXT-DATA:ephemeral": 0
        }
    ]
}

The response body of V3 detail_list flavor API is below:

{
    "flavors": [
        {
            "name": "m1.tiny",
            "links": [
                {
                    "href": "http://openstack.example.com/
                             v3/openstack/flavors/1",
                    "rel": "self"
                },
                {
                    "href": "http://openstack.example.com/
                            openstack/flavors/1",
                    "rel": "bookmark"
                }
            ],
            "ram": 512,
            "vcpus": 1,
            "swap": 0,
            "disk": 1,
            "id": "1",
            "disabled": false,
            "ephemeral": 0,
            "flavor-access:is_public": true,
            "os-flavor-rxtx:rxtx_factor": 1.0
        }
    ]
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I3a07ada712271d0d147c0019bbb4b63c4622461a
Honor suspend/pause config switches in scenario tests

Some tests missed checking for compute features as
set in compute-feature-enabled section in tempest.conf.

Reduce double-coverage of pause/suspend tests between
basic and advanced server tests by removing pause and
suspend actions in basic ops test.

Closes-bug: 1296858

Change-Id: I80d785bb5b325ccfac3c5cfd9d076718cf587e80
Check attributes of get server password Nova APIs

This patch adds the JSON schema for Nova V2 & V3 get server password
APIs response and validate the response with added JSON schema
to block the backward incompatibility change in the future.

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

{
    "password": "%(encrypted_password)s"
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Iaec82632fd377435cdb10f8ac2e40c4fbd9f98f2
Missing baremetal driver API test

As a part of blueprint, this patch implements following API test -
Driver APIs -
1. Retrieve a list of drivers.

'fake' driver is created by default during ironic installation.
For this please have a look on -
https://github.com/openstack/ironic/blob/master/setup.cfg#L33

part of blueprint: missing-baremetal-api-test

Change-Id: I5abe62f2fb9aec103ce4e127a28f488ef1f342df
Multiple fixes to test_server_basic_ops

* self.keypair has a private_key attribute, not private. This patch
fixes that.

* remote client connection is obtained but not validated. This patch
  adds that by calling validate_authentication()

Change-Id: I42f6bd65c746f86d7f5cc143e193dbb03503829b
Volume size could be specified to create volume

1. Provide a "volume_size" config at VolumeGroup
2. Make size as optional prameter, modify all volumes_client to
read the size from CONf if size is None.
3. Modify the testcase: test_volume_create_get_update
_delete_from_image to call create_volume with no size
parameter specified.

Change-Id: I2897f6d6bd970f73867f56d9d23a768cafcbfd80
Closes-Bug: #1293885
 Verify the response attributes of 'aggregate-set-metadata' API

This patch verifies the response attributes of 'aggregate-set-metadata'.
The response attributes of v2 and v3 are the same:
{
    "aggregate": {
        "availability_zone": "nova",
        "created_at": "2012-11-16T06:22:22.342791",
        "deleted": false,
        "deleted_at": null,
        "hosts": [],
        "id": 1,
        "metadata": {
            "availability_zone": "nova",
            "key": "value"
        },
        "name": "name",
        "updated_at": null
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I8940a18e71540aec300023e6736a3318b253d702
Merge "Missing baremetal driver API test"
Merge "Check attributes of get server password Nova APIs"
Merge "Cleanup common.debug"
Merge "Add os-migration tests for Nova v2 API"
Verify delete quota response of V2/V3 APIs

This patch adds the JSON schema for response status of Nova quota delete APIs
to block the backward incompatibility change in the future.

delete quota does not return the response body.
Response status of above APIs is below:
V2: 202
V3: 204

Partially implements blueprint nova-api-attribute-test

Change-Id: I3113e3a07937bd7cb44a19e5ef4a5fb880ce3721
Merge "Verify delete quota response of V2/V3 APIs"
Merge "Verify the response attributes of 'get_aggregate'"
Merge "Verify the create/delete volume APIs attributes"