fix(mongodb): query now with filters to get just the VNFD referenced by the NSR. Bug 1463
Change-Id: I6da85baa7fc2d57760253849cb81790bee7d847f
Signed-off-by: bravof <fbravo@whitestack.com>
(cherry picked from commit 5ac541553bb3b751032b18dde0fa6113a789ba87)
diff --git a/osm_mon/dashboarder/service.py b/osm_mon/dashboarder/service.py
index 0dd3d90..79cccb4 100644
--- a/osm_mon/dashboarder/service.py
+++ b/osm_mon/dashboarder/service.py
@@ -27,7 +27,7 @@
from osm_mon.core.keystone import KeystoneConnection
from osm_mon.dashboarder.backends.grafana import GrafanaBackend
from osm_mon import __path__ as mon_path
-from osm_mon.dashboarder.utils import find_in_list
+from osm_mon.core.utils import find_in_list, create_filter_from_nsr
log = logging.getLogger(__name__)
@@ -91,7 +91,7 @@
vnfds_profiles = nsr['nsd']["df"][0]['vnf-profile']
for vnf_profile in vnfds_profiles:
try:
- vnfd = self.common_db.get_vnfd_by_id(vnf_profile['vnfd-id'])
+ vnfd = self.common_db.get_vnfd_by_id(vnf_profile['vnfd-id'], create_filter_from_nsr(nsr))
# If there are metrics, create dashboard (if exists)
vdu_found = find_in_list(vnfd["vdu"], lambda a_vdu: "monitoring-parameter" in a_vdu)
if vdu_found: