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