blob: 7f2864f976edee26ffac49199e9bc504d8fb0509 [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
18from oslo.config import cfg
19
20import tempest.cli
21from tempest.openstack.common import log as logging
22
23CONF = cfg.CONF
24
25LOG = logging.getLogger(__name__)
26
27
28class SimpleReadOnlyCeilometerClientTest(tempest.cli.ClientTestBase):
29 """Basic, read-only tests for Ceilometer CLI client.
30
31 Checks return values and output of read-only commands.
32 These tests do not presume any content, nor do they create
33 their own. They only verify the structure of output if present.
34 """
35
36 @classmethod
37 def setUpClass(cls):
38 if (not CONF.service_available.ceilometer):
39 msg = ("Skiping all Ceilometer cli tests because it is"
40 "not available")
41 raise cls.skipException(msg)
42 super(SimpleReadOnlyCeilometerClientTest, cls).setUpClass()
43
44 def test_ceilometer_meter_list(self):
45 self.ceilometer('meter-list')
46
47 def test_ceilometer_resource_list(self):
48 self.ceilometer('resource-list')
49
50 def test_ceilometermeter_alarm_list(self):
51 self.ceilometer('alarm-list')