Change-Id: Iad5de449b0dcb036749c7d1536a84aec203ec396
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
else:
table = PrettyTable(["nfpkg name", "id", "desc type"])
for vnfd in resp:
- name = vnfd.get("id", vnfd.get("name", "-"))
+ name = vnfd.get("id", vnfd.get("product-name", "-"))
descriptor_type = "sol006" if "product-name" in vnfd else "rel8"
if long:
onb_state = vnfd["_admin"].get("onboardingState", "-")
return vnfd
else:
for vnfd in self.list():
- if "product-name" in vnfd and name == vnfd["product-name"]:
+ if "id" in vnfd and name == vnfd["id"]:
return vnfd
- elif "name" in vnfd and name == vnfd["name"]:
+ elif "product-name" in vnfd and name == vnfd["product-name"]:
return vnfd
raise NotFound("vnfd {} not found".format(name))