blob: b762b47ec736c0d4acef26a1ba26ccc531357eb7 [file] [log] [blame]
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +02001# 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
vponomaryovaa86a802014-01-06 09:29:58 +020018from tempest import cli
19from tempest import config
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020020from tempest.openstack.common import log as logging
21
vponomaryovaa86a802014-01-06 09:29:58 +020022CONF = config.CONF
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020023
24LOG = logging.getLogger(__name__)
25
26
vponomaryovaa86a802014-01-06 09:29:58 +020027class SimpleReadOnlyCeilometerClientTest(cli.ClientTestBase):
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020028 """Basic, read-only tests for Ceilometer CLI client.
29
30 Checks return values and output of read-only commands.
31 These tests do not presume any content, nor do they create
32 their own. They only verify the structure of output if present.
33 """
34
35 @classmethod
36 def setUpClass(cls):
37 if (not CONF.service_available.ceilometer):
38 msg = ("Skiping all Ceilometer cli tests because it is"
39 "not available")
40 raise cls.skipException(msg)
41 super(SimpleReadOnlyCeilometerClientTest, cls).setUpClass()
42
43 def test_ceilometer_meter_list(self):
44 self.ceilometer('meter-list')
45
46 def test_ceilometer_resource_list(self):
47 self.ceilometer('resource-list')
48
49 def test_ceilometermeter_alarm_list(self):
50 self.ceilometer('alarm-list')
Masayuki Igawab7df1792013-12-22 18:07:16 +090051
52 def test_ceilometer_version(self):
53 self.ceilometer('', flags='--version')