Add tempest test for heat resource OS::Nova::KeyPair

The template will create two OS::Nova::KeyPair and will test that:
   [*] The key with save_private_key flag set to true outputs both
       public and private keys.
   [*] The key with save_private_key flag set to false outputs
       only the public key.

Testing other cases will require to recreate the stack and
include a negative test case.

Change-Id: I751a85e0efd997a1238c53d8802ebdd8b551e7aa
Partial-Bug: #1271995
Add test for OS::Neutron::Router Heat resource

Added a test that checks that a OS::Neutron::Router is created
correctly.
Replaced all OS::Quantum with OS::Neutron.
Replaced all Ref with get_param or get_resource.
Lower case instead of Upper case when applies.

Change-Id: I9f4828eee8517422847c05fbb45530699abe8e96
Partial-Bug: #1269569
Add logging config values

This commit adds logging config values to Tempest. Users of Tempest can
know the config values exactly when Tempest runs.

Change-Id: I4ae50021812b7c49e26c19ef1db941e2eccec8c4
Add check_uptodate.sh to run_tests.sh -p

Now, check_uptodate.sh is executed by 'tox -epep8' or using it directly.
We have run_tests.sh for convenience and many developers use it for
checking their code. So we should also have 'check_uptodate.sh' in
run_tests.sh.
This commit adds check_uptodate.sh to 'run_tests.sh -p'

Change-Id: I4c994e0589cfd6cb213aed5acd232670fc320a26
Add more information to BuildErrorException

This commit adds expected_status to BuildErrorException. This is helpful
for checking the error details.

Change-Id: I2979d39467daeb06793081b83e3a5b81b7d5623e
Closes-bug: #1265559
Test to list ports filtered by router ID

Added a test case 'test_port_list_filter_by_router_id'to test_networks.py
in 'tempest/api/network'. This test case adds an interface to router using
port ID and checks if 'list_ports filtered by router id' returns only one
port that was added while creating interface

Change-Id: I1d33614a277ff6767cbb4619de0ebef43b4980b1
Add nova migration-list CLI test

Change-Id: I22b49ee3244ff1c05a0041f0d8a5719824617b68
Add support for special char in volume metadata

Using special characters such as "&" in volume metadata caused
a server error when using the XML volume client because these
chars were not being escaped.

Closes-Bug: #1268513
Change-Id: I03d5f4d1f7480f8a3c405f77143835f1a9be7ec4
Adds list pool stat test case

This submission is to validate the list pool stat feature.
Adds a test case to test_loadbalancer.py and support function
in XML/JSON interfaces

Change-Id: Ia284334c9127ec200a48c098d28bdaf188281887
Adapt documentation for negative testing

With the introduction of the new negative testing framework the workflow
for new test has changed.

Partially-implements: bp negative-tests
Change-Id: I522c2be227a120a6a714349fa29b31e60b5e0bf4
Fix coverage option for run_tests.sh

This commit fixes run_tests.sh so that when the -c flag is specified
coverage will actually be collected. Previously the --coverage option
was added to testrargs, however this isn't a testr flag. It is used by
pbr to wrap testr with coverage start and coverage report. This changes
run_tests() so that when coverage is specified it runs the unit tests
using setup.py so that the coverage flag can be used.

Change-Id: Iad0d508b6a4638a67e45646148144f627588fa48
clean up security groups tests

This patch clean up test codes of security groups in the
following items:
1. add a helper function create_new_security_group to replace the
   duplicate codes in test methods
2. remove duplicate test case test_security_group_create_delete
   in test_security_groups.py
3. use data_utils.rand_uuid() instead of str(uuid.uuid4())
4. import test module instead of attr

Change-Id: Iaf1a267134a12a664a0f306980c9cb39fe5ac1eb
cleanUp() removing all test resources as an admin

Add a parameter in tempest.conf "full_clean_stack" to
allow/prevent the use of cleanup() method at the end
of a stress test run.

This is mandatory to use stress tests in a multi-user
environment since the actual cleanup() is designed to
remove every object of every tenant (and thus will
impact other users on the same openstack)

Change-Id: I42dc9592617aeeca9660f670940ecbf50b6108ab
Closes-Bug: #1273254
Fix request id log messages

Previously when logging request ids tempest would incorrectly print
which service the request id came from. This was based on the faulty
assumption that x-compute-request-id was only returned by nova. It's
returned by both nova v2 and cinder. Also originally
x-openstack-request-id was only used by glance but other projects have
adopted it as well. Moving forward all the services will converge on
using that header. This commit just updates the log messages to make
what is written to the log consistent with the current state of the
header.

Change-Id: Idd0514794768840c2c9911ad189552cf455ea849
Replace assertEqual(None, *) with assertIsNone in tests

Replace assertEqual(None, *) with assertIsNone in tests to have
more clear messages in case of failure.

Change-Id: I2732b3e747bd9394f9add7f1b077b366864fddd7
Closes-Bug:#1280522
Add api tests for neutron router

Add tests for:
- Update router administrative state
- Add several interfaces (to different subnets) to a router
Add improvements for:
- When removing an interface, assert correct subnet id from the response
- When removing an interface, assert correct port id from the response

according to https://etherpad.openstack.org/p/icehouse-summit-qa-neutron

Change-Id: I538e8bed2f5c726ebd610d406702d4ef9de88723
Neutron LBaaS Agent Scheduler API test

Adds a script to test the Neutron API extension for the Load Balancer Agent
Scheduler. Also adds to the Neutron ReST client the methods to support said
API extension

Change-Id: I3cc171e340a67b827a857e0f0a887ed7348b3cae
Neutron Extra DHCP Options API test

Adds a script to test the Neutron API extension for Extra DHCP Options

Change-Id: I9af41eb90fc7ea5bb8eb77ee71cd03b9c19b7fa1
Prepare for enabling H302 rule (api/object_storage)

We can use H302 rule but ignore it now. This commit prepares for
enabling H302 rule. But this commit modifies tempest/api/object_storage
only and excludes some violations[1] because if we fix all of them at
one time, it's hard to merge this commit.

[1]
 tempest.test.attr
 tempest.common.rest_client.RestClient
 tempest.common.rest_client.RestClientXML
 tempest.services.compute.xml.common.xml_to_json
 tempest.services.compute.xml.common.Element
 tempest.services.compute.xml.common.Document
 tempest.services.compute.xml.common.Text
 tempest.services.compute.xml.common.XMLNS_11
 tempest.services.compute.xml.common.XMLNS_V3
 tempest/clients.py

Change-Id: Ieaa403500e6d287ee2eac2ccdf921c7eca1e6e61
Removes vim headers 5th round

This is a follow up on:
   Change-Id: If56b28d0efb6364fe2105f7d62d6a2b05b906070

The vim headers in all the files are being removed. We've missed these
files because of delays in the patches.
I hope this is the last one for Tempest.

Change-Id: I55dcbc7de4106bc5de852c77d85cf97ac5dab18a
Closes-Bug: #1229324