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

25 lines
939 B
Diff
Raw Normal View History

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