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