X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fvnf_collectors%2Fvmware.py;fp=osm_mon%2Fcollector%2Fvnf_collectors%2Fvmware.py;h=626a402b923bb0f074886e71c8410ea7d1b2cb87;hb=cee3b8656b4eef1c9dda980191a3463a5fdb2a67;hp=0e76bfd7c6e306a310d5bf57e4cd766d0db20cc1;hpb=456d0f323cfcb5fe6b8cad5a6c3e6633875633cd;p=osm%2FMON.git diff --git a/osm_mon/collector/vnf_collectors/vmware.py b/osm_mon/collector/vnf_collectors/vmware.py index 0e76bfd..626a402 100644 --- 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'] - 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()