Blame SOURCES/bz1677327-2-fence_redfish-ip-parameter-backward-compatibility.patch

77640d
From 21898e45ca2624546de99086a27a14dd1ff86a2b Mon Sep 17 00:00:00 2001
77640d
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
77640d
Date: Thu, 21 Feb 2019 09:08:03 +0100
77640d
Subject: [PATCH] fence_redfish: backwards compatibility for <ip>:<port>
77640d
77640d
---
77640d
 agents/redfish/fence_redfish.py | 4 ++++
77640d
 1 file changed, 4 insertions(+)
77640d
77640d
diff --git a/agents/redfish/fence_redfish.py b/agents/redfish/fence_redfish.py
77640d
index 28840058..f1424232 100644
77640d
--- a/agents/redfish/fence_redfish.py
77640d
+++ b/agents/redfish/fence_redfish.py
77640d
@@ -140,6 +140,10 @@ def main():
77640d
     if "--ssl-insecure" in opt:
77640d
         requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
77640d
 
77640d
+    # backwards compatibility for <ip>:<port>
77640d
+    if options["--ip"].count(":") == 1:
77640d
+        (options["--ip"], options["--ipport"]) = options["--ip"].split(":")
77640d
+
77640d
     if "--systems-uri" not in opt:
77640d
         # Systems URI not provided, find it
77640d
         sysresult = find_systems_resource(options)