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
/
vmware.py
diff --git
a/osm_mon/collector/vnf_collectors/vmware.py
b/osm_mon/collector/vnf_collectors/vmware.py
index
0e76bfd
..
626a402
100644
(file)
--- a/
osm_mon/collector/vnf_collectors/vmware.py
+++ b/
osm_mon/collector/vnf_collectors/vmware.py
@@
-188,7
+188,10
@@
class VMwareCollector(BaseVimCollector):
nsr_id = vnfr['nsr-id-ref']
tags = {}
tags['ns_name'] = self.common_db.get_nsr(nsr_id)['name']
nsr_id = vnfr['nsr-id-ref']
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
# Fetch the list of all known resources from vROPS.
resource_list = self.vrops.get_vm_resource_list_from_vrops()
# Fetch the list of all known resources from vROPS.
resource_list = self.vrops.get_vm_resource_list_from_vrops()