From c6a90c786f8b12058dccf951bb5d21d974778f1d Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Wed, 25 Nov 2020 16:48:09 -0500 Subject: [PATCH] Handle "name" in openstack.name I thought this was 'cattle' everywhere. Issue-Id: RELENG-2951 Signed-off-by: Aric Gardner Change-Id: I859aa4a53b73486f9c03869f05e3f45d7f951ec3 --- jenkins-admin/create_jenkins_clouds_openstack_yaml.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py index ae51bd8e..ea92aa7c 100755 --- a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py +++ b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py @@ -58,7 +58,7 @@ jenkins: credentialsId: {{ cloud_credential_id }} endPointUrl: {{ cloud_url }} ignoreSsl: {{ cloud_ignore_ssl }} - name: "cattle" + name: {{ cloud_name }} slaveOptions: availabilityZone: {{ availability_zone }} bootSource: @@ -117,6 +117,8 @@ def parse_arguments(): parser.add_argument('--path', type=dir_path, help="Path to jenkins-admin directory") + parser.add_argument('--name', type=str, + help="cloud name IE: cattle") parser.add_argument( "-s", "--sandbox", @@ -178,7 +180,9 @@ for filename in glob.iglob(path, recursive=True): # Global cloud config section for section in config_parser_merged.sections(): if section == "cloud": - final = (config.items(section)) + afinal = (config.items(section)) + name = parsed_args.name + final = (*afinal, ("cloud_name", name)) for index, _ in enumerate(final): -- 2.16.6