Debian Codegraph @

heatclient/tests/functional/base.py

raw symbols SCIP
1 # Licensed under the Apache License, Version 2.0 (the "License"); you may
2 # not use this file except in compliance with the License. You may obtain
3 # a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 # License for the specific language governing permissions and limitations
11 # under the License.
12
13 import os
14
15 from tempest.lib.cli import base
16
17
18 class ClientTestBase(base.ClientTestBase):
19 """This is a first pass at a simple read only python-heatclient test.
20
21 This only exercises client commands that are read only.
22 This should test commands:
23 * as a regular user
24 * as a admin user
25 * with and without optional parameters
26 * initially just check return codes, and later test command outputs
27 """
28
29 def _get_clients(self):
30 cli_dir = os.environ.get(
31 'OS_HEATCLIENT_EXEC_DIR',
32 os.path.join(os.path.abspath('.'), '.tox/functional/bin'))
33
34 return base.CLIClient(
35 username=os.environ.get('OS_USERNAME'),
36 password=os.environ.get('OS_PASSWORD'),
37 tenant_name=os.environ.get('OS_PROJECT_NAME',
38 os.environ.get('OS_TENANT_NAME')),
39 uri=os.environ.get('OS_AUTH_URL'),
40 cli_dir=cli_dir)
41
42 def heat(self, *args, **kwargs):
43 return self.clients.heat(*args, **kwargs)