Files
zaza-openstack-tests/zaza/charm_tests/keystone/__init__.py
T
David Ames a65638664d Check for the VIP in the identity catalog entry
Add an early test to check that the catalog entry for the identity
service uses the VIP.
2018-11-13 14:37:49 -08:00

48 lines
1.7 KiB
Python

# Copyright 2018 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Collection of code for setting up and testing keystone."""
import zaza
import zaza.charm_tests.test_utils as test_utils
import zaza.utilities.openstack as openstack_utils
DEMO_TENANT = 'demoTenant'
DEMO_DOMAIN = 'demoDomain'
DEMO_PROJECT = 'demoProject'
DEMO_ADMIN_USER = 'demo_admin'
DEMO_ADMIN_USER_PASSWORD = 'password'
DEMO_USER = 'demo'
DEMO_PASSWORD = 'password'
class BaseKeystoneTest(test_utils.OpenStackBaseTest):
"""Base for Keystone charm tests."""
@classmethod
def setUpClass(cls):
"""Run class setup for running Keystone charm operation tests."""
super(BaseKeystoneTest, cls).setUpClass()
cls.keystone_ips = zaza.model.get_app_ips('keystone')
if (openstack_utils.get_os_release() <
openstack_utils.get_os_release('xenial_queens')):
cls.default_api_version = '2'
else:
cls.default_api_version = '3'
cls.admin_keystone_session = (
openstack_utils.get_overcloud_keystone_session())
cls.admin_keystone_client = (
openstack_utils.get_keystone_session_client(
cls.admin_keystone_session,
client_api_version=cls.default_api_version))