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

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