From e46cd7d0f3bacc9d2878e0319bf746d3bf182034 Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Wed, 7 Dec 2016 16:51:39 -0500 Subject: [PATCH] Remove RHEL registration envrionment file from list The RHEL registration environment file doesn't actually get written to, so we were passing an environment file with empty values that would override any values passed on the command line. This removes that file from the returned list of templates, allowing the passed-in values to take over. Change-Id: I0c14e279842d6e9c8ed540cb7605965b39a49eca Closes-Bug: #1648238 --- .../tests/v1/overcloud_deploy/test_overcloud_deploy.py | 4 +--- tripleoclient/v1/overcloud_deploy.py | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py b/tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py index c1fbffbd2..f1633d715 100644 --- a/tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py +++ b/tripleoclient/tests/v1/overcloud_deploy/test_overcloud_deploy.py @@ -844,9 +844,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud): 'pre_deploy/rhel-registration/') calls = [ mock.call(env_path=tht_prefix + - 'rhel-registration-resource-registry.yaml'), - mock.call(env_path=tht_prefix + - 'environment-rhel-registration.yaml')] + 'rhel-registration-resource-registry.yaml'), ] mock_process_env.assert_has_calls(calls) @mock.patch('tripleoclient.tests.v1.overcloud_deploy.fakes.' diff --git a/tripleoclient/v1/overcloud_deploy.py b/tripleoclient/v1/overcloud_deploy.py index 0f341b7c4..632771fee 100644 --- a/tripleoclient/v1/overcloud_deploy.py +++ b/tripleoclient/v1/overcloud_deploy.py @@ -115,10 +115,6 @@ class DeployOvercloud(command.Command): def _create_registration_env(self, args): tht_root = args.templates - env_file = os.path.join( - tht_root, - constants.RHEL_REGISTRATION_EXTRACONFIG_NAME, - 'environment-rhel-registration.yaml') registry = os.path.join( tht_root, constants.RHEL_REGISTRATION_EXTRACONFIG_NAME, @@ -128,7 +124,7 @@ class DeployOvercloud(command.Command): 'rhel_reg_force': args.reg_force, 'rhel_reg_sat_url': args.reg_sat_url, 'rhel_reg_activation_key': args.reg_activation_key} - return [registry, env_file], {"parameter_defaults": user_env} + return [registry], {"parameter_defaults": user_env} def _create_parameters_env(self, parameters): parameter_defaults = {"parameter_defaults": parameters}