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