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 @@ Only record the target as needing evacuation - - - - Only record the target as needing evacuation - Allow instances to be evacuated + + + + Only record the target as needing evacuation + @@ -190,7 +190,7 @@ - +