aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-03-17 11:42:22 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-03-17 11:42:22 +0800
commitf1ef7f43d12751b10314a7e07c3e3ae815057a39 (patch)
treef3ba1b2e01cdbef5588ef73d6b27230c79fc2eaf
parent8a07bcd6b75f62c7c79504f8a3c020a2d635156e (diff)
fix csar bug
csar vars not generate when vnf_type is None. modify process_conf to fix this bug Change-Id: I9967acc9d7c1cea9012f8feb5b8f0141f1c6d3b8 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rw-r--r--process_conf.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/process_conf.py b/process_conf.py
index 976cf19..582163e 100644
--- a/process_conf.py
+++ b/process_conf.py
@@ -31,12 +31,11 @@ def generate_app_conf(openo_config, vnf_config, scripts_dir):
"""generate opera/work/scripts_dir/vnf.conf"""
with open(scripts_dir + "/vnf.conf", "w") as fd:
for i in vnf_config["vIMS"]:
+ fd.write('{0}={1}\n'.format('NS_PKG', i["ns_pkg"]))
+ fd.write('{0}={1}\n'.format('VNF_PKG', i["vnf_pkg"]))
if i["type"] == openo_config["vnf_type"]:
fd.write('{0}={1}\n'.format('VNF_TYPE', i["type"]))
- fd.write('{0}={1}\n'.format('NS_PKG', i["ns_pkg"]))
- fd.write('{0}={1}\n'.format('VNF_PKG', i["vnf_pkg"]))
fd.write('{0}={1}'.format('NSDID', i["nsdId"]))
- break
if __name__ == "__main__":