X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fvnf_collectors%2Fvio.py;h=8413496ef008022d09481b284229981d1991b71f;hb=73dbb4e243f47afef0d1bb61988608e256939e87;hp=77129e1d087be68c01067968b23ee03cd5c9b254;hpb=a69f2725ddb055a25570deb1f2a14d28ff38314e;p=osm%2FMON.git diff --git a/osm_mon/collector/vnf_collectors/vio.py b/osm_mon/collector/vnf_collectors/vio.py index 77129e1..8413496 100644 --- 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'] - 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()