# License for the specific language governing permissions and limitations
# under the License.
# For those usages not covered by the Apache License, Version 2.0 please
# License for the specific language governing permissions and limitations
# under the License.
# For those usages not covered by the Apache License, Version 2.0 please
from osm_mon.core.config import Config
from osm_mon.dashboarder.backends.grafana import GrafanaBackend
from osm_mon import __path__ as mon_path
from osm_mon.core.config import Config
from osm_mon.dashboarder.backends.grafana import GrafanaBackend
from osm_mon import __path__ as mon_path
dashboard_path = '{}/dashboarder/templates/project_scoped.json'.format(mon_path[0])
if project_id not in dashboard_uids:
project_name = project['name']
dashboard_path = '{}/dashboarder/templates/project_scoped.json'.format(mon_path[0])
if project_id not in dashboard_uids:
project_name = project['name']
self.grafana.create_dashboard(project_id, project_name,
dashboard_path)
log.debug('Created dashboard for Project: %s', project_id)
self.grafana.create_dashboard(project_id, project_name,
dashboard_path)
log.debug('Created dashboard for Project: %s', project_id)
try:
vnfd = self.common_db.get_vnfd_by_id(vnf_profile['vnfd-id'])
# If there are metrics, create dashboard (if exists)
try:
vnfd = self.common_db.get_vnfd_by_id(vnf_profile['vnfd-id'])
# If there are metrics, create dashboard (if exists)