Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Chore: Comment recent tox.ini changes
[releng/global-jjb.git]
/
jenkins-admin
/
create_jenkins_clouds_openstack_yaml.py
diff --git
a/jenkins-admin/create_jenkins_clouds_openstack_yaml.py
b/jenkins-admin/create_jenkins_clouds_openstack_yaml.py
index
a1464a5
..
d342469
100755
(executable)
--- a/
jenkins-admin/create_jenkins_clouds_openstack_yaml.py
+++ b/
jenkins-admin/create_jenkins_clouds_openstack_yaml.py
@@
-93,9
+93,10
@@
jenkins:
slaveOptions:
availabilityZone: {{ availability_zone }}
bootSource:
slaveOptions:
availabilityZone: {{ availability_zone }}
bootSource:
-
volumeFromImage
:
+
{{ image_type }}
:
name: {{ image_name }}
name: {{ image_name }}
- volumeSize: {{ volume_size }}
+{%- if image_type == "volumeFromImage" %}
+ volumeSize: {{ volume_size }}{% endif %}
fsRoot: {{ fs_root }}
hardwareId: {{ hardware_id }}
{%- if is_sandbox is defined %}
fsRoot: {{ fs_root }}
hardwareId: {{ hardware_id }}
{%- if is_sandbox is defined %}
@@
-201,6
+202,11
@@
for index, _ in enumerate(cloud_config_final):
value = lookuptable[value]
section_cloud[key] = value
value = lookuptable[value]
section_cloud[key] = value
+ if "volume_size" not in section_cloud:
+ section_cloud.update(image_type="image")
+ else:
+ section_cloud.update(image_type="volumeFromImage")
+
j2_template = Template(maintemplate)
print(j2_template.render(section_cloud))
j2_template = Template(maintemplate)
print(j2_template.render(section_cloud))