- if vca_deployment['member-vnf-index'] == vnf_member_index and vca_deployment['vdu_name'] == vdur_name:
- return vca_deployment
- raise VcaDeploymentInfoNotFound("VCA deployment info for nsr_id {}, index {} and vdur_name {} not found."
- .format(nsr_id, vnf_member_index, vdur_name))
+ if vdu_id is None:
+ if vca_deployment['member-vnf-index'] == vnf_member_index and vca_deployment['vdu_id'] is None:
+ return vca_deployment
+ else:
+ if vca_deployment['member-vnf-index'] == vnf_member_index and \
+ vca_deployment['vdu_id'] == vdu_id and vca_deployment['vdu_count_index'] == vdu_count:
+ return vca_deployment
+ raise VcaDeploymentInfoNotFound(
+ "VCA deployment info for nsr_id {}, index {}, vdu_id {} and vdu_count_index {} not found.".format(
+ nsr_id,
+ vnf_member_index,
+ vdu_id,
+ vdu_count))