Unit Tests for glance_http

This patch tests most of what is currently in use by Tempest of
glance_http.
There is a comment regarding this matter, but reafirming there is no
class testing against glance_http's https backend since it also ends up
using httplib.

Partially implements bp unit-tests
Change-Id: Iaa2477da4b559e4383fd8904ae4185edcb0dea36
Verify tenant usages API response attributes

Now most attributes of Nova 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 tenant usages API responses.
The response body of this API is the following:

{
    'tenant_usages': [{
        'server_usages': [{
            'ended_at': '2014-03-23T23:09:03.000000',
            'flavor': 'm1.nano',
            'hours': 0.0033333333333333335,
            'instance_id': '64093cb4-9185-4b13-b375-53124bd70728',
            'local_gb': 0,
            'memory_mb': 64,
            'name': 'server-412020127'
            'started_at': '2014-03-23T23:08:51.000000',
            'state': 'terminated',
            'tenant_id': '9461ce3ff1a94bdfa5a3ffdecfd5fa3a',
            'uptime': 12,
            'vcpus': 1,
        }]
        'start': '2014-03-22T23:09:40.241602',
        'stop': '2014-03-23T23:09:40.652279',
        'tenant_id': '9461ce3ff1a94bdfa5a3ffdecfd5fa3a',
        'total_hours': 0.0033333333333333335,
        'total_local_gb_usage': 0.0,
        'total_memory_mb_usage': 0.21333333333333335,
        'total_vcpus_usage': 0.0033333333333333335,
    }]
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Ia4be5e5c0175d9ba524a4e97129b6cd0f8125ad2
Define V3 Credentials

Extend the Credentials class hierarchy to include keystone v3
Credentials. Extend unit tests accordingly.
Extend credentials configurations parameters to include domain.

Partially implements: bp multi-keystone-api-version-tests

Change-Id: I4c7f21f769a20ab45c0f9672ebaa738b146cf6a0
Use auth data to fill credentials

Provide the ability to automatically fill in credentials
details e.g. IDs if names where provided.
Verified via unit test.

Partially implements: bp multi-keystone-api-version-tests

Change-Id: I505e5024754fe1b912104ce4d5d3206f4cedd6d8
Enforces the use of Credentials (part1)

Multiversion auth part5

Refactor tenant isolation to use Credentials instead of username,
password and tenant_name, but keeps the same interface for now,
so test don't have to be changed.

Tenant isolation is  still using v2 identity clients to generate
credentials, even when auth_version is set to v3.
This changes prepares the migration to v3.

Partially implements: bp multi-keystone-api-version-tests

Change-Id: If2da9d869af417b6cd8f6a4c48d710e817c76402
Merge "Unit Tests for glance_http"
Skip creation of network resources for disabled IPv6 tests

In some cases SetUpClass is called prior to determining that
the test case needs to be skipped, and that is okay. However,
for the IPv6 test cases, this may lead to errors as the very
creation of v6 network resources may not be supported by the
underlying CI infrastructure; therefore, for these cases let's
skip the test as the first step, if required.

Related-bug: #1282387

Change-Id: I84ae3f6d389c42393691718776bf1be18772aca6
Merge "Define V3 Credentials"
Merge "Use auth data to fill credentials"
Merge "Enforces the use of Credentials (part1)"
Verify "update 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 "update a server" API responses.

The response body of v2 API is the following:
  {
    "server": {
      "id": "d099f759-021f-41ad-8ad3-7d9ddecaf07a",
      "name": "vm01-v2",
      "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:37:40Z",
      "updated": "2014-03-13T01:29:46Z",
      "progress": 0,
      "metadata": {},
      "links": [
        {"href": "http://[..]", "rel": "self"},
        {"href": "http://[..]", "rel": "bookmark"}
      ],
      "addresses": {"private": [
        {"version": 4, "addr": "10.0.0.4"}
      ]},
      "hostId": "6efdef81d6341b7fac789263e366cdf3ed5136f5894db8a2b79d1bc7",
      "OS-DCF:diskConfig": "MANUAL",
      "accessIPv4": "",
      "accessIPv6": ""
    }
  }

The one of v3 API is the following:
  {
    "server": {
      "id": "d099f759-021f-41ad-8ad3-7d9ddecaf07a",
      "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:37:40Z",
      "updated": "2014-03-13T01:35:50Z",
      "progress": 0,
      "metadata": {},
      "links": [
        {"href": "http://[..]", "rel": "self"},
        {"href": "http://[..]", "rel": "bookmark"}
      ],
      "addresses": {"private": [
        {"version": 4, "type": "fixed", "addr": "10.0.0.4",
         "mac_addr": "fa:16:3e:a7:05:40"}
      ]},
      "host_id": "6efdef81d6341b7fac789263e366cdf3ed5136f5894db8a2b79d1bc7",
      "os-access-ips:access_ip_v4": "",
      "os-access-ips:access_ip_v6": ""
    }
  }

Partially implements blueprint nova-api-attribute-test

Change-Id: Ied43fb29639eaa045d68147dd668133bd419a57c
Merge "Skip creation of network resources for disabled IPv6 tests"
Merge "Verify tenant usages API response attributes"
Merge "Verify "update a server" API response attributes"
Merge branch 'master' of https://github.com/openstack/tempest