summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2018-10-30 16:32:36 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2018-10-30 16:32:36 +0800
commit57a85ed3aff05f7b8d40b5c6956f57292f6e1054 (patch)
tree41cc0c70c3bb7028df44dca3e73c5fe2b04b9925
parent8d23526dc5b1705f1fff2f4749f861882e15c0ec (diff)
Add default value of nf inst
Change-Id: Icfb47b2b9c35a2d170c26cc60a3d3f95ac45f4dd Issue-ID: VFC-1163 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r--lcm/lcm/nf/biz/create_vnf.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lcm/lcm/nf/biz/create_vnf.py b/lcm/lcm/nf/biz/create_vnf.py
index c86ec14c..09f5e76a 100644
--- a/lcm/lcm/nf/biz/create_vnf.py
+++ b/lcm/lcm/nf/biz/create_vnf.py
@@ -47,10 +47,10 @@ class CreateVnf:
def save_db(self):
metadata = ignore_case_get(self.vnfd_info, "metadata")
- version = ignore_case_get(metadata, "csarVersion")
- provider = ignore_case_get(metadata, "csarProvider")
- netype = ignore_case_get(metadata, "type")
- vnfsoftwareversion = ignore_case_get(metadata, "version")
+ version = ignore_case_get(metadata, "csarVersion", "undefined")
+ provider = ignore_case_get(metadata, "csarProvider", "undefined")
+ netype = ignore_case_get(metadata, "type", "undefined")
+ vnfsoftwareversion = ignore_case_get(metadata, "version", "undefined")
NfInstModel.objects.create(nfinstid=self.nf_inst_id,
nf_name=self.vnf_instance_mame,
package_id=self.csar_id,