Blame SOURCES/bz2080994-fence_ibm_vpc-fix-parameters.patch

eab3e9
From d0254345472c9415af1e06e9e8df2fe0ce464db0 Mon Sep 17 00:00:00 2001
eab3e9
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
eab3e9
Date: Mon, 2 May 2022 11:14:42 +0200
eab3e9
Subject: [PATCH] fence_ibm_vpc: remove unused instance parameter and make
eab3e9
 limit optional
eab3e9
eab3e9
---
eab3e9
 agents/ibm_vpc/fence_ibm_vpc.py       | 11 +----------
eab3e9
 tests/data/metadata/fence_ibm_vpc.xml |  7 +------
eab3e9
 2 files changed, 2 insertions(+), 16 deletions(-)
eab3e9
eab3e9
diff --git a/agents/ibm_vpc/fence_ibm_vpc.py b/agents/ibm_vpc/fence_ibm_vpc.py
eab3e9
index 9f84f7b2d..9e38e8301 100755
eab3e9
--- a/agents/ibm_vpc/fence_ibm_vpc.py
eab3e9
+++ b/agents/ibm_vpc/fence_ibm_vpc.py
eab3e9
@@ -161,14 +161,6 @@ def define_new_opts():
eab3e9
 		"shortdesc" : "API Key",
eab3e9
 		"order" : 0
eab3e9
 	}
eab3e9
-	all_opt["instance"] = {
eab3e9
-		"getopt" : ":",
eab3e9
-		"longopt" : "instance",
eab3e9
-		"help" : "--instance=[instance]          Cloud Instance",
eab3e9
-		"required" : "1",
eab3e9
-		"shortdesc" : "Cloud Instance",
eab3e9
-		"order" : 0
eab3e9
-	}
eab3e9
 	all_opt["region"] = {
eab3e9
 		"getopt" : ":",
eab3e9
 		"longopt" : "region",
eab3e9
@@ -181,7 +173,7 @@ def define_new_opts():
eab3e9
 		"getopt" : ":",
eab3e9
 		"longopt" : "limit",
eab3e9
 		"help" : "--limit=[number]               Limit number of nodes returned by API",
eab3e9
-		"required" : "1",
eab3e9
+		"required" : "0",
eab3e9
 		"default": 50,
eab3e9
 		"shortdesc" : "Number of nodes returned by API",
eab3e9
 		"order" : 0
eab3e9
@@ -191,7 +183,6 @@ def define_new_opts():
eab3e9
 def main():
eab3e9
 	device_opt = [
eab3e9
 		"apikey",
eab3e9
-		"instance",
eab3e9
 		"region",
eab3e9
 		"limit",
eab3e9
 		"port",
eab3e9
diff --git a/tests/data/metadata/fence_ibm_vpc.xml b/tests/data/metadata/fence_ibm_vpc.xml
eab3e9
index 926efcaa0..ee7151673 100644
eab3e9
--- a/tests/data/metadata/fence_ibm_vpc.xml
eab3e9
+++ b/tests/data/metadata/fence_ibm_vpc.xml
eab3e9
@@ -8,12 +8,7 @@
eab3e9
 		<content type="string"  />
eab3e9
 		<shortdesc lang="en">API Key</shortdesc>
eab3e9
 	</parameter>
eab3e9
-	<parameter name="instance" unique="0" required="1">
eab3e9
-		<getopt mixed="--instance=[instance]" />
eab3e9
-		<content type="string"  />
eab3e9
-		<shortdesc lang="en">Cloud Instance</shortdesc>
eab3e9
-	</parameter>
eab3e9
-	<parameter name="limit" unique="0" required="1">
eab3e9
+	<parameter name="limit" unique="0" required="0">
eab3e9
 		<getopt mixed="--limit=[number]" />
eab3e9
 		<content type="string" default="50"  />
eab3e9
 		<shortdesc lang="en">Number of nodes returned by API</shortdesc>