X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fvnf_collectors%2Fopenstack.py;h=60b387cf2e4d0a5887b1195687154618444f771a;hb=59030bad5d9511e6721701eb33c9d826eb938004;hp=a13380ad623cd9fa879fc57f8dda0825a9077e62;hpb=94a96efdb03e39d133790197bd7b73747105f9d8;p=osm%2FMON.git diff --git a/osm_mon/collector/vnf_collectors/openstack.py b/osm_mon/collector/vnf_collectors/openstack.py index a13380a..60b387c 100644 --- a/osm_mon/collector/vnf_collectors/openstack.py +++ b/osm_mon/collector/vnf_collectors/openstack.py @@ -85,7 +85,10 @@ class OpenstackCollector(BaseVimCollector): # Populate extra tags for metrics 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'] = '' metrics = [] for vdur in vnfr['vdur']: