blob: 1d2822db9e6e14f7c2f80584997f933800c67af0 [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
Matthew Treinish550f2ab2014-03-17 18:07:23 +000019from tempest import test
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020020
vponomaryovaa86a802014-01-06 09:29:58 +020021CONF = config.CONF
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020022
23LOG = logging.getLogger(__name__)
24
25
vponomaryovaa86a802014-01-06 09:29:58 +020026class SimpleReadOnlyCeilometerClientTest(cli.ClientTestBase):
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020027 """Basic, read-only tests for Ceilometer CLI client.
28
29 Checks return values and output of read-only commands.
30 These tests do not presume any content, nor do they create
31 their own. They only verify the structure of output if present.
32 """
33
34 @classmethod
35 def setUpClass(cls):
36 if (not CONF.service_available.ceilometer):
Steven Hardy028d2e52014-01-06 10:03:11 +000037 msg = ("Skipping all Ceilometer cli tests because it is "
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020038 "not available")
39 raise cls.skipException(msg)
40 super(SimpleReadOnlyCeilometerClientTest, cls).setUpClass()
41
42 def test_ceilometer_meter_list(self):
43 self.ceilometer('meter-list')
44
Matthew Treinish550f2ab2014-03-17 18:07:23 +000045 @test.attr(type='slow')
Mehdi Abaakouk8581c0b2013-10-04 10:45:42 +020046 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')