blob: 5c311e1c28be04d0cc8d3bbfba9b04f20c1e5c77 [file] [log] [blame]
Nayna Patel4a5024c2013-11-18 07:08:23 +00001# Copyright 2013 OpenStack Foundation
2# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
16from tempest.api.volume import base
17from tempest.test import attr
18
19
Zhi Kun Liubb363a22013-11-28 18:47:39 +080020class VolumeHostsAdminTestsJSON(base.BaseVolumeV1AdminTest):
Nayna Patel4a5024c2013-11-18 07:08:23 +000021 _interface = "json"
22
23 @attr(type='gate')
24 def test_list_hosts(self):
25 resp, hosts = self.hosts_client.list_hosts()
26 self.assertEqual(200, resp.status)
27 self.assertTrue(len(hosts) >= 2, "No. of hosts are < 2,"
28 "response of list hosts is: % s" % hosts)
29
30
31class VolumeHostsAdminTestsXML(VolumeHostsAdminTestsJSON):
32 _interface = 'xml'