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

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