summaryrefslogtreecommitdiffstats
path: root/config/utils
diff options
context:
space:
mode:
authorJack Morgan <jack.morgan@intel.com>2017-10-01 14:50:00 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-10-01 14:50:00 +0000
commit2c4fac2e41aaca9dd679b200ffc968eeb448b395 (patch)
tree26a00ec2e5f9448f169ea655a546ddb0959c7b1f /config/utils
parent908dab58edbbe8f22db14a9261693a54e9b2d8fd (diff)
parente5c76e735a99395ab075f95c0f4105f8727a834e (diff)
Merge "PDF: generate_config: Add IDF parsing support"
Diffstat (limited to 'config/utils')
-rwxr-xr-xconfig/utils/generate_config.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/config/utils/generate_config.py b/config/utils/generate_config.py
index a32367af..18af98db 100755
--- a/config/utils/generate_config.py
+++ b/config/utils/generate_config.py
@@ -2,6 +2,7 @@
"""This module does blah blah."""
import argparse
import ipaddress
+import os
import yaml
from jinja2 import Environment, FileSystemLoader
@@ -44,6 +45,13 @@ ENV.filters['dpkg_arch'] = dpkg_arch
with open(ARGS.yaml) as _:
DICT = yaml.safe_load(_)
+# If an installer descriptor file (IDF) exists, include it (temporary)
+IDF_PATH = '/idf-'.join(os.path.split(ARGS.yaml))
+if os.path.exists(IDF_PATH):
+ with open(IDF_PATH) as _:
+ IDF = yaml.safe_load(_)
+ DICT['idf'] = IDF['idf']
+
# Print dictionary generated from yaml (uncomment for debug)
# print(DICT)