diff --git a/releasenotes/notes/container-images-file-required-ff11154429796729.yaml b/releasenotes/notes/container-images-file-required-ff11154429796729.yaml new file mode 100644 index 000000000..95e70f8df --- /dev/null +++ b/releasenotes/notes/container-images-file-required-ff11154429796729.yaml @@ -0,0 +1,6 @@ +--- +other: + - | + When using containerized undercloud installation with `openstack undercloud + install --use-heat`, the container_images_file is a required configuration + parmeter. diff --git a/tripleoclient/tests/v1/undercloud/test_undercloud.py b/tripleoclient/tests/v1/undercloud/test_undercloud.py index 6debbd0d2..1a9115f9d 100644 --- a/tripleoclient/tests/v1/undercloud/test_undercloud.py +++ b/tripleoclient/tests/v1/undercloud/test_undercloud.py @@ -15,6 +15,9 @@ import mock +from oslo_config import cfg +from oslo_config import fixture as oslo_fixture + from tripleoclient.tests.v1.test_plugin import TestPluginV1 # Load the plugin init module for the plugin list and show commands @@ -32,6 +35,8 @@ class TestUndercloudInstall(TestPluginV1): def setUp(self): super(TestUndercloudInstall, self).setUp() + conf = self.useFixture(oslo_fixture.Config(cfg.CONF)) + conf.config(container_images_file='/home/stack/foo.yaml') # Get the command object to test self.cmd = undercloud.InstallUndercloud(self.app, None) @@ -59,7 +64,7 @@ class TestUndercloudInstall(TestPluginV1): ['sudo', 'openstack', 'undercloud', 'deploy', '--local-ip=192.168.24.1', '--templates=/usr/share/openstack-tripleo-heat-templates/', - '--heat-native', '-e', + '--heat-native', '-e', '/home/stack/foo.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services-docker/ironic.yaml', '-e', @@ -82,6 +87,8 @@ class TestUndercloudUpgrade(TestPluginV1): def setUp(self): super(TestUndercloudUpgrade, self).setUp() + conf = self.useFixture(oslo_fixture.Config(cfg.CONF)) + conf.config(container_images_file='/home/stack/foo.yaml') # Get the command object to test self.cmd = undercloud.UpgradeUndercloud(self.app, None) @@ -121,7 +128,7 @@ class TestUndercloudUpgrade(TestPluginV1): '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'major-upgrade-composable-steps-docker.yaml', - '--heat-native', '-e', + '--heat-native', '-e', '/home/stack/foo.yaml', '-e', '/usr/share/openstack-tripleo-heat-templates/environments/' 'services-docker/ironic.yaml', '-e', diff --git a/tripleoclient/v1/undercloud_config.py b/tripleoclient/v1/undercloud_config.py index aa4a77af7..3c08d34d4 100644 --- a/tripleoclient/v1/undercloud_config.py +++ b/tripleoclient/v1/undercloud_config.py @@ -344,8 +344,9 @@ _opts = [ default='', help=('URL for the heat container image to use.') ), + # NOTE(aschultz): LP#1754067 - required until we can do this automatically cfg.StrOpt('container_images_file', - default='', + required=True, help=('Container yaml file with all available images in the' 'registry') ),