X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=osm_mon%2Fdashboarder%2Fservice.py;h=8008f7dd3f4827cc4cc9cb02c31b3bb0be52f3db;hb=9d210bd18c2e45c15ec5e38e69a58deacf68e243;hp=10dc0f771214d8a5e31fca77eded3885031919c7;hpb=456d0f323cfcb5fe6b8cad5a6c3e6633875633cd;p=osm%2FMON.git diff --git a/osm_mon/dashboarder/service.py b/osm_mon/dashboarder/service.py index 10dc0f7..8008f7d 100644 --- a/osm_mon/dashboarder/service.py +++ b/osm_mon/dashboarder/service.py @@ -25,6 +25,7 @@ import logging from osm_mon.core.common_db import CommonDbClient from osm_mon.core.config import Config import osm_mon.dashboarder.backends.grafana as grafana +from osm_mon import __path__ as mon_path log = logging.getLogger(__name__) @@ -46,7 +47,7 @@ class DashboarderService: project_id = project['_id'] # Collect Project IDs for periodical dashboard clean-up osm_resource_uids.append(project_id) - dashboard_path = '/mon/osm_mon/dashboarder/templates/project_scoped.json' + dashboard_path = '{}/dashboarder/templates/project_scoped.json'.format(mon_path[0]) if project_id not in dashboard_uids: project_name = project['name'] grafana.create_dashboard(project_id, project_name, @@ -60,7 +61,7 @@ class DashboarderService: nsrs = self.common_db.get_nsrs() for nsr in nsrs: nsr_id = nsr['_id'] - dashboard_path = '/mon/osm_mon/dashboarder/templates/ns_scoped.json' + dashboard_path = '{}/dashboarder/templates/ns_scoped.json'.format(mon_path[0]) # Collect NS IDs for periodical dashboard clean-up osm_resource_uids.append(nsr_id) # Check if the NSR's VNFDs contain metrics