API tests for neutron router gateway

This patch adds tests for validating the Neutron API for managing
router gateways.

To run these tests successfully, the neutron client has been augmented
with a method to send the enable_snat attribute to the server; this
method should be invoked only when the client has admin credentials;

Also, this patch adds the capability of specifying filter when
querying the API for ports, as this is needed by gateway tests.

Change-Id: I4e92384559bb2093c0eddf78f5dbb526af1acc38
Closes-Bug: #1228091
add extend volume tests:

- test_volume_extend
- test_volume_extend_with_size_smaller_than_original_size
- test_volume_extend_with_non_number_size
- test_volume_extend_with_None_size
- test_volume_extend_with_nonexistent_volume_id
- test_volume_extend_without_passing_volume_id

Closes-Bug: #1214251

Change-Id: I05d96109fdbdae47949126e852db6f274e3c2c4f
RunTimeError on tearDownClass explained

The RunTimeError appearance on the console frequently caused
confusion, so it's message now explains the situation in a more
verbosely.

Change-Id: I904eeb09f6a7e7ea8a2121bc451d57ddf5f1d277
Sync fixtures from oslo and use LockFixture

This commit adds fixture to openstack-common.conf to sync fixtures
from oslo. This patch also updates the location from which
LockFixture is used. It was originally in
tempest.openstack.common.lockutils but it was moved to the fixture
module.

Change-Id: Icffa613b92e059926b5394e9881ae0d8fe7fa910
Sync latest module versions from oslo-incubator

This commit just syncs the latest modules from oslo-incubator, which
includes removing the second copy of LockFixture from the
tempest.openstack.common.lockutils module.

Change-Id: Ib9b07fe733dc2c924ac0eb054fa707dd352a812b
assertTrue to assertIn

* replacing the assertTrue where simply replaceable with assertIn
* The assertTrue(len(foo)>1) style extended with str(foo) details,
  where expected len is greater than 1.

Change-Id: I7515e879e3e24ce041a4fcae63d9d4a5f257f37d
add some negative tests for force_delete/restore

- test_force_delete_nonexistent_server_id
- test_force_delete_server_invalid_state
- test_restore_nonexistent_server_id
- test_restore_server_invalid_state

negative tests should stay in negative files of corresponding action.

Change-Id: Icafcb1e17382f8856937e8e903650fb424b00a25
Update mailmap for Joe Gordon

Update mailmap to reflect that I am committing from a new email address.

Change-Id: I8d21f85f7306d5f926099a3b9ea047706c4af0d7
Add base test class for unit tests

This commit adds a base test class for the tempest unit tests. The
base class uses fixtures to capture STDOUT and STDERR as well as
providing an interface to use mox to stubout tests.

Change-Id: Ia60cccd77cfb6489f888ff088351fe267115a22f
Move decision_maker() call into setUpClass

Previously the class level call of decision_maker() to detect certain
configuration details for the boto tests was mad in the class
definition. This has issues with unit testing because it requires a
functional config at import time for the file. This commit avoids this
restriction by moving this call into setUpClass for BotoTestCase which
won't try to execute decision_maker() at import.

Change-Id: I8abf4ae109576499fed6b31ae644c1bac58e3350
edit inheritence tree api/network/security_groups

changed negative tests from "smoke" to "gate"

avoid running "father's" test cases in son
both positive and negative now derive from common TestCase without
"test_" methods

previous:
BaseNetworkTest
	SecGroupTest
		NegativeSecGroupTest

new tree:
BaseNetworkTest
	BaseSecGroupTest
		SecGroupTest
		NegativeSecGroupTest

Change-Id: Ia438b9d0c591c1c250443f6b6d069d41b6d71097
Test for flavor-access-list with private/public flavor

Add test for API "/flavors/{flavor_id}/os-flavor-access"

Change-Id: I128167d26f97b0b332664232d296ca9db43a9ecc
Stop testing deprecated command nova-manage instance_type

'nova-manage instance_type' was deprecated in Havana, and in order to
remove it in Icehouse we have to stop testing it in gate.

Related to Ieb3775e0a43084d00624f9e1d8b879c312e32b3c

Change-Id: I1ca490593d3a61424b0000c6d64a541b2c9bd42c
Reorganize project feature config options

This commit reorganizes the config options for each project into
separate groups. This makes it easier to identify where to set
which features are enabled.

Partially Implements: blueprint config-cleanup

Change-Id: Idf8c65ef9bbc11cadea236f0b1a491a0f82bb84b
Stop auto-detecting glance API versions

This commit switches the image api tests from auto detecting which
api versions are available to having them explicitly set in the config
file. This is to make it explicit which tests are expected to be run
instead of assuming that everything is expected to work.

Partially Implements: blueprint config-cleanup

Change-Id: Ie958a7fb03ff502c5ea1783eaae9debb442c34ea
Add config feature verification script

This commit adds a new tool to tempest that will verify that API
queryable config options are set correctly. Right now the list of
options that are verified is very short. Later on additional checks
will be added to verify other services features when the tempest
clients for the other services get functions to query enabled
extensions.

Partially Implements: blueprint config-verification

Change-Id: Ie3b5fadd74460fb7199bff7046ec0efe37268b94
Add api version detection to verify_tempest_config

This commit adds glance api version discovery to
verify_tempest_config.py. It will query the glance API to see which
API versions are available and then compare that to what is in the
config, pointing out any differences

Partially Implements: blueprint config-verification

Change-Id: Ie75f7f526d78b85a53ea4b0484e670d373d622ec
Fix incorrect config option types

This commit just fixes a few option types to that were incorrectly set.

Partially Implements: blueprint config-cleanup

Change-Id: I12c743f85b35ea1d1f8df92c988c141c78c2730d
Fix default values so they work in a devstack run

This commit fixes errors with the default values used in config.py
Previously, an incorrect default could potentially be masked in a
gate run by putting the correct value in the sample config. However,
by moving to an auto-generated sample config file the defaults set
in config.py will be used, exposing these mismatches.

Partially Implements: blueprint config-cleanup

Change-Id: I55caeed2589d45337337b291d7131afdadf28bb8
Sync config file generator from oslo

This commit syncs in the sample config generator from Oslo-incubator.
This will enable the sample file to be auto generated instead of
managing it by hand which is prone to errors.

Partially Implements: blueprint config-cleanup

Change-Id: Ic2553da72de5978b5d721d2ddb4c68ec1bf5005d