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

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