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
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
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
Read template's expected value orchest test Part-1

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 adds the helper to load the values from template
(yaml, json) and apply the changes in
tempest/api/orchestration/test_volumes.py

This patch also rename the existing load_template() function
as it read the template and newly added function load the template
This rename the load_template() to read_template in
tempest/api/orchestration/base.py and corresponding calling files.

Partial-Bug: #1327919

Change-Id: Ie0817e20cb7bacdf33b16fb222a7ee9c91109fc8
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
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
Re-enable 'check_trust_roles'

Re-enable the 'check_trust_roles' method. This can be
merged after the patches for change id
I13ce159cbe9739d4bf5d321fc4bd069245f32734 are merged
(master and stable/icehouse for Keystone).

This changeset updates the new location for the check_trust_role
HTTP status validation (in services/identity/v3/json/identity_client.py).
Previously this was located in identity/admin/v3/test_trusts.py.

Commented code indicating the above location change occurred has been
removed.

Change-Id: If1b7f18d7a357f4b3a4b478e300a17f2cc4a6159
Closes-Bug: #1334368
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
Removed deprecated command from glance cli

Member-add is no longer a command in python-glanceclient and
should be removed since it has been deprecated. We are removing
all the deprecated glance client commands in this patch 
https://review.openstack.org/#/c/98862/.

Change-Id: I69f7ca5ca0e1d9505334f081b7de1f43e6b2f86c
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
Fix a few bugs when running with -u

The default conf file locator needed to reference the file another level up.

The config file set/write did not work if more than one option was changed.
I'm not sure why but think it would be better to just read once, set the
options, and write at the end anyway.

If we are updating and a service is there but not mentioned in the conf file,
we change the conf to True so should also add the service to the available
services.

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

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

Change-Id: I235decf26827bcb8076867f63c005ce5a80554fa