diff --git a/tripleoclient/constants.py b/tripleoclient/constants.py index 9e27a93d4..7d7cf643d 100644 --- a/tripleoclient/constants.py +++ b/tripleoclient/constants.py @@ -40,7 +40,7 @@ EPHEMERAL_HEAT_POD_NAME = "ephemeral-heat" ANSIBLE_CWL = "tripleo_dense,tripleo_profile_tasks,tripleo_states" CONTAINER_IMAGE_PREPARE_LOG_FILE = "container_image_prepare.log" DEFAULT_CONTAINER_REGISTRY = "quay.io" -DEFAULT_CONTAINER_NAMESPACE = "tripleomaster" +DEFAULT_CONTAINER_NAMESPACE = "tripleomastercentos9" DEFAULT_CONTAINER_TAG = "current-tripleo" DEFAULT_RESOURCE_REGISTRY = 'overcloud-resource-registry-puppet.yaml' @@ -49,7 +49,10 @@ if os.path.isfile(kolla_builder.DEFAULT_PREPARE_FILE): DEFAULT_CONTAINER_IMAGE_PARAMS = kolla_builder.CONTAINER_IMAGES_DEFAULTS else: DEFAULT_CONTAINER_IMAGE_PARAMS = { - 'namespace': 'quay.io/tripleomaster', + 'namespace': '{}/{}'.format( + DEFAULT_CONTAINER_REGISTRY, + DEFAULT_CONTAINER_NAMESPACE + ), 'name_prefix': 'openstack-', 'tag': 'current-tripleo' } diff --git a/tripleoclient/tests/test_heat_launcher.py b/tripleoclient/tests/test_heat_launcher.py index 4ca2cf5f3..d5f9d93b5 100644 --- a/tripleoclient/tests/test_heat_launcher.py +++ b/tripleoclient/tests/test_heat_launcher.py @@ -134,9 +134,7 @@ class TestHeatPodLauncher(base.TestCase): mock.ANY]), mock.call(['sudo', 'podman', 'run', '--rm', '--user', 'heat', '--volume', mock.ANY, '--volume', mock.ANY, - 'quay.io/tripleomaster/openstack-heat-api:current-' - 'tripleo', - 'heat-manage', 'db_sync']) + mock.ANY, 'heat-manage', 'db_sync']) ] self.assertEqual(self.check_call.mock_calls, calls) self.assertFalse(mock_do_restore_db.called) @@ -147,9 +145,8 @@ class TestHeatPodLauncher(base.TestCase): launcher.heat_db_sync(restore_db=True) self.check_call.assert_called_once_with([ 'sudo', 'podman', 'run', '--rm', '--user', 'heat', '--volume', - mock.ANY, '--volume', mock.ANY, - 'quay.io/tripleomaster/openstack-heat-api:current-tripleo', - 'heat-manage', 'db_sync']) + mock.ANY, '--volume', mock.ANY, mock.ANY, 'heat-manage', 'db_sync' + ]) self.assertTrue(mock_do_restore_db.called) self.check_call.reset_mock() @@ -168,8 +165,7 @@ class TestHeatPodLauncher(base.TestCase): 'mysql', '-e', 'flush privileges;']), mock.call(['sudo', 'podman', 'run', '--rm', '--user', 'heat', '--volume', mock.ANY, '--volume', mock.ANY, - 'quay.io/tripleomaster/openstack-heat-api:current-' - 'tripleo', 'heat-manage', 'db_sync']) + mock.ANY, 'heat-manage', 'db_sync']) ] self.assertEqual(self.check_call.mock_calls, calls) self.assertTrue(mock_do_restore_db.called) @@ -191,8 +187,7 @@ class TestHeatPodLauncher(base.TestCase): 'mysql', '-e', 'flush privileges;']), mock.call(['sudo', 'podman', 'run', '--rm', '--user', 'heat', '--volume', mock.ANY, '--volume', mock.ANY, - 'quay.io/tripleomaster/openstack-heat-api:current-' - 'tripleo', 'heat-manage', 'db_sync']) + mock.ANY, 'heat-manage', 'db_sync']) ] self.assertEqual(self.check_call.mock_calls, calls) self.assertFalse(mock_do_restore_db.called) diff --git a/tripleoclient/v2/tripleo_container_image.py b/tripleoclient/v2/tripleo_container_image.py index acc8a7210..4069ca2a0 100644 --- a/tripleoclient/v2/tripleo_container_image.py +++ b/tripleoclient/v2/tripleo_container_image.py @@ -148,7 +148,7 @@ class Build(command.Command): "--namespace", dest="namespace", metavar="", - default="tripleomaster", + default=constants.DEFAULT_CONTAINER_NAMESPACE, help=_("Container registry namespace (default: %(default)s)"), ) parser.add_argument(