Fix hardcoded gateway in IPV6 subnet api tests

This patch removes the hardcoding and calculates the Gateway-ip
based on the tenant_network_v6_cidr value.

Change-Id: Iee4c450714caf49d6753d9455e6ab3698b64340d
Closes-Bug: #1318962
Make unable to ping log messages appropriate level

The ping from an ssh connection checks in _check_remote_connectivity()
aren't necessarily expected to pass on the first attempt. However,
every time the ping was unsuccessful the method would log an
exception which is too severe a log for an expected error. This
commit uses a more appropriate log level for this case.

Change-Id: I8068fa85472259676acebd99b9d191065661e101
Add parametric tests of Swift object API, part 4

Add positive tests of Swift object "COPY" APIs from the viewpoint of
completeness of query parameters.

Change-Id: Iada4a9e00ce66dccd46993fd3edcc39c625c9022
Remove unnecessary log message

This commit removes a useless log message from call_until_true. The
debug log there provides no useful debug information, just printing
that the sleep loop iterated doesn't enable any extra debugging. In
the worst case it ends up polluting the logs with the same message
while the loop times out. So let's just remove it.

Closes-Bug: #1336591
Change-Id: Ia0cec5c699470554a25c077082878772158f4c5a
Adds test for Sec group default rule Nova V2 API

This patch adds the test for below 'os-security-group-default-rules'
Nova V2 APIs-
- Create Security Group default rule
- Delete Security Group default rule
- List Security Group default rule
- GET Security Group default rule

This patch also adds the new json client.

Related-Bug: 1311500

Change-Id: Icf52a64b5719587cd02b906f3a0f8d17886241aa
Running without keystone v3 doesn't require uri_v3

uri_v3 is not required if api_v3 is false.

Change-Id: I5d63ca38b9f07ea07383472fb7fa82b369c72216
Closes-bug: #1295132
Don't use swift roles when no swift

If openstack doesn't have Swift installation this role assign is
unnecessary and cause bugs and fails for other tests.

Change-Id: If3bbc49cde6144e883daaf77b8f551a0562c84c8
Adds new v3 projects tests to Keystone

This submission adds a new test script "test_list_projects.py"
which has list projects with filters test cases. Also adds
missing v2 tests in v3 projects test script. Hence made
required changes in support functions too. As there is a new
script test_list_projects.py with list cases in it, hence removed
the test_list_projects test case from test_projects.py script and
added it to test_list_projects.py

Change-Id: I2db83e7cb70d89e7516c92eba4cb24115203e143
remove default=None for config options

In the cfg module default=None is set as the default value.

Change-Id: I235decf26827bcb8076867f63c005ce5a80554fa
Move baremetal API tests to an /admin subdir

To avoid confusion, move all baremetal API tests to api/baremetal/admin and
add a README.rst explaining that the API provided by Ironic is meant to be used
as an admin and service level API.

Change-Id: Ib49b6d5937da6eedc3028a1f831552cf02d9f69e
Update compute attach tests to use "volume_device_name"

Some attach tests in the compute suites are using hard-coded
values for the volume device name. These should be replaced
with the compute.volume_device_name in tempest.conf.

Change-Id: I2f5da22b5f1bbd3910e4226b96e73106aa75c65a
Check rebuild server action API attributes

This patch adds the JSON schema for Nova V2 & V3 server action
'rebuild' API response and validate the response with added
JSON schema to block the backward incompatibility change in the future.

The response body of server rebuild V2 API is given below:
{
    "server": {
        "accessIPv4": "1.2.3.4",
        "accessIPv6": "fe80::100",
        "addresses": {
            "private": [
                {
                    "addr": "192.168.0.3",
                    "version": 4
                }
            ]
        },
        "adminPass": "seekr3t",
        "created": "2012-09-12T17:20:36Z",
        "flavor": {
            "id": "1",
            "links": [
                {
                    "href": "http://openstack.example.com/
                            openstack/flavors/1",
                    "rel": "bookmark"
                }
            ]
        },
        "hostId": "1e3da81662360b7e5ea6d8123031f67168b6992f20bb84df69",
        "id": "075e40fe-9f03-4652-ba8e-5f8e2547899a",
        "image": {
            "id": "70a599e0-31e7-49b7-b260-868f441e862b",
            "links": [
                {
                    "href": "http://openstack.example.com/openstack/
                            images/70a599e0-31e7-49b7-b260-868f441e862b",
                    "rel": "bookmark"
                }
            ]
        },
        "links": [
            {
                "href": "http://openstack.example.com/v2/openstack/
                        servers/075e40fe-9f03-4652-ba8e-5f8e2547899a",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/openstack/
                        servers/075e40fe-9f03-4652-ba8e-5f8e2547899a",
                "rel": "bookmark"
            }
        ],
        "metadata": {
            "meta var": "meta val"
        },
        "name": "foobar",
        "progress": 0,
        "status": "ACTIVE",
        "tenant_id": "openstack",
        "updated": "2012-09-12T17:20:37Z",
        "user_id": "fake"
    }
}

The response body of server rebuild V3 API is given below:
{
    "server": {
        "addresses": {
            "private": [
                {
                    "addr": "192.168.0.3",
                    "mac_addr": "aa:bb:cc:dd:ee:ff",
                    "type": "fixed",
                    "version": 4
                }
            ]
        },
        "admin_password": "seekr3t",
        "created": "2013-11-14T06:29:00Z",
        "flavor": {
            "id": "1",
            "links": [
                {
                    "href": "http://openstack.example.com/flavors/1",
                    "rel": "bookmark"
                }
            ]
        },
        "host_id": "28d8d56f0e3a77e2089172b68032e017045e20aa5dfc6cb66",
        "id": "a0a80a94-3d81-4a10-822a-daa0cf9e870b",
        "image": {
            "id": "70a599e0-31e7-49b7-b260-868f441e862b",
            "links": [
                {
                    "href": "http://glance.openstack.example.com/
                    images/70a599e0-31e7-49b7-b260-868f441e862b",
                    "rel": "bookmark"
                }
            ]
        },
        "links": [
            {
                "href": "http://openstack.example.com/v3/servers/
                a0a80a94-3d81-4a10-822a-daa0cf9e870b",
                "rel": "self"
            },
            {
                "href": "http://openstack.example.com/servers/
                a0a80a94-3d81-4a10-822a-daa0cf9e870b",
                "rel": "bookmark"
            }
        ],
        "metadata": {
            "meta_var": "meta_val"
        },
        "name": "foobar",
        "progress": 0,
        "status": "ACTIVE",
        "tenant_id": "openstack",
        "updated": "2013-11-14T06:29:02Z",
        "user_id": "fake"
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Ia75f7862bf8eac40f7a9b125fb7e101830da514b
Add new shelve compute feature flag

Shelving/unshelving is not supported across all drivers (e.g., Ironic).
This adds a new compute feature flag and skips tests where this function
is performed.

Change-Id: Ib94b479db2b691e73c6121c17cb47ae1c25636a8
Use python abc in auth class

Instead of using NotImplementedError the abc class has the advantage
that it fails faster if a class doesn't implement the needed interface.
Adapt unit test and test class.

Change-Id: Ide914a4bb577a28a3d202cbf088c404323a29b21
Partial-Bug: #1346797
test_neutron_resources to read template's values

test_neutron_resources create resources based on defined template
but the expected values are hard coded in this tests those should be
read from template.

Change-Id: I5ecc8742bab4c5d940c134945816c47acfba2282
Check rescue_server action attributes of Nova APIs

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

For V3 API, "admin_password" in response body is depend on config
variable "enable_instance_password". So schema and request
is adjusted accordingly.
NOTE - V2 rescue API's response does not on above config variable.

The response body of rescue server V2 APIs is below:
{
    "adminPass": "%(password)s"
}

The response body of rescue server V3 APIs is below:
If CONF.enable_instance_password is true-
{
    "admin_password": "%(password)s"
}
Else
    {}

Partially implements blueprint nova-api-attribute-test

Change-Id: I85f18eaa58bfef1871100816f97487f9fa9bc0ee
Avoid errors in log when neutron tests are skipped

The BaseNetworkTest class setUpClass() method will initialize
various class attributes which the tearDownClass() method
expects to exist. Unfortunately when Neutron is not
available, the entire of the setUpClass() method is skipped,
but tearDownClass() still runs. This causes the logs to get
polluted with errors about missing attributes during
tearDownClass(). eg

ERROR tempest.test [-] tearDownClass failed: type object
 'DHCPAgentSchedulersTestJSON' has no attribute 'ipsecpolicies'
TRACE tempest.test     for ipsecpolicy in cls.ipsecpolicies:

Make the tearDownClass() code be conditional on neutron
being enabled too.

Change-Id: I042ca5c47e5c1e8d1042754fd7f36036a40b2f03
Fix javelin2's skip logic in checks

The create logic always requires the top level section in the yaml file,
but it can be empty.

Change-Id: Ia06bba8877be1cf4e66dad21eaeb2a323bf9f9b5
Sahara: preparations for job tests

* create/list/get/delete methods to Sahara API client for jobs
  were added
* Method "create_job" was added
* tearDownClass method was expanded

Partially implements: blueprint savanna-api-tests

Change-Id: I8d52a7505aeb25b7de3f6c8479daa056b8c6eae7
Sahara: add API tests for jobs

* create/list/get/delete API tests for jobs were added

Implements: blueprint savanna-api-tests

Change-Id: I8110f4e62c6934967aa316a7027987390d5135a8