Refactor create_ and update_ methods for floating ips

create_floating_ip and update_floating_ip was updated to use
_create and _update from network_client_base.

Change-Id: I26ff2463a0c8cdbe58fde0cc0df89671a5281de0
Introduce load_tests mechanism for negative tests

The test loader will run the function given in the local variable
"load_test" (see http://docs.python.org/2/library/unittest.html#load-tests-protocol).
This is done after the import level and only if a valid test runner is
in place. Therefore it will solve the issue with pep8 job since
flake8 won't interpret the load_tests variable.

Change-Id: Idc160b9c83e9bd93bc4c92b7a86e36c0fc5b8a2e
Implements: bug 1291826
Verify attributes through Nova list flavor-access API

This patch adds the JSON schema for Nova V2/V3 list flavor-access APIs
includes the attributes to block the backward incompatibility change
in the future.

The response body of v2 and v3 API is the below:
{
    "flavor_access": [
        {
            "flavor_id": "10"
            "tenant_id": "231a1e7fd1b344f9874d0334d98b459c"
        }
    ]
}

In addition, this patch doesn't change V3 test because it is skipped
owing to the bug.

Partially implements blueprint nova-api-attribute-test

Change-Id: I027dc96e5702cd03a7b85ba41c4c30215e321f30
Remove usage of internal library function in basic generator

Internal function shouldn't be used from the outside. Adds unit tests
to verify that the change has no other side effects.

Change-Id: I72d34c253816cfc4c05008f504c9abe6d2182efd
Closes-Bug: bug 1293543
don't log cli output on success

we only should log cli output on failure, not success. So just
leave it to the exception to log it. This helps reduce the needless
spam inside the tempest log.

Change-Id: I1623694d7321e679e8438eba3e6b1ad58fc6e855
Remove resize-revert workaround for bug 924371

Change I12364e7c enables the resize tests again and bug 924371 has been
fixed for a long time, so remove the workaround in the
test_resize_server_revert test case.

Related-Bug: #924371

Change-Id: Ic143f8fa87b8ef4c3a23324bb148171a3f22c073
Validate get keypair attributes of Nova V2/V3 API

This patch adds the JSON Schema for response of Nova V2 & V3 GET
keypair API and validate the response with added JSON Schema to
block the backward incompatibility change in the future.

The response body of V2 GET keypair API is below:

{
    "keypair": {
        "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnPe3MJhE
                      wcQNGZpYRaGYTwY9D9L3pr1c+eqJIP99mtrUuqTEp3/YPiAz
                      L0Dem/32WWPOV4DEc27NBMxrpOi9JJBssDq+6UdK5hMIwrZ/
                      6dZt+CPz+76LwxnR1vilVFocis+OC9ddntazV1wrAWGyYL9a
                      83vwcuTV01FJzSNlYV4hni2vxcgQPkbgt+ldYoTmBS9X3W5Qy
                      NrzuG53zHjkYjmz3tjiadZwgffDvjT3SBYWU3kBGy6gxIs5f/
                      wIvZUSUXGorOJNUw6FubMj4sLfE4cbHS6W72xs6bmEhqxyjSL
                      QK5fuHE1MgCCDPTd0vqXdbLnCZr6+l0HLI8lpDhd
                      Generated by Nova\n",
        "name": "test_key",
        "fingerprint": "52:53:dd:89:6a:73:c6:18:87:4b:1e:c1:4c:b8:
                       c3:c9",
        "user_id": "93d29478a2454f418e0b835b8439aa90",
        "deleted": false,
        "created_at": "2014-03-17T06:49:35.000000",
        "updated_at": null,
        "deleted_at": null,
        "id": 1
    }
}

The response body of V3 GET keypair API is below:

{
    "keypair": {
        "public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDnPe3MJhE
                      wcQNGZpYRaGYTwY9D9L3pr1c+eqJIP99mtrUuqTEp3/YPiAz
                      pL0Dem/32WWPOV4DEc27NBMxrpOi9JJBssDq+6UdK5hMIwrZ/
                      6dZt+CPz+76LwxnR1vilVFocis+OC9ddntazV1wrAWGyYL9a
                      83vwcuTV01FJzSNlYV4hni2vxcgQPkbgt+ldYoTmBS9X3W5Qy
                      /NrzuG53zHjkYjmz3tjiadZwgffDvjT3SBYWU3kBGy6gxIs5f
                      /wIvZUSUXGorOJNUw6FubMj4sLfE4cbHS6W72xs6bmEhqxyjS
                      LQK5fuHE1MgCCDPTd0vqXdbLnCZr6+l0HLI8lpDhd
                      Generated by Nova\n",
        "name": "test_key",
        "fingerprint": "52:53:dd:89:6a:73:c6:18:87:4b:1e:c1:4c:b8:
                       c3:c9"
    }
}

Partially implements blueprint nova-api-attribute-test

Change-Id: Ie65776ec5f6a42df89c27d868b43c4ce105dd09b
Renew token before expiry time

Modify is_expired so that token is renewed before it
actually expires. The threshold is set to 60s, which is plenty
of time for any API call to complete.
Use utcnow() instead of utc(). Includes unit tests for is_expired.

Closes bug 1292145

Change-Id: Ic062b4352612c936d1f83fcb7cb09154eb628d9e
Verify the response attributes of 'list_aggregates'

This patch verifies the response attributes of list_aggregates.
The response body of v2 and v3 API has the same format:

"aggregates": [
    {
        "availability_zone": "nova",
        "created_at": "2012-11-16T06:22:23.361359",
        "deleted": false,
        "deleted_at": null,
        "hosts": [],
        "id": 1,
        "metadata": {
            "availability_zone": "nova"
        },
        "name": "name",
        "updated_at": null
    }
]

Partially implements blueprint nova-api-attribute-test

Change-Id: If4c09929f3e9d3fd743aad2b727a74834fdbf8fd
Merge "don't log cli output on success"
Fail a test if stack delete failed

Whenever a deleting stack goes to DELETE_FAILED this is an error which should fail
the test. Currently delete failures are ignored. As a side-effect of this, delete-failed
stacks are leaked even though tests pass.

The test may have done is own assertions on stack deletes, so a NotFound
exception is still passed.

Change-Id: I5f9e5901bcbd50bd8bd38c62175755ba59c6b837
Closes-Bug: #1295415
Merge "Verify attributes through Nova list flavor-access API"
Adds more verification in list alarms

This submission is to add more verification logic in
test_list_alarms test method of "test_telemetry_alarming_api.py"
test script.

Change-Id: I70a8e40bfc8930c607254bf1da43ba38dc646a74
Implements: bp add-basic-ceilometer-tests
Merge "Remove resize-revert workaround for bug 924371"
Merge "Renew token before expiry time"
Merge "Adds more verification in list alarms"
Merge "Remove usage of internal library function in basic generator"
Merge "Verify the response attributes of 'list_aggregates'"
Merge "Validate get keypair attributes of Nova V2/V3 API"
Merge "Introduce load_tests mechanism for negative tests"