summaryrefslogtreecommitdiffstats
path: root/apex/deployment/tripleo.py
diff options
context:
space:
mode:
Diffstat (limited to 'apex/deployment/tripleo.py')
-rw-r--r--apex/deployment/tripleo.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/apex/deployment/tripleo.py b/apex/deployment/tripleo.py
index 0f85bbae..c131e161 100644
--- a/apex/deployment/tripleo.py
+++ b/apex/deployment/tripleo.py
@@ -46,12 +46,13 @@ class ApexDeployment:
common_patches = utils.parse_yaml(self.p_file)
logging.debug('Content from common patch file is: {}'.format(
pprint.pformat(common_patches)))
- if 'patches' not in common_patches.keys():
- logging.error('Error parsing common patches file, wrong format. '
- 'Missing "patches" dictionary')
+ os_version = self.ds['deploy_options']['os_version']
+ try:
+ common_patches = common_patches['patches'][os_version]
+ except KeyError:
+ logging.error('Error parsing common patches file, wrong format.')
raise ApexDeployException('Invalid format of common patch file')
- else:
- common_patches = common_patches['patches']
+
for ptype in ('undercloud', 'overcloud'):
if ptype in common_patches:
patches[ptype] = utils.unique(patches[ptype] +