lbaas basic - open firewall for http on vip port

This is necessary for test_load_balancer_basic to work
when the linuxbridge agent is used.

Change-Id: I620882c31461d438add0f011cb916e28e2f266a3
Closes-Bug: 1313117
Add test for compute API os-quota-class-sets

This tests showing and updating the 'default' quota class, which is
really all this API is used for. It was removed in Icehouse in part to
not knowing it was used even though python-novaclient and Horizon were
using it. The removal was reverted and this change is to enforce what
the API is used for.

The extension only lives in the Nova v2 API, it was removed in the v3
API in Icehouse.

This change adds new quota client and test classes for the new API.

An external lock fixture is used in all compute API quota tests to
avoid introducing race bugs with the existing tenant-specific
os-quota-sets tests.

Closes-Bug: #1325727

Change-Id: Ib0cde08dfaa0f6a5e180d247864fb59d76eca903
Verify V2 list server_group API attributes

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

The response body of List server_group V2 API is given below:

{
    "server_groups": [
        {
            "id": "616fb98f-46ca-475e-917e-2563e5a8cd19",
            "name": "test",
            "policies": ["anti-affinity"],
            "members": [],
            "metadata": {}
        }
    ]
}

Partially implements blueprint nova-api-attribute-test

Change-Id: I554237d9b66b42ea75ef3b47c8a9038c80b3cfb5
Allowed Address Pair API Tests Enhancements

Add test to update 'allowed-address-pair' attribute of port

-Create a port without allowed-address-pair
-Set allowed-address-pair attribute of port using port_update
-Validate that allowed-address-pair attribute of port is updated successfully

Change-Id: I0556617f837f62e3ccc06f50c049af0b227357b0
Verify "get a server" API response attributes

Now most attributes of Nova v2/v3 APIs are not checked in Tempest,
and this patch adds some tests which check these attributes to block
the backward incompatibility change in the future.

This patch adds the checks of "get a server" API responses.

The response body of v2 API is the following:
  {
    "server": {
      "id": "c2f2ebe8-5a25-442b-83d2-9f0926a7a88a",
      "name": "vm01-v3",
      "status": "ACTIVE",
      "image": {
        "id": "b62655db-2ff7-4d7f-8821-d0a468a25bec",
        "links": [{"href": "http://[..]", "rel": "bookmark"}]
      },
      "flavor": {
        "id": "42",
        "links": [{"href": "http://[..]", "rel": "bookmark"}]
      },
      "user_id": "832ebd066fb0427ea77c4aab6bab5ec1",
      "tenant_id": "b8d8f3df596b482e93c4225b1d72d2c2",
      "created": "2014-03-13T00:40:21Z",
      "updated": "2014-03-13T00:40:31Z",
      "metadata": {},
      "links": [
        {"href": "http://[..]", "rel": "self"},
        {"href": "http://[..]", "rel": "bookmark"}
      ],
      "addresses": {
        "private": [{
          "OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:5f:c3:0f",
          "version": 4, "addr": "10.0.0.5", "OS-EXT-IPS:type": "fixed"
        }]
      },
      "key_name": null,
      "hostId": "6efdef81d6341b7fac789263e366cdf3ed5136f5894db8a2b79d1bc7",
      "progress": 0,
      "OS-SRV-USG:launched_at": "2014-03-13T00:40:31.000000",
      "OS-SRV-USG:terminated_at": null,
      "OS-EXT-AZ:availability_zone": "nova",

      "OS-EXT-STS:task_state": null,
      "OS-EXT-STS:vm_state": "active",
      "OS-EXT-STS:power_state": 1,

      "OS-EXT-SRV-ATTR:host": "localhost-dev",
      "OS-EXT-SRV-ATTR:instance_name": "instance-0000004a",
      "OS-EXT-SRV-ATTR:hypervisor_hostname": "localhost-dev",

      "os-extended-volumes:volumes_attached": [],
      "accessIPv4": "",
      "accessIPv6": "",
      "config_drive": "",
      "OS-DCF:diskConfig": "MANUAL"
    }
  }

The one of v3 API is the following:
  {
    "server": {
      "id": "c2f2ebe8-5a25-442b-83d2-9f0926a7a88a",
      "name": "vm01-v3",
      "status": "ACTIVE",
      "image": {
        "id": "b62655db-2ff7-4d7f-8821-d0a468a25bec",
        "links": [{"href": "http://[..]", "rel": "bookmark"}]
      },
      "flavor": {
        "id": "42", "links": [{"href": "http://192.168.11.100:8774/flavors/42", "rel": "bookmark"}]
      },
      "user_id": "832ebd066fb0427ea77c4aab6bab5ec1",
      "tenant_id": "b8d8f3df596b482e93c4225b1d72d2c2",
      "created": "2014-03-13T00:40:21Z",
      "updated": "2014-03-13T00:40:31Z",
      "metadata": {},
      "links": [
        {"href": "http://[..]", "rel": "self"},
        {"href": "http://[..]", "rel": "bookmark"}
      ],
      "addresses": {
        "private": [{
          "version": 4, "type": "fixed",
          "addr": "10.0.0.5", "mac_addr": "fa:16:3e:5f:c3:0f"
        }]
      },
      "key_name": null,
      "host_id": "6efdef81d6341b7fac789263e366cdf3ed5136f5894db8a2b79d1bc7",
      "progress": 0,
      "os-server-usage:launched_at": "2014-03-13T00:40:31.000000",
      "os-server-usage:terminated_at": null,
      "os-extended-availability-zone:availability_zone": "nova",

      "os-extended-status:task_state": null,
      "os-extended-status:vm_state": "active",
      "os-extended-status:power_state": 1,
      "os-extended-status:locked_by": null,

      "os-extended-server-attributes:host": "localhost-dev",
      "os-extended-server-attributes:instance_name": "instance-0000004a",
      "os-extended-server-attributes:hypervisor_hostname": "localhost-dev",

      "os-extended-volumes:volumes_attached": [],
      "os-pci:pci_devices": [],
      "os-access-ips:access_ip_v4": "",
      "os-access-ips:access_ip_v6": "",
      "os-config-drive:config_drive": ""
    }
  }

Partially implements blueprint nova-api-attribute-test

Change-Id: I951eae22d694349ae734e1ea16f24f500af6a894
VPNaaS API Tests Enhancements

Added the following tests:
 - test_admin_create_vpn_service_for_tenant:
   Admin user creates VPN Service for tenant.

 - test_admin_create_ike_policy_for_tenant:
   Admin user creates IKE Policy for tenant.

 - test_admin_create_ipsec_policy_for_tenant:
   Admin user created Ipsec Policy for tenant.

Extended the following tests:
 - test_show_vpn_service:
   Now tests to check whether the returned status has a
   valid value.

 - test_create_update_delete_ike_policy:
   Now also updates encryption_algorithm, ike_version,
   and lifetime in update tests. Verifies whether test was
   successful by comparing with vpn_service object returned by
   show API call.
   Also now checks whether delete was succesful by asserting
   that is the ikepolicy is no longer returned by list_ikepolicies.

Minor edits to network_client_base.py to support ipsecpolicy resources.

Change-Id: I0e4e56c4fdcb591c456b4c32c6b6dd208f0c4045
unskip list server actions tests

Bug #1206032 is fixed, so we can unskip the
test_list_server_actions.

These tests are needed for response validation testing.

Closes-Bug: #1206032

Change-Id: I1891d1f4435c3b884b099497352084ba8271a859
Improve cinder CLI existing tests

Objective of this patch to parse the output of read only cinder CLI's,
to validate the output and improve more output verification.
It is improving the code of all below read only cinder CLI's subcommands:
1. backup-list
2. extra-specs-list
3. list
4. rate-limits
5. snapshot-list
6. type-list
7. credentials
8. availability-zone-list
9. endpoints
10. service-list
11. transfer-list
12. qos-list
13. encryption-type-list

Partially implements: blueprint cli-tests-coverage

Change-Id: I3fbbc44194898b9a699a9807a7a800e9a9cb925d
Convert scenario test tearDown to addCleanup

This commit removes the resource management code used in the scenario
tests and replaces it with addCleanup. The tearDownClass code created
a LIFO queue for deleting resources created during tests which is
exactly what addCleanup is used for. Additionally, the previous
tearDownClass code only worked for objects created, and couldn't
undo actions such as volume attach which changed the resource state.
addCleanup doesn't have that limitation.

To handle async delete actions a list of waits is added which will be iterated
 over as the last step of clearing the addCleanup queue. That way all the
delete calls are made up front and the tests won't succeed unless the deletes
are eventually successful. This is the same basic approach used in the api
tests to limit cleanup execution time except here it is multi-resource, because
of the nature of the scenario tests.

Change-Id: I315c9c67a70ab6a209d4996e2926a8a2d06c9bc1
Merge "Allowed Address Pair API Tests Enhancements"
Merge "VPNaaS API Tests Enhancements"
Make test_drivers.py use driver name from conf

test_list_drivers and test_show_driver in test_drivers.py use hard_coded
driver name.
This patch make these tests use driver name which is written in config file.

Closes-Bug: #1317717

Change-Id: Idad4c496a42c9253548fdf9020ffb8013fef951f
Merge "Convert scenario test tearDown to addCleanup"
Merge "Make test_drivers.py use driver name from conf"
Merge "Verify "get a server" API response attributes"
Merge "Verify V2 list server_group API attributes"
Merge "Improve cinder CLI existing tests"
Merge "unskip list server actions tests"
Merge "lbaas basic - open firewall for http on vip port"
Merge "Add test for compute API os-quota-class-sets"