Files
deb-tempest/tempest/api/compute/v3/test_version.py
Ken'ichi Ohmichi 3d6b6fa513 Add a version API test for Nova v3 API
The version API of Nova returns the API version information with the
following body:
  {"version":
    {"id": "v3.0",
     "status": "EXPERIMENTAL",
     "updated": "2013-07-23T11:33:21Z",
     ..
    }
  }

This patch adds the API test.

Partially implements blueprint nova-v3-api-tests

Change-Id: Ibd6c3b4f3228340b265cbc9a0e7fe2dbc93c691c
2014-01-08 21:27:59 +09:00

35 lines
1.1 KiB
Python

# Copyright 2014 NEC Corporation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from tempest.api.compute import base
from tempest import test
class VersionV3TestJSON(base.BaseV3ComputeTest):
_interface = 'json'
@test.attr(type='gate')
def test_version(self):
# Get version information
resp, version = self.version_client.get_version()
self.assertEqual(200, resp.status)
self.assertIn("id", version)
self.assertEqual("v3.0", version["id"])
class VersionV3TestXML(VersionV3TestJSON):
_interface = 'xml'