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
Merge duplicate code for network quotas tests

There is some duplicate code between test_quotas and test_lbaas_quotas.
To clearify the difference between them and the purpose, this patch merges
most code of them into a single internal method.

Change-Id: I05a9c92d052ea2f99694a588c2a3cebbde625166
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
Read template's expected value orchest test Part-2

In tests under /tempest/api/orchestration/, resources gets
created based on parameters defined in template (yaml, json).
But while verification of output, expected values are hard coded
in tests.
Expected values should be read from template only.
This patch covers the following files -
    test_environment.py
    test_nova_keypair_resources.py
    test_swift_resources.py

Closes-Bug: #1327919

Change-Id: Ie241b7f299487cd0db384778225823e96fecf440
Enable some volumes v2 tests by sharing codes

1. create volumes v2 tests using the existent test class.
2. create a new test class for v1, which inherits v2.
3. add variable 'special_fields' to deal with the different
   field's name and reps code between v1 and v2.

This patch includes the following volumes tests:
- test_volume_metadata.py
- test_volume_transfers.py
- test_volumes_actions.py
- test_volumes_get.py
- test_volumes_negative.py

Partially implements: blueprint cinder-v2-api-tests

Change-Id: I30b8f38d1f8132ea28266a32d2c9cb912a70e2c3
Avoid conflicts with other tests instances

Avoid conflicts with other instances that exist, for example when
weren't deleted in other tests. Just filter out them in test that
check instances amount by server IDs

Closes-Bug: #1340382
Change-Id: I51494c9f47745810583f682caadcd8772805733a
Add "capabilities:" to multiple_backends extra-spec key

cinder-scheduler uses all the "capabilities:" to scope the
cinder-volume. With no "capabilities:" prefix set in extra_spec,
it will be no effect from cinder-scheduler to schedule the
cinder-volume, which is not the purpose of the testcase.
To address the review comment, This change will not remove but
adds 2 cases for the "capabilities:" prefix to volume type key:
extra-spec "capabilities:volume_backend_name".

Change-Id: Ie870091f2a5657b3ab6a0171de2cffe6945a0f7c
Closes-Bug: #1295050
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
Call clear_isolated_creds in scenario tests

After commit b7144eb08175d010e1300e14f4f75d04d9c63c98, tempest.scenario.manager
doesn't clear isolated credentials anymore. This patch adds a tearDownClass
method to class OfficialClientTest so isolated credentials can be cleared.

Change-Id: Ic03e0d5026e09bff6d1d20daf2ee72bfdb106145
Closes-Bug: #1343027
Add base class for all credential providers

Defines the base interface of all credential providers. User of this
will be the existing isolated_cread provider and the a new user_list
provider.

Change-Id: If382b549428c15ebb2ed850be9e0405e84226f6c
Partially-implements: bp/test-accounts
Migrate test_dashboard_basic_ops to tempest clients

Just switched from OfficialClientTest to ScenarioTest because
TestDashboardBasicOps does not use methods of OfficialClientTest.

Change-Id: I3b8eb90e058cde03cb40f120bb2c268f31ae078c
Partially-implements: bp:tempest-client-scenarios
Fixes incorrect assertion check

assertNotIn/assertIn does not work if the second
variable is of type List of dictionaries.
Suppose if it of only dictionary type, it will try
to match only 'key' but not 'value'.
Hence, the assertion check done here is not correct.

This patch fixes an incorrect assertion check for
"BasicOperationsImagesTest.test_delete_image" test

Change-Id: I7058d209cc92a2e381308e59e07d180e84bde182
Closes-Bug: #1346757
Skip migrate server invalid state if resize is off

The migrate (aka cold migration) can be considered a special case of the
resize with a flavor_id equals to None. For that reason to perform
the migrate tests we need to be sure that the resize is enabled.
This patch adds a skip decorators to verify that.

Change-Id: I3a02b1bd210e3934dfd61d4182b301cc33d8a962
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
Add client response checking for data processing service

* Checks for response status codes to client side were added
* Checks for response status codes from all tests were removed

Partially implements: blueprint client-checks-success

Change-Id: Ib2a2632460aa39f5c7cfc66dbc601c5fa1a1baa5
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