Use OS::Nova::Server for NeutronResourcesTestJSON

This is part of an ongoing effort to ensure there are no references to AWS::
resources in tempest.api or tempest.scenario

Partial-Bug: #1187942

Change-Id: I11ce6b164b6fb5507ee95a6b416dbe5d3352c77e
unskip test_list_servers_filtered_by_ip

Bug #1170718 is fixed, so we can unskip the test_list_servers_filtered_by_ip.
Also making the test compatible with tenant+network isolation settings.

Change-Id: I31ec6baac41a084b2106bef2fb686030ba599c7f
Add V2 Nova API os-agents tests

This patch adds V2 Nova API - os-agents tests.

Change-Id: I18f1a95ac5e22a646da9aeb52f096f7caa82e8c8
Add unit tests for all generators

generate_json.py does not exist any longer. Using the checks there
and move them into test_negative_generators.py. From now on the checks
are usable for all generators (also valid_generator) using a base class.

In order to check for unknown types it was mandatory to change an
existing exception to a more detailed exception (TypeError).

Partially implements bp unit-tests

Change-Id: I6b5b66f8ae113c1aca471d8338334cd47ff45723
Inspect listed ports for created port with binding

Inspecting the binding attributes of unbound ports will cause a KeyError.
When tenant isolation is disabled, the subnet may contain unbound ports.
This updates the test to create a port that is bound to the host, and
asserts that the port exists in the listing and the listed port contains
the correct host_id in its binding attributes.  It no longer expects
the port_filter detail, which will be deprecated in Neutron eventually.

Change-Id: I43704407ca879ffd816644b65a03c615f978d432
Closes-bug: #1301782
Implementing XML client for VPNaaS

VPNaaS API test for xml request body is missing.
This blueproint implements xml client for VPNaaS testcases.

Change-Id: I236a889350e9b7d865e874b73f825b3a34809a3f
Implements: blueprint vpnaas-api-tests-xml
Swift formpost cleanup

Formpost test failed sometimes with an Unauthorized error.
A possible reason for this is the eventual consistency, because
the required account metadata might not be ready when the test
is executed.

Metadata availability is now checked in setUp(). This check is
already used in tempest.api.object_storage.test_tempurl.

Tests now also use the built in client. An additional negative test
has been added to ensure that formpost middleware is actually used
and not bypassed due to an already authenticated request.

Change-Id: I9fd2f3eeae4648015976d3c5944655b211ccbaa1
Closes-Bug: 1304341
Remove the unused _get_unused_flavor_id()

This patch removes the unused _get_unused_flavor_id() for the
maintainability.

Change-Id: I868c51c68d4ef1c73ea47f89e885d12602527e25
Move exceptions back into one place

This commit removes the exceptions directory and reverts to the
previous organizational behavior of having a single exception file.
The directory was created with the intent of allowing additional
exceptions to be added as separate files. However this is just
distributing exceptions into separate files which would mean separate
imports whenever they were used. So new extensions were only being
added to the __init__ file to avoid the additional import, which is
essentially the previous behavior. So instead of adding the additional
directory it's easier just to leave everything in one file.

This is effectively a revert of 82411edb9c1089cac53572e7720559b927b59fbd

Change-Id: If15bd171b4708def30a650d514063e9795836746
Validate list_instance_usage_audit_log Nova V2 API

This patch adds the JSON schema for list_instance_usage_audit_log Nova
V2 APIs and validate the response of the API with added JSON schema
to block the backward incompatibility change in the future.

Response body of V2 List instance_usage_audit_log is below-

{
    "instance_usage_audit_logs": {
        "hosts_not_run": [
            "%(hostid)s"
        ],
        "log": {},
        "num_hosts": 1,
        "num_hosts_done": 0,
        "num_hosts_not_run": 1,
        "num_hosts_running": 0,
        "overall_status": "0 of 1 hosts done. 0 errors.",
        "period_beginning": "%(timestamp)s",
        "period_ending": "%(timestamp)s",
        "total_errors": 0,
        "total_instances": 0
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I9ecc3afa71b10cfbd3824bb86d02b3232c9a2594
move out ironic exception from common import

It will raise import error if ironic service is disabled
when run scenario test. This patch move ironic exception
module imporing into the function which uses it.

Relate change: I1260cceb2821400eb42959cb701e40ae449dd452

Change-Id: Ic41b9bd87af15ef6a9bded56ed1066c428847309
Avoid passing empty string as AZ name

When creating/updating an aggregate without AZ, current XML client
passes empty string as AZ name. This behavior is different from the
JSON client and it blocks API validation improvement of Nova.
(id: I2c778f2237ba5bd2aa8335a0eae80f3aad3e9157)

This patch fixes the problem.

Change-Id: I0cc4e4132ff8262c4d5a71dc5ebac3678de305d6
Related-Bug: #1219693
Merge "Implementing XML client for VPNaaS"
Merge "Add V2 Nova API os-agents tests"
orchestration convert API test Timeouts to respect build_timeout

Some tests have a hard-coded WaitCondition timeout, which would be better
controlled from the global timeout set in tempest.conf

We should ensure future tests follow this convention where Timeout values
are specified in the template.

Change-Id: Ie4a9048771e3a106e1d9c6b69f244461f6d5fd8d
Partial-Bug: #1297560
Merge "Move exceptions back into one place"
skip test_stack_update_add_remove because of race

test_stack_update_add_remove races about 25% of the time in the
gate because the update is eventually consistent, and doesn't
happen before the list returns. It's unclear if this is
expected or unexpected behavior for heat, but 25% failure rate
is far too high.

Change-Id: I0cfd9c10c1fd5b674c1a2211f98a6aba042227da
Related-Bug: #1308682
Verify delete agent response of V2/V3 APIs

This patch adds the JSON schema for response status of Nova agent delete APIs
to block the backward incompatibility change in the future.

delete agent does not return the response body.
Response status of above APIs is below:
V2 : 200
V3 : 204

Partially implements blueprint nova-api-attribute-test

Change-Id: I1040b61b081d783a7c206189e11d16f9f9e77f91
Merge "Validate list_instance_usage_audit_log Nova V2 API"
Merge "skip test_stack_update_add_remove because of race"