Blame SOURCES/bz1057299-fence_vmware_soap-add_delay.patch
|
|
182b9e |
commit 530e97f05e43bdd5bef9d24c75d4cc3057a491e8
|
|
|
182b9e |
Author: Marek 'marx' Grac <mgrac@redhat.com>
|
|
|
182b9e |
Date: Fri Jan 10 15:54:49 2014 +0100
|
|
|
182b9e |
|
|
|
182b9e |
fence_vmware_soap: --delay is not respected
|
|
|
182b9e |
|
|
|
182b9e |
Because fence agent do not use standard login process, support for the --delay has to be added.
|
|
|
182b9e |
|
|
|
182b9e |
diff --git a/fence/agents/vmware_soap/fence_vmware_soap.py b/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
182b9e |
index 98ac011..acfdcbb 100644
|
|
|
182b9e |
--- a/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
182b9e |
+++ b/fence/agents/vmware_soap/fence_vmware_soap.py
|
|
|
182b9e |
@@ -1,6 +1,6 @@
|
|
|
182b9e |
#!/usr/bin/python
|
|
|
182b9e |
|
|
|
182b9e |
-import sys, exceptions
|
|
|
182b9e |
+import sys, exceptions, time
|
|
|
182b9e |
import shutil, tempfile
|
|
|
182b9e |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
182b9e |
|
|
|
182b9e |
@@ -15,6 +15,9 @@ BUILD_DATE="April, 2011"
|
|
|
182b9e |
#END_VERSION_GENERATION
|
|
|
182b9e |
|
|
|
182b9e |
def soap_login(options):
|
|
|
182b9e |
+ if options["-o"] in ["off", "reboot"]:
|
|
|
182b9e |
+ time.sleep(int(options["--delay"]))
|
|
|
182b9e |
+
|
|
|
182b9e |
if options.has_key("--ssl"):
|
|
|
182b9e |
url = "https://"
|
|
|
182b9e |
else:
|