Blame SOURCES/bz1426693-2-fence_compute-project_id-to-project_name.patch

e4ffb1
diff -uNr a/fence/agents/compute/fence_compute.py b/fence/agents/compute/fence_compute.py
e4ffb1
--- a/fence/agents/compute/fence_compute.py	2017-04-03 13:54:40.694961510 +0200
e4ffb1
+++ b/fence/agents/compute/fence_compute.py	2017-04-03 14:29:52.957804288 +0200
e4ffb1
@@ -314,45 +314,45 @@
e4ffb1
 
e4ffb1
 	versions = [ "2.11", "2" ]
e4ffb1
 	for version in versions:
e4ffb1
-                clientargs = inspect.getargspec(client.Client).varargs
e4ffb1
+		clientargs = inspect.getargspec(client.Client).varargs
e4ffb1
 
e4ffb1
-                # Some versions of Openstack prior to Ocata only
e4ffb1
-                # supported positional arguments for username,
e4ffb1
-                # password and tenant.
e4ffb1
-                #
e4ffb1
-                # Versions since Ocata only support named arguments.
e4ffb1
-                #
e4ffb1
-                # So we need to use introspection to figure out how to
e4ffb1
-                # create a Nova client.
e4ffb1
-                #
e4ffb1
-                # Happy days
e4ffb1
-                #
e4ffb1
-                if clientargs:
e4ffb1
-                        # OSP < 11
e4ffb1
-                        # ArgSpec(args=['version', 'username', 'password', 'project_id', 'auth_url'],
e4ffb1
-                        #         varargs=None,
e4ffb1
-                        #         keywords='kwargs', defaults=(None, None, None, None))
e4ffb1
-		        nova = client.Client(version,
e4ffb1
-				             options["--username"],
e4ffb1
-				             options["--password"],
e4ffb1
-				             options["--tenant-name"],
e4ffb1
-				             options["--auth-url"],
e4ffb1
-				             insecure=options["--insecure"],
e4ffb1
-				             region_name=options["--region-name"],
e4ffb1
-				             endpoint_type=options["--endpoint-type"],
e4ffb1
-				             http_log_debug=options.has_key("--verbose"))
e4ffb1
-                else:
e4ffb1
-                        # OSP >= 11
e4ffb1
-                        # ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None)
e4ffb1
-		        nova = client.Client(version,
e4ffb1
-				             username=options["--username"],
e4ffb1
-				             password=options["--password"],
e4ffb1
-				             tenant_name=options["--tenant-name"],
e4ffb1
-				             auth_url=options["--auth-url"],
e4ffb1
-				             insecure=options["--insecure"],
e4ffb1
-				             region_name=options["--region-name"],
e4ffb1
-				             endpoint_type=options["--endpoint-type"],
e4ffb1
-				             http_log_debug=options.has_key("--verbose"))
e4ffb1
+		# Some versions of Openstack prior to Ocata only
e4ffb1
+		# supported positional arguments for username,
e4ffb1
+		# password and tenant.
e4ffb1
+		#
e4ffb1
+		# Versions since Ocata only support named arguments.
e4ffb1
+		#
e4ffb1
+		# So we need to use introspection to figure out how to
e4ffb1
+		# create a Nova client.
e4ffb1
+		#
e4ffb1
+		# Happy days
e4ffb1
+		#
e4ffb1
+		if clientargs:
e4ffb1
+			# OSP < 11
e4ffb1
+			# ArgSpec(args=['version', 'username', 'password', 'project_id', 'auth_url'],
e4ffb1
+			#         varargs=None,
e4ffb1
+			#         keywords='kwargs', defaults=(None, None, None, None))
e4ffb1
+			nova = client.Client(version,
e4ffb1
+					options["--username"],
e4ffb1
+					options["--password"],
e4ffb1
+					options["--tenant-name"],
e4ffb1
+					options["--auth-url"],
e4ffb1
+					insecure=options["--insecure"],
e4ffb1
+					region_name=options["--region-name"],
e4ffb1
+					endpoint_type=options["--endpoint-type"],
e4ffb1
+					http_log_debug=options.has_key("--verbose"))
e4ffb1
+		else:
e4ffb1
+			# OSP >= 11
e4ffb1
+			# ArgSpec(args=['version'], varargs='args', keywords='kwargs', defaults=None)
e4ffb1
+			nova = client.Client(version,
e4ffb1
+					username=options["--username"],
e4ffb1
+					password=options["--password"],
e4ffb1
+					tenant_name=options["--tenant-name"],
e4ffb1
+					auth_url=options["--auth-url"],
e4ffb1
+					insecure=options["--insecure"],
e4ffb1
+					region_name=options["--region-name"],
e4ffb1
+					endpoint_type=options["--endpoint-type"],
e4ffb1
+					http_log_debug=options.has_key("--verbose"))
e4ffb1
 
e4ffb1
 		try:
e4ffb1
 			nova.hypervisors.list()
e4ffb1
diff -uNr a/tests/data/metadata/fence_compute.xml b/tests/data/metadata/fence_compute.xml
e4ffb1
--- a/tests/data/metadata/fence_compute.xml	2017-04-03 13:54:40.687961577 +0200
e4ffb1
+++ b/tests/data/metadata/fence_compute.xml	2017-04-03 14:30:35.975395245 +0200
e4ffb1
@@ -113,16 +113,16 @@
e4ffb1
 		<content type="string" default="False"  />
e4ffb1
 		<shortdesc lang="en">Only record the target as needing evacuation</shortdesc>
e4ffb1
 	</parameter>
e4ffb1
-	<parameter name="record_only" unique="0" required="0" obsoletes="record-only">
e4ffb1
-		<getopt mixed="--record-only" />
e4ffb1
-		<content type="string" default="False"  />
e4ffb1
-		<shortdesc lang="en">Only record the target as needing evacuation</shortdesc>
e4ffb1
-	</parameter>
e4ffb1
 	<parameter name="instance_filtering" unique="0" required="0" obsoletes="instance-filtering">
e4ffb1
 		<getopt mixed="--instance-filtering" />
e4ffb1
 		<content type="boolean" default="True"  />
e4ffb1
 		<shortdesc lang="en">Allow instances to be evacuated</shortdesc>
e4ffb1
 	</parameter>
e4ffb1
+	<parameter name="record_only" unique="0" required="0" obsoletes="record-only">
e4ffb1
+		<getopt mixed="--record-only" />
e4ffb1
+		<content type="string" default="False"  />
e4ffb1
+		<shortdesc lang="en">Only record the target as needing evacuation</shortdesc>
e4ffb1
+	</parameter>
e4ffb1
 	<parameter name="no_shared_storage" unique="0" required="0" obsoletes="no-shared-storage">
e4ffb1
 		<getopt mixed="--no-shared-storage" />
e4ffb1
 		<content type="boolean" default="False"  />
e4ffb1
@@ -190,7 +190,7 @@
e4ffb1
 	</parameter>
e4ffb1
 </parameters>
e4ffb1
 <actions>
e4ffb1
-	<action name="on" on_target="1" automatic="1"/>
e4ffb1
+	<action name="on" automatic="1"/>
e4ffb1
 	<action name="off" />
e4ffb1
 	<action name="status" />
e4ffb1
 	<action name="list" />