projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "chore(gitignore): vscode files to gitignore" into v7.0
[osm/MON.git]
/
osm_mon
/
collector
/
vnf_collectors
/
vio.py
diff --git
a/osm_mon/collector/vnf_collectors/vio.py
b/osm_mon/collector/vnf_collectors/vio.py
index
77129e1
..
8413496
100644
(file)
--- a/
osm_mon/collector/vnf_collectors/vio.py
+++ b/
osm_mon/collector/vnf_collectors/vio.py
@@
-52,7
+52,10
@@
class VIOCollector(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'] = ''
# 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()