Don't run lbaas scenario test as smoke test

Load Balancer as a service  is not part of neutron's primary
functionality, it is one of the advanced services that is not fully
baked yet. As part of the effort to only test advanced services against
neutron and not against all projects, drop this test from smoke.

Related patch: Ib315d30ff3c4463203f7ebe00e159a9680cf1616

Change-Id: I43239e9dc3e99e382ea12fb94f940f9029f4e488
javelin: implement resource destruction

Checking and creating already exist.
This patch aims to bring resources destruction support.

Change-Id: I9d11db79e10f53a52692ef286323bdb652c42bff
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
Use safe_setup instead try block in setUpClass

To avoid resource leakage in case of exception in setUpClass,
some tests have try catch block in setUpClass and call tearDownClass
explicitly.
safe_setup decorator is for same purpose which should be
used instead.

Change-Id: I59372ec96dcec0058d30e503b22540ce09c43d43
Fix response body format of orchestration_client to dict

'create_stack' function in orchestration_client return raw json strings.
However, in most of cases, raw json strings are not expected because it's
too hard to use. So we should do 'json.loads(body)' for the response body.
And the other apis such as {update,delete,suspend,resume} do not return a
response body in the API spec docs[1]. So we do not need to add
'json.load(body)' to the functions for now.

[1] http://developer.openstack.org/api-ref-orchestration-v1.html

Change-Id: Ic7d37d70aa0373d9bbf3ad302d1a521f5adaafe9
Fix load balancer scenario if no tenant network

The load balancer scenario is currently dependent on isolated
tenant networking.  This updates it to allow it to pass in environments
where tenant networking is not present (ie, a shared cross-tenant network).
If a network cannot be resolved by tenant, it will be resolved by the
configured private network name as a fallback and its associated subnet
will be used.

Change-Id: Idbac7c10669a0e2db518223cdd762313aa752876
(cherry picked from commit 3e9e99fb7d7c43b5a6340919f4f1f611f387cbbb)
Make unit tests not depend on random hash seed

This commit fixes the places in the tempest unit tests which were
dependent on the python hashseed being 0. They were mostly issues of
expectations, either explicit or inadvertently implicit, on dict or
list ordering.

Change-Id: Iab72ed4d52765de744804e6202ee4bf0664988c5
Some scenario tests do not delete network resources

The ScenarioTest class does not destroy isolated creds upon tearDown.
As several scenarios create network resources through the class
tempest.common.IsolatedCreds, a missing cleanup results in network
resources not being removed.

Change-Id: Id0a0c196b5780888cf71e1f0cfae0931f854ef43
Fix TypeError in TestVolumeBootPattern

Commit eef192fc3c98a663f99f2fd944611bce0adffc0c changed
self._log_console_output() to self._log_console_output(self)
when dumping an instance's console output when ssh fails.

self in this case is the test class which is not an instance
(or list for that matter) so it blows up when we hit this
patch and masks the root failure.

Change-Id: Ieb68503a43269997a36c0a8b7f19f78ace97f251
Closes-Bug: #1363552
Fix use of nonexistent class variable in accounts

This commit fixes cases in tempest.common.accounts cases where some
methods were attempting to use non-existent class level variables.
It also improves the get_hash methods and calls to remove_hash.

Co-Authored-By: Andrea Frittoli <andrea.frittoli@hp.com>
Change-Id: I30cf59b981e0db3a3e50357a8db489519767c0ca
Avoid to iterate over empty list in DictMismatch

It is a little optimization of describe function. If there wasn't found any
differences, there is loop iterating over empty list. It isn't necessary,
because condition a few lines above do the same.

Change-Id: I65067801281c8703f7fa4d1430dcc578d28c3542
Only log console log if nova supports consoles

If a scenario test fails during ssh the standard procedure is to log
the console for the server. However, this can only be done if nova
supports consoles. This commit adds a check to see if nova supports
getting the console for a server before it attempts to do it.
Otherwise if nova doesn't support getting the console and an ssh
connection fails the test will fail on getting a console and not the
ssh connection. It looks like this check wasn't added during the
scenario test port to the tempest clients.

Change-Id: I681b3065d86cd31837a9ef5d91d25847fa47a8f4
Verify network connectivity before state check

This commit adds an initial ssh connection after bringing a server up
in setUp. This should ensure that the image has a chance to initialize
prior to messing with it's state. The test's here are to verify that
after performing a nova operation on a running instance network
connectivity is retained. However, it's is never checked that we can
connect to the server in the first place. A probable cause for the
constant ssh failures in these tests is that the server hasn't had a
finish it's cloud-init (or cirros-init) stage when we're stopping it,
this should also fix those issues.

Change-Id: I126fd4943582c4b759b3cc5a67babaa8d062fb4d
Partial-Bug: #1349617
Remove force_tenant_isolation=True from test that doesn't need it

Remove extraneous force_tenant_isolation=True tag in trove base

Change-Id: I9e76681172bf55e081870cae8a4d806e8c876de4
Check port's status also in show port tests

Check for port's status in test_show_port by comparing complete dict

Change-Id: I95ff3a6d51c539c59bcb9cb02e16d6da7fbadadd
Merge "Fix TypeError in TestVolumeBootPattern"
Move cli tests into service subdirectories

This commit takes the cli tests and moves them into service specific directories. This is 
done in lieu of using a service decorator to properly tag the test as using a particular
service. This should be less error prone then adding a decorator to each test case. It also
is useful for projects that have more than one cli interface being tested by making the grouping by service more explicit.

Partially implements bp add-service-tags

Change-Id: I54e01ba29fc03beea83f2377f6b6b98f23361f5f
Merge "Use safe_setup instead try block in setUpClass"
Merge "Verify network connectivity before state check"
Merge "Check port's status also in show port tests"
Merge "Only log console log if nova supports consoles"