Nayna Patel | 4a5024c | 2013-11-18 07:08:23 +0000 | [diff] [blame] | 1 | # 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 | |
| 18 | from tempest.api.volume import base |
| 19 | from tempest.test import attr |
| 20 | |
| 21 | |
Zhi Kun Liu | bb363a2 | 2013-11-28 18:47:39 +0800 | [diff] [blame] | 22 | class VolumeHostsAdminTestsJSON(base.BaseVolumeV1AdminTest): |
Nayna Patel | 4a5024c | 2013-11-18 07:08:23 +0000 | [diff] [blame] | 23 | _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 | |
| 33 | class VolumeHostsAdminTestsXML(VolumeHostsAdminTestsJSON): |
| 34 | _interface = 'xml' |