From: Aric Gardner Date: Wed, 25 Nov 2020 21:48:09 +0000 (-0500) Subject: Handle "name" in openstack.name X-Git-Tag: v0.59.0~2 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=c6a90c786f8b12058dccf951bb5d21d974778f1d;p=releng%2Fglobal-jjb.git Handle "name" in openstack.name I thought this was 'cattle' everywhere. Issue-Id: RELENG-2951 Signed-off-by: Aric Gardner Change-Id: I859aa4a53b73486f9c03869f05e3f45d7f951ec3 --- 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):