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

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