blob: b58c5255a312f9a66f260b108cea2f483a1ecfc2 [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
Masayuki Igawa1edf94f2014-03-04 18:34:16 +090017from tempest import test
Nayna Patel4a5024c2013-11-18 07:08:23 +000018
19
Chandan Kumar65eb8592014-11-12 18:32:32 +053020class VolumeHostsAdminV2TestsJSON(base.BaseVolumeAdminTest):
Nayna Patel4a5024c2013-11-18 07:08:23 +000021
Chris Hoge7579c1a2015-02-26 14:12:15 -080022 @test.idempotent_id('d5f3efa2-6684-4190-9ced-1c2f526352ad')
Nayna Patel4a5024c2013-11-18 07:08:23 +000023 def test_list_hosts(self):
bkopilov62d21752016-06-08 10:16:11 +030024 hosts = self.admin_hosts_client.list_hosts()['hosts']
Nayna Patel4a5024c2013-11-18 07:08:23 +000025 self.assertTrue(len(hosts) >= 2, "No. of hosts are < 2,"
26 "response of list hosts is: % s" % hosts)
27
28
Chandan Kumar65eb8592014-11-12 18:32:32 +053029class VolumeHostsAdminV1TestsJSON(VolumeHostsAdminV2TestsJSON):
30 _api_version = 1