X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fvnf_collectors%2Fvio.py;h=8413496ef008022d09481b284229981d1991b71f;hb=refs%2Ftags%2Fv7.0.1rc3;hp=77129e1d087be68c01067968b23ee03cd5c9b254;hpb=94a96efdb03e39d133790197bd7b73747105f9d8;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()