Stress action for volume attach verify

The new stress action is able to verify the volume attachment,
on the guest.

The ``new_volume`` option can help in finding out the issue is on the
nova side (or on things controlled by nova) or on cider side.

Change-Id: I2d4c8548a2617dd33e2f116fce8b0b3d379b808e
Sahara: preparations for new tests

* Method "create_node_group_template" was slightly changed;
* New methods create/get/list/delete for cluster templates to API client were added;
* Method "create_cluster_template" was added;
* tearDownClass method was expanded;
* Some code formatting was done.

Partially implements: blueprint savanna-api-tests

Change-Id: Icbbe2295803ffba8d13b1af2c7fbae2c7e5cb4d4
Add network API test to create/update a port with 2 IP addresses

Test sequence is as follows:
- Create a network with 2 subnets.
- Create a port on the network with single IP addr from
  first subnet.
- Update port with a second IP addr from second subnet.
- Update port to return to a single IP addr.
- Clean up resources (port, subnets, and network) via
  the tearDownClass method of the BaseNetworkTest class.

Change-Id: I0036cd7fe412f4a371027fc5c323a7bc3ccce5b9
Enable security_groups_basic_ops blocking tests

Enable tests for security groups blocking traffic on default.
Check that bug 1252620 and bug 1112912 are fixed

Partially Implements: blueprint neutron-advanced-scenarios

Change-Id: I20d02d97664f1032e43e11c2465a26ae6f5be80e
Improve the extra routes test on router

Insure that the values returned by the
update_extra_routes method are correct and that
the show_router method returns the extra route
information.

Change-Id: I62891ebc522b1aa9689d9b4c0c8f88d9b4910c8b
Stop swift resource leaking even if an error occurs

In some test, if an error occurrs in setUpClass(), some resources
are not deleted because of tearDownClass() is not called.
This commit fixes it but doesn't touch the code of creating only one
resource without waiting for the resource creation.

 tempest/api
  +---- baremetal (unnecessary)
  +---- compute
  +---- data_processing (unnecessary)
  +---- database (unnecessary)
  +---- identity
  +---- image (done)
  +---- network
  +---- object_storage         <-- this patch
  +---- orchestration
  +---- queuing (unnecessary)
  +---- telemetry (unnecessary)
  +---- volume (done)

Partially Implements: blueprint stop-leaking

Change-Id: I69dd5bf9dbfa04e463b63f4f236fc0aa9e70e79a
Verify attributes through Nova os-security-groups API

This patch adds checks whether a response of Nova security group
get/create/update API includes the attributes to block the backward
incompatibility change in the future.

The response body of v2 get/create/update API is the below:
{
    "security_group": {
        "id": 10,
        "name": "sg1",
        "tenant_id": "bd9a4c2ed39e49f4aa525e99a5f92454",
        "rules": [],
        "description": "Test security group."
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I7888e1e483ff77adcaf2bd9a38676bd2075e1305
Don't output auth tokens with trace output

The tokens are huge and make it difficult to follow the calls and are not
usually of interest.

Change-Id: Id35eeabedd7b460bf4d200770b2412b5233aed45
safe_setup preserve original trace

When safe_setup reraies the exception the traceback was
replaced by the trace of the re-raise postion.

This change is aiming to preserve the original stack trace,
by saving the original trace and raiseing new exception from the same
type with the original trace.

Change-Id: I16851a0c1d40d7f7253c23f066fa8c19267f4d9a
Add check that service tag isn't in path name

This commit adds a new hacking check to ensure that a service tag
isn't added on a test whose path includes the service tag being added.
Having a service tag added where the path already contains the service
name is redundant.

Partially implements bp add-service-tags

Change-Id: I88b3005d05e17751045d766efb1e965822a3c50e
Unit Tests for glance_http

This patch tests most of what is currently in use by Tempest of
glance_http.
There is a comment regarding this matter, but reafirming there is no
class testing against glance_http's https backend since it also ends up
using httplib.

Partially implements bp unit-tests
Change-Id: Iaa2477da4b559e4383fd8904ae4185edcb0dea36
Remove test_create_server_response

If enable_instance_password is set to False in nova.conf, the response
of "create a server" API does not contain AdminPass/admin_password.
In addition, the response already is checked with JSON schema definition.
So test_create_server_response became unnecessary.

Change-Id: Id62a8d447c36eaf0b1f64a93929c4cfa2c20e2ae
Fix url parsing for api version check

This commit fixes a couple of oversights in the common api version
check function. The previous version of the method would never work
because the url wasn't passed to urlparse, and the resulting endpoint
url would be missing a ':' even if it were.

Change-Id: I4b6bb47f0601063aa8164ded386ca71adc6ccc80
Fix service list in verify_tempest_config

This commit updates the service list for verify_tempest_config. The
list was not updated to include new options for marconi and trove. It
also wasn't updated for the sahara rename.

Partially implements bp config-verification

Change-Id: I00500e104dda34098cf445f4bbd522ea843fcabf
Add cinder api version detection to verify_tempest_config

This commit adds a check for the cinder api versions that are
supported and checks that with what is set in the config file.

Partially implements bp config-verification

Change-Id: Ifce002a6f42c1565992299965bcc490f20aa5887
Consider state in firewall create/delete test

Firewall creation and deletion happens asynchronously.  It is not possible
to delete firewalls until they have become ACTIVE or to delete policies
or rules until its associated firewall has been completely deleted.

This updates the test_create_show_delete_firewall test to create the tenant
network resources required for an ACTIVE firewall and waits on the the
required state changes.  Also, this omits the 'status' key when comparing
the created firewall with the listed firewall as it is very much transient
during this phase of the test.

Change-Id: I556af59b5b22123229cb4d8ddcac9ce6a8b8f49c
Closes-bug: #1302942
Fix test_verify_created_server_ephemeral_disk

The test_verify_created_server_ephemeral_disk tried to:
- handled  sub functions as object method
- Tried to get the fixed IP address from the first (BUILD) server response.
- Handled the partition number incorrectly
- Created an additional server without a need
- Expected incorrect status codes on the v3 test
- v3 version created more disk (+swap)

Change-Id: Iad55c4c7e247f1b3534ff41400feea2faf939863
Implements: blueprint ssh-auth-strategy
Remove test_create_port_with_no_ip

The check test_create_port_with_no_ip does can be performed by adding
self.assertEqual(port['fixed_ips'], []) to test_show_port.

Plus, amended docstrings.

Change-Id: I31e31657ab18ec22d4f2c66b1d34f8762ab99daf
List multiple fields tests for networks/ports

* use dictionary as input parameter in urlencode as it is a
  little simpler than two-element tuples
* add list multiple fields tests for network/port
  original tests only test one field, this patch adds another one

Change-Id: I0d8b7412dc576e5f0bb5147678721d26a24f8273
VPNaaS API tests cleanup

This patch removes some redundant method definitions
that could be autogenerated with _create method of NetworkClientBase
class

Change-Id: Iec8d672a1744f7d851adaaeb54130a94618b76bf