# start
params_vnf = []
plan_dict = json.JSONDecoder().decode(dst_plan)
- for vnf in ignore_case_get(plan_dict, "vnfs"):
+ for vnf in ignore_case_get(plan_dict, "ns_vnfs"):
vnfd_id = vnf['properties']['id']
vnfm_type = vnf['properties'].get("nf_type", "undefined")
vimid = self.get_vnf_vim_id(vim_id, location_constraints, vnfd_id)
@staticmethod
def set_vl_vim_id(vim_id, location_constraints, plan_dict):
- if "vls" not in plan_dict:
+ if "ns_vls" not in plan_dict:
logger.debug("No vl is found in nsd.")
return
vl_vnf = {}
- for vnf in ignore_case_get(plan_dict, "vnfs"):
+ for vnf in ignore_case_get(plan_dict, "ns_vnfs"):
if "dependencies" in vnf:
for depend in vnf["dependencies"]:
vl_vnf[depend["vl_id"]] = vnf['properties']['id']
if "vnfProfileId" in location:
vnfd_id = location["vnfProfileId"]
vnf_vim[vnfd_id] = location["locationConstraints"]["vimId"]
- for vl in plan_dict["vls"]:
+ for vl in plan_dict["ns_vls"]:
vnfdid = ignore_case_get(vl_vnf, vl["vl_id"])
vimid = ignore_case_get(vnf_vim, vnfdid)
if not vimid:
@staticmethod
def get_model_count(context):
data = json.JSONDecoder().decode(context)
- vls = len(data.get('vls', []))
+ vls = len(data.get('ns_vls', []))
sfcs = len(data.get('fps', []))
- vnfs = len(data.get('vnfs', []))
+ vnfs = len(data.get('ns_vnfs', []))
return {'vlCount': str(vls), 'sfcCount': str(sfcs), 'vnfCount': str(vnfs)}