Change-Id: I08dc2c76b85b61212662680ad0d54af76a9c48a4
Signed-off-by: agarwalat <atul.agarwal@altran.com>
{"_id": vnfd_id})
return vnfd
+ def get_vnfd_by_id(self, vnfd_id: str):
+ vnfd = self.common_db.get_one("vnfds",
+ {"id": vnfd_id})
+ return vnfd
+
def get_vnfd_by_name(self, vnfd_name: str):
# TODO: optimize way of getting single VNFD in shared enviroments (RBAC)
if self.common_db.get_list("vnfds", {"name": vnfd_name}):
constituent_vnfds = nsr['nsd']['constituent-vnfd']
for constituent_vnfd in constituent_vnfds:
try:
- vnfd = self.common_db.get_vnfd_by_name(constituent_vnfd['vnfd-id-ref'])
+ vnfd = self.common_db.get_vnfd_by_id(constituent_vnfd['vnfd-id-ref'])
# If there are metrics, create dashboard (if exists)
if 'monitoring-param' in vnfd:
if nsr_id not in dashboard_uids: