diff options
-rw-r--r-- | lcm/ns_vnfs/biz/create_vnfs.py | 7 | ||||
-rw-r--r-- | lcm/ns_vnfs/biz/grant_vnf.py | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/lcm/ns_vnfs/biz/create_vnfs.py b/lcm/ns_vnfs/biz/create_vnfs.py index 5dcdb7b3..5b7cfde9 100644 --- a/lcm/ns_vnfs/biz/create_vnfs.py +++ b/lcm/ns_vnfs/biz/create_vnfs.py @@ -167,7 +167,11 @@ class CreateVnfs(Thread): "cpdId": self.get_cpd_id_of_vl(network_info['key_name']), "vim": { "vimid": vl_instance.vimid - } + }, + # SOL 003 align + "id": vl_instance_id, + "vimConnectionId": vl_instance.vimid, + "extCps": [{"cpdId": self.get_cpd_id_of_vl(network_info['key_name']), "cpConfig":[]}] }) return virtual_link_list, ext_virtual_link @@ -189,6 +193,7 @@ class CreateVnfs(Thread): 'vnfInstanceName': self.vnf_inst_name, 'vnfPackageId': ignore_case_get(self.nf_package_info, "vnfPackageId"), 'vnfDescriptorId': self.vnfd_id, + 'flavourId': "default", 'extVirtualLink': ext_virtual_link, 'additionalParam': { "properties": self.properties, diff --git a/lcm/ns_vnfs/biz/grant_vnf.py b/lcm/ns_vnfs/biz/grant_vnf.py index 6987fc07..0923eb15 100644 --- a/lcm/ns_vnfs/biz/grant_vnf.py +++ b/lcm/ns_vnfs/biz/grant_vnf.py @@ -52,9 +52,12 @@ class GrantVnf(object): additional_param = ignore_case_get(self.data, "additionalparams") vnfm_inst_id = ignore_case_get(additional_param, "vnfmid") vim_id = ignore_case_get(additional_param, "vimid") - - vnfinsts = NfInstModel.objects.filter( - nfinstid=m_vnf_inst_id, vnfm_inst_id=vnfm_inst_id) + if vnfm_inst_id and vnfm_inst_id != "": + vnfinsts = NfInstModel.objects.filter( + mnfinstid=m_vnf_inst_id, vnfm_inst_id=vnfm_inst_id) + else: + vnfinsts = NfInstModel.objects.filter( + mnfinstid=m_vnf_inst_id) if not vnfinsts: raise NSLCMException("Vnfinst(%s) is not found in vnfm(%s)" % ( m_vnf_inst_id, vnfm_inst_id)) |