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

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