Improve ServerCfnInitTestJSON asserts and debugging

This change asserts that every heat resource goes into the
CREATE_COMPLETE state, and if the WaitCondition times
out then the server console log is logged.

To make the template more readable and maintainable, usages of
Fn::Join have been replaced with Fn::Replace.

Change-Id: I59fb54a292e77c7acf3c3ba2e1b02bdf06e998de
Stop volume leaking test_server_rescue_negative

test_server_rescue_negative created a volume, but did not deleted it.

Change-Id: Id54e34eb79547bb8197d61f91c210eba57563a03
Blueprint: stop-leaking
Fix test by waiting to lbaas entity delete

This fix prevents a scenario where an
lbaas entity is trying to be deleted while it still in use,
because an associate entity still didn't finished it's deletion.
Handling the DB before completing the back-end operations
can cause problems.
So waiting for back-end system response is crucial for
keeping the DB model consistent.

A new network timeout and time interval options were
added in configuration file. These were added to give control over
network resources wait periods without effecting other projects.

Added wait_for_resource_deletion and is_resource_deleted functions,
similar to the common rest_client functions but with resource type
as a parameter since network service has no rest_client for each resource.
calling the new function when deleting vips and pools.

Bug #1288326 was opened to address the fact that network rest client does
not fit common REST client framework approach where each resource
has its own implementation of the client.

This change is a replacement for the change below.
https://review.openstack.org/#/c/68190/3
Was replaced due to a development workstation crash.

Change-Id: Ie6468f0488ea2515ed8ccbe1a8c9c55b9ab4a3de
Closes-Bug: #1271214
Fix RemoteClient usage in scenario tests

Some scenario tests use the following patter to work with RemoteClient:

   client = self.get_remote_client(ip,
                                   private_key=keypair.private_key)
   return client.ssh_client

ssh_client is directly accessed because exec_command method
is not directly available in RemoteClient

In order to preserve encapsulation, RemoteClient should be improved to
expose that method.

Change-Id: I054762d769d002b5fb45c871d85a8ca8ff294695
Closes-Bug: #1285539
Fix problem of deleting dhcp port

when network is deleted, the dhcp port in that network will be deleted
automaticly, so '_cleanup_ports' should not clean dhcp port. I already
have a patch to fix the problem of deleting dhcp port.

Change-Id: I92f90a3dad6d76954d466e4b30ab7c46434ba7df
Closes-bug: #1279683
add token get tests

Change test method "test_create_delete_token" to
"test_create_get_delete_token" and add a check
for token get api

Change-Id: Ib3a7c66c0dc1d41025769ee971132979329ccb72
Improve readability of test_networks

* Use list comprehension where it makes sense.

* Remove redundant assertions. That is, assertions in some tests that
  are really the responsibility of another test. For example, checking
  if a given network id is present in a list was being checked in both
  test_list_networks and test_list_networks_fields.

* Create assertEmpty and assertNotEmpty methods to help further clarify
  the intent of certain assertions.

Change-Id: Id91b2d2b6699eaf4acc332b3e76f9cb46c09d7c7
Skip Nova API attribute tests if an XML response

XML client of Tempest is broken and cannot get some keys from Nova API
response body. The best way is to fix it, but now XML format of Nova
API has been marked as "deprecated" and XML client will be removed
from Tempest.

In this situation, this patch makes the Nova attribute tests disable
if an XML response.

Partially implements blueprint nova-api-attribute-test

Change-Id: I1a482df79959786dd1ed7662b305acf0a8062747
Add agents tests for Nova v3 API

This patch adds tests for agents API.

Partially implements blueprint nova-v3-api-tests

Change-Id: I7d46dd5bb8cef32a9fae58e17ffc7feb99036815
Merge "Improve readability of test_networks"
Merge "add token get tests"
Merge "Fix problem of deleting dhcp port"
Merge "Fix RemoteClient usage in scenario tests"
Merge "Skip Nova API attribute tests if an XML response"
Merge "Improve ServerCfnInitTestJSON asserts and debugging"
Merge "Fix test by waiting to lbaas entity delete"
Merge "Stop volume leaking test_server_rescue_negative"
Merge "Add agents tests for Nova v3 API"
Merge branch 'master' of https://github.com/openstack/tempest