From f1ef7f43d12751b10314a7e07c3e3ae815057a39 Mon Sep 17 00:00:00 2001 From: Harry Huang Date: Fri, 17 Mar 2017 11:42:22 +0800 Subject: 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 --- process_conf.py | 5 ++--- 1 file 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__": -- cgit 1.2.3-korg