Blame SOURCES/bz1732773-fence_vmware_rest-fix-keyerror-suspended-vms.patch

83de4b
From 33a638ff624839d7fa2d409479c348abee57763e Mon Sep 17 00:00:00 2001
83de4b
From: dwannamaker-onr <dwannamaker@onr.com>
83de4b
Date: Tue, 25 Jun 2019 15:28:00 -0400
83de4b
Subject: [PATCH] Fixed issue with SUSPENDED VMs
83de4b
83de4b
If any VMs in the vCenter are suspended, you get a KeyError because that state is not expected.  This breaks list and monitor actions.
83de4b
---
83de4b
 agents/vmware_rest/fence_vmware_rest.py | 2 +-
83de4b
 1 file changed, 1 insertion(+), 1 deletion(-)
83de4b
83de4b
diff --git a/agents/vmware_rest/fence_vmware_rest.py b/agents/vmware_rest/fence_vmware_rest.py
83de4b
index b544d385..53b4066d 100644
83de4b
--- a/agents/vmware_rest/fence_vmware_rest.py
83de4b
+++ b/agents/vmware_rest/fence_vmware_rest.py
83de4b
@@ -8,7 +8,7 @@
83de4b
 from fencing import *
83de4b
 from fencing import fail, run_delay, EC_LOGIN_DENIED, EC_STATUS
83de4b
 
83de4b
-state = {"POWERED_ON": "on", 'POWERED_OFF': "off"}
83de4b
+state = {"POWERED_ON": "on", 'POWERED_OFF': "off", 'SUSPENDED': "off"}
83de4b
 
83de4b
 def get_power_status(conn, options):
83de4b
 	res = send_command(conn, "vcenter/vm?filter.names={}".format(options["--plug"]))["value"]