Files
python-tripleoclient/tripleoclient/tests/config/test_config_standalone.py
Harald Jensås 51ad17ba18 Add support for networks data in Standalone
Standalone does not use any of the composable networks by
default. Deploy Standaloen using /dev/null as network data
so that these resources are not included when creating the
plan.

Undercloud uses only the External network for the external
VIP. Deploy the undercloud using the Undercloud specific
network_data_undercloud.yaml, ensures external_from_pool.yaml
is in the plan.

Related-Bug: #1809313
Depends-On: Ib11a134df93e59947168b40bc71fb1da9172d4ac
Change-Id: I102912851a3b9952daaf7c4d5a34a919f527f805
2019-01-11 02:27:03 +00:00

114 lines
4.5 KiB
Python

# Copyright 2018 Red Hat, Inc.
#
# 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.
#
from tripleoclient.config.standalone import StandaloneConfig
from tripleoclient.tests import base
class TestStandaloneConfig(base.TestCase):
def setUp(self):
super(TestStandaloneConfig, self).setUp()
# Get the class object to test
self.config = StandaloneConfig()
def test_get_base_opts(self):
ret = self.config.get_base_opts()
expected = ['cleanup',
'container_cli',
'container_images_file',
'custom_env_files',
'deployment_user',
'docker_insecure_registries',
'docker_registry_mirror',
'heat_container_image',
'heat_native',
'hieradata_override',
'net_config_override',
'networks_file',
'output_dir',
'roles_file',
'templates']
self.assertEqual(expected, [x.name for x in ret])
def test_get_service_opts(self):
ret = self.config.get_enable_service_opts()
expected = ['enable_cinder',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_novajoin',
'enable_telemetry',
'enable_tempest',
'enable_ui',
'enable_validations',
'enable_zaqar']
self.assertEqual(expected, [x.name for x in ret])
for x in ret:
self.assertEqual(x.default, False, "%s config not False" % x.name)
def test_get_service_opts_enabled(self):
ret = self.config.get_enable_service_opts(cinder=True,
ironic=True,
ironic_inspector=True,
mistral=True,
novajoin=True,
telemetry=True,
tempest=True,
tripleo_ui=True,
validations=True,
zaqar=True)
expected = ['enable_cinder',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_novajoin',
'enable_telemetry',
'enable_tempest',
'enable_ui',
'enable_validations',
'enable_zaqar']
self.assertEqual(expected, [x.name for x in ret])
for x in ret:
self.assertEqual(x.default, True, "%s config not True" % x.name)
def test_get_opts(self):
ret = self.config.get_opts()
expected = ['cleanup',
'container_cli',
'container_images_file',
'custom_env_files',
'deployment_user',
'docker_insecure_registries',
'docker_registry_mirror',
'enable_cinder',
'enable_ironic',
'enable_ironic_inspector',
'enable_mistral',
'enable_novajoin',
'enable_telemetry',
'enable_tempest',
'enable_ui',
'enable_validations',
'enable_zaqar',
'heat_container_image',
'heat_native',
'hieradata_override',
'net_config_override',
'networks_file',
'output_dir',
'roles_file',
'templates']
self.assertEqual(expected, [x.name for x in ret])