projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor fixes to additional metric labels
[osm/MON.git]
/
osm_mon
/
collector
/
vnf_collectors
/
juju.py
diff --git
a/osm_mon/collector/vnf_collectors/juju.py
b/osm_mon/collector/vnf_collectors/juju.py
index
8be9e28
..
a73f1bb
100644
(file)
--- a/
osm_mon/collector/vnf_collectors/juju.py
+++ b/
osm_mon/collector/vnf_collectors/juju.py
@@
-51,7
+51,10
@@
class VCACollector(BaseCollector):
# Populate extra tags for metrics
tags = {}
tags['ns_name'] = self.common_db.get_nsr(nsr_id)['name']
# Populate extra tags for metrics
tags = {}
tags['ns_name'] = self.common_db.get_nsr(nsr_id)['name']
- tags['project_id'] = vnfr['_admin']['projects_read'][0]
+ if vnfr['_admin']['projects_read']:
+ tags['project_id'] = vnfr['_admin']['projects_read'][0]
+ else:
+ tags['project_id'] = None
metrics = []
for vdur in vnfr['vdur']:
metrics = []
for vdur in vnfr['vdur']: