Blame SOURCES/bz1600602-2-fence_compute-fence_evacuate-fix-compute-domain.patch

67bff5
diff -uNr a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
67bff5
--- a/fence/agents/compute/fence_compute.py	2018-07-16 12:34:24.982643862 +0200
67bff5
+++ b/fence/agents/compute/fence_compute.py	2018-07-16 12:42:16.965667752 +0200
67bff5
@@ -353,7 +353,7 @@
67bff5
 		"default" : "",
67bff5
 		"order": 1,
67bff5
 	}
67bff5
-	all_opt["user_domain"] = {
67bff5
+	all_opt["user-domain"] = {
67bff5
 		"getopt" : "u:",
67bff5
 		"longopt" : "user-domain",
67bff5
 		"help" : "-u, --user-domain=[name]       Keystone v3 User Domain",
67bff5
@@ -362,7 +362,7 @@
67bff5
 		"default" : "Default",
67bff5
 		"order": 2,
67bff5
 	}
67bff5
-	all_opt["project_domain"] = {
67bff5
+	all_opt["project-domain"] = {
67bff5
 		"getopt" : "P:",
67bff5
 		"longopt" : "project-domain",
67bff5
 		"help" : "-d, --project-domain=[name]    Keystone v3 Project Domain",
67bff5
@@ -433,6 +433,14 @@
67bff5
 		"default" : "False",
67bff5
 		"order": 5,
67bff5
 	}
67bff5
+	all_opt["compute-domain"] = {
67bff5
+		"getopt" : ":",
67bff5
+		"longopt" : "compute-domain",
67bff5
+		"help" : "--compute-domain=[string]      Replaced by --domain",
67bff5
+		"required" : "0",
67bff5
+		"shortdesc" : "Replaced by domain",
67bff5
+		"order": 6,
67bff5
+	}
67bff5
 
67bff5
 def set_multi_power_fn(connection, options, set_power_fn, get_power_fn, retry_attempts=1):
67bff5
 	for _ in range(retry_attempts):
67bff5
@@ -450,9 +458,10 @@
67bff5
 	global override_status
67bff5
 	atexit.register(atexit_handler)
67bff5
 
67bff5
-	device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing",
67bff5
-		      "no_login", "no_password", "port", "domain", "project_domain", "user_domain",
67bff5
-		      "no_shared_storage", "endpoint_type", "record_only", "instance_filtering", "insecure", "region_name"]
67bff5
+	device_opt = ["login", "passwd", "tenant_name", "auth_url", "fabric_fencing", "no_login",
67bff5
+			"no_password", "port", "domain", "compute-domain", "project-domain",
67bff5
+			"user-domain", "no_shared_storage", "endpoint_type", "record_only",
67bff5
+			"instance_filtering", "insecure", "region_name"]
67bff5
 	define_new_opts()
67bff5
 	all_opt["shell_timeout"]["default"] = "180"
67bff5
 
67bff5
@@ -470,6 +479,11 @@
67bff5
 
67bff5
 	run_delay(options)
67bff5
 
67bff5
+	# workaround to avoid regressions
67bff5
+	if "--compute-domain" in options and options["--compute-domain"]:
67bff5
+		options["--domain"] = options["--compute-domain"]
67bff5
+		del options["--domain"]
67bff5
+
67bff5
 	logging.debug("Running "+options["--action"])
67bff5
 	connection = create_nova_connection(options)
67bff5
 
67bff5
diff -uNr a/fence/agents/compute/fence_evacuate.py b/fence/agents/compute/fence_evacuate.py
67bff5
--- a/fence/agents/compute/fence_evacuate.py	2018-07-16 12:34:24.982643862 +0200
67bff5
+++ b/fence/agents/compute/fence_evacuate.py	2018-07-16 12:42:16.966667739 +0200
67bff5
@@ -290,7 +290,7 @@
67bff5
 		"default" : "",
67bff5
 		"order": 1,
67bff5
 	}
67bff5
-	all_opt["user_domain"] = {
67bff5
+	all_opt["user-domain"] = {
67bff5
 		"getopt" : "u:",
67bff5
 		"longopt" : "user-domain",
67bff5
 		"help" : "-u, --user-domain=[name]       Keystone v3 User Domain",
67bff5
@@ -299,7 +299,7 @@
67bff5
 		"default" : "Default",
67bff5
 		"order": 2,
67bff5
 	}
67bff5
-	all_opt["project_domain"] = {
67bff5
+	all_opt["project-domain"] = {
67bff5
 		"getopt" : "P:",
67bff5
 		"longopt" : "project-domain",
67bff5
 		"help" : "-d, --project-domain=[name]    Keystone v3 Project Domain",
67bff5
@@ -361,14 +361,22 @@
67bff5
 		"default" : "False",
67bff5
 		"order": 5,
67bff5
 	}
67bff5
+	all_opt["compute-domain"] = {
67bff5
+		"getopt" : ":",
67bff5
+		"longopt" : "compute-domain",
67bff5
+		"help" : "--compute-domain=[string]      Replaced by --domain",
67bff5
+		"required" : "0",
67bff5
+		"shortdesc" : "Replaced by domain",
67bff5
+		"order": 6,
67bff5
+	}
67bff5
 
67bff5
 def main():
67bff5
 	atexit.register(atexit_handler)
67bff5
 
67bff5
 	device_opt = ["login", "passwd", "tenant_name", "auth_url",
67bff5
-		      "no_login", "no_password", "port", "domain", "project_domain",
67bff5
-		      "user_domain", "no_shared_storage", "endpoint_type",
67bff5
-		      "instance_filtering", "insecure", "region_name"]
67bff5
+		      "no_login", "no_password", "port", "domain", "compute-domain",
67bff5
+		      "project-domain", "user-domain", "no_shared_storage",
67bff5
+		      "endpoint_type", "instance_filtering", "insecure", "region_name"]
67bff5
 	define_new_opts()
67bff5
 	all_opt["shell_timeout"]["default"] = "180"
67bff5
 
67bff5
@@ -383,6 +391,12 @@
67bff5
 
67bff5
 	run_delay(options)
67bff5
 
67bff5
+	# workaround to avoid regressions
67bff5
+	if "--compute-domain" in options and options["--compute-domain"]:
67bff5
+		options["--domain"] = options["--compute-domain"]
67bff5
+		del options["--domain"]
67bff5
+
67bff5
+
67bff5
 	connection = create_nova_connection(options)
67bff5
 
67bff5
 	# Un-evacuating a server doesn't make sense