Blame SOURCES/bz1214359-4-fence_compute.patch

02611b
From b1e7b610b51c0be23d7adc0e2ab369850d924f87 Mon Sep 17 00:00:00 2001
02611b
From: "Fabio M. Di Nitto" <fdinitto@redhat.com>
02611b
Date: Mon, 8 Jun 2015 14:43:00 +0200
02611b
Subject: [PATCH 4/4] compute: add support for endpoint-type
02611b
02611b
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
02611b
---
02611b
 fence/agents/compute/fence_compute.py | 14 ++++++++++++--
02611b
 1 file changed, 12 insertions(+), 2 deletions(-)
02611b
02611b
diff --git a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
02611b
index c2c90fc..000aef7 100644
02611b
--- a/fence/agents/compute/fence_compute.py
02611b
+++ b/fence/agents/compute/fence_compute.py
02611b
@@ -123,6 +123,15 @@ def get_plugs_list(_, options):
02611b
 
02611b
 
02611b
 def define_new_opts():
02611b
+	all_opt["endpoint-type"] = {
02611b
+		"getopt" : "e:",
02611b
+		"longopt" : "endpoint-type",
02611b
+		"help" : "-e, --endpoint-type=[endpoint] Nova Endpoint type (publicURL, internalURL, adminURL)",
02611b
+		"required" : "0",
02611b
+		"shortdesc" : "Nova Endpoint type",
02611b
+		"default" : "internalURL",
02611b
+		"order": 1,
02611b
+	}
02611b
 	all_opt["tenant-name"] = {
02611b
 		"getopt" : "t:",
02611b
 		"longopt" : "tenant-name",
02611b
@@ -166,7 +175,7 @@ def main():
02611b
 	atexit.register(atexit_handler)
02611b
 
02611b
 	device_opt = ["login", "passwd", "tenant-name", "auth-url",
02611b
-		"no_login", "no_password", "port", "domain", "no-shared-storage"]
02611b
+		"no_login", "no_password", "port", "domain", "no-shared-storage", "endpoint-type"]
02611b
 	define_new_opts()
02611b
 	all_opt["shell_timeout"]["default"] = "180"
02611b
 
02611b
@@ -195,7 +204,8 @@ def main():
02611b
 		options["--username"],
02611b
 		options["--password"],
02611b
 		options["--tenant-name"],
02611b
-		options["--auth-url"])
02611b
+		options["--auth-url"],
02611b
+		endpoint_type=options["--endpoint-type"])
02611b
 
02611b
 	if options["--action"] in ["on", "off", "reboot" ]:
02611b
 		try:
02611b
-- 
02611b
1.9.3
02611b