tags = {
"vim_account_id": self.vim_account["_id"],
"resource_uuid": resource_uuid,
- "nsr_id": nsr_id,
+ "ns_id": nsr_id,
"ns_name": ns_name,
"vnf_member_index": vnf_member_index,
- "vdur_name": vdur.get("name", ""),
+ "vdu_name": vdur.get("name", ""),
"project_id": vnfr_project_id,
}
try:
vm = self.nova.servers.get(resource_uuid)
- vm_status = 1 if vm.status == "ACTIVE" else 0
+ vm_status = (0 if (vm.status == 'ERROR') else 1)
vm_status_metric = Metric(tags, "vm_status", vm_status)
except Exception as e:
log.warning("VM status is not OK: %s" % e)