fix(mongodb): query now with filters to get just the VNFD referenced by the NSR....
[osm/MON.git] / osm_mon / core / common_db.py
index e43c6cd..ce44d4d 100644 (file)
@@ -62,9 +62,9 @@ class CommonDbClient:
                                       {"_id": vnfd_id})
         return vnfd
 
-    def get_vnfd_by_id(self, vnfd_id: str):
-        vnfd = self.common_db.get_one("vnfds",
-                                      {"id": vnfd_id})
+    def get_vnfd_by_id(self, vnfd_id: str, filter: dict = {}):
+        filter["id"] = vnfd_id
+        vnfd = self.common_db.get_one("vnfds", filter)
         return vnfd
 
     def get_vnfd_by_name(self, vnfd_name: str):