summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v2_0
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/identity/v2_0')
-rw-r--r--openstackclient/identity/v2_0/ec2creds.py8
-rw-r--r--openstackclient/identity/v2_0/endpoint.py9
-rw-r--r--openstackclient/identity/v2_0/role.py9
-rw-r--r--openstackclient/identity/v2_0/service.py9
-rw-r--r--openstackclient/identity/v2_0/tenant.py7
-rw-r--r--openstackclient/identity/v2_0/user.py7
6 files changed, 28 insertions, 21 deletions
diff --git a/openstackclient/identity/v2_0/ec2creds.py b/openstackclient/identity/v2_0/ec2creds.py
index 953a3de6..cb3a5165 100644
--- a/openstackclient/identity/v2_0/ec2creds.py
+++ b/openstackclient/identity/v2_0/ec2creds.py
@@ -1,3 +1,4 @@
+# Copyright 2012 OpenStack Foundation
# Copyright 2013 Nebula Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@@ -13,9 +14,10 @@
# under the License.
#
-"""EC2 Credentials action implementations"""
+"""Identity v2 EC2 Credentials action implementations"""
import logging
+import six
from cliff import command
from cliff import lister
@@ -68,7 +70,7 @@ class CreateEC2Creds(show.ShowOne):
info = {}
info.update(creds._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteEC2Creds(command.Command):
@@ -178,4 +180,4 @@ class ShowEC2Creds(show.ShowOne):
info = {}
info.update(creds._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
diff --git a/openstackclient/identity/v2_0/endpoint.py b/openstackclient/identity/v2_0/endpoint.py
index 680465ae..5a050fa1 100644
--- a/openstackclient/identity/v2_0/endpoint.py
+++ b/openstackclient/identity/v2_0/endpoint.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2013 OpenStack, LLC.
+# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@@ -16,6 +16,7 @@
"""Endpoint action implementations"""
import logging
+import six
from cliff import command
from cliff import lister
@@ -71,7 +72,7 @@ class CreateEndpoint(show.ShowOne):
info.update(endpoint._info)
info['service_name'] = service.name
info['service_type'] = service.type
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteEndpoint(command.Command):
@@ -183,7 +184,7 @@ class ShowEndpoint(show.ShowOne):
url = identity_client.service_catalog.url_for(**kwargs)
info = {'%s.%s' % (parsed_args.service, parsed_args.type): url}
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
else:
# The Identity 2.0 API doesn't support retrieving a single
# endpoint so we have to do this ourselves
@@ -211,4 +212,4 @@ class ShowEndpoint(show.ShowOne):
ep.service_id)
info['service_name'] = service.name
info['service_type'] = service.type
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
diff --git a/openstackclient/identity/v2_0/role.py b/openstackclient/identity/v2_0/role.py
index 867230b6..61a83af5 100644
--- a/openstackclient/identity/v2_0/role.py
+++ b/openstackclient/identity/v2_0/role.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2013 OpenStack, LLC.
+# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@@ -16,6 +16,7 @@
"""Role action implementations"""
import logging
+import six
from cliff import command
from cliff import lister
@@ -61,7 +62,7 @@ class AddRole(show.ShowOne):
info = {}
info.update(role._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class CreateRole(show.ShowOne):
@@ -84,7 +85,7 @@ class CreateRole(show.ShowOne):
info = {}
info.update(role._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteRole(command.Command):
@@ -229,4 +230,4 @@ class ShowRole(show.ShowOne):
info = {}
info.update(role._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
diff --git a/openstackclient/identity/v2_0/service.py b/openstackclient/identity/v2_0/service.py
index 629475df..2e81805b 100644
--- a/openstackclient/identity/v2_0/service.py
+++ b/openstackclient/identity/v2_0/service.py
@@ -16,6 +16,7 @@
"""Service action implementations"""
import logging
+import six
from cliff import command
from cliff import lister
@@ -58,7 +59,7 @@ class CreateService(show.ShowOne):
info = {}
info.update(service._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteService(command.Command):
@@ -136,11 +137,11 @@ class ShowService(show.ShowOne):
if parsed_args.catalog:
endpoints = identity_client.service_catalog.get_endpoints(
service_type=parsed_args.service)
- for (service, service_endpoints) in endpoints.iteritems():
+ for (service, service_endpoints) in six.iteritems(endpoints):
if service_endpoints:
info = {"type": service}
info.update(service_endpoints[0])
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
msg = ("No service catalog with a type, name or ID of '%s' "
"exists." % (parsed_args.service))
@@ -166,4 +167,4 @@ class ShowService(show.ShowOne):
info = {}
info.update(service._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
diff --git a/openstackclient/identity/v2_0/tenant.py b/openstackclient/identity/v2_0/tenant.py
index c9a423c5..d535716c 100644
--- a/openstackclient/identity/v2_0/tenant.py
+++ b/openstackclient/identity/v2_0/tenant.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2013 OpenStack, LLC.
+# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@@ -16,6 +16,7 @@
"""Tenant action implementations"""
import logging
+import six
import sys
from cliff import command
@@ -64,7 +65,7 @@ class CreateTenant(show.ShowOne):
info = {}
info.update(tenant._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteTenant(command.Command):
@@ -191,4 +192,4 @@ class ShowTenant(show.ShowOne):
info = {}
info.update(tenant._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
diff --git a/openstackclient/identity/v2_0/user.py b/openstackclient/identity/v2_0/user.py
index 39be81af..8c8e2622 100644
--- a/openstackclient/identity/v2_0/user.py
+++ b/openstackclient/identity/v2_0/user.py
@@ -1,4 +1,4 @@
-# Copyright 2012-2013 OpenStack, LLC.
+# Copyright 2012-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@@ -16,6 +16,7 @@
"""Identity v2.0 User action implementations"""
import logging
+import six
import sys
from cliff import command
@@ -79,7 +80,7 @@ class CreateUser(show.ShowOne):
info = {}
info.update(user._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))
class DeleteUser(command.Command):
@@ -219,4 +220,4 @@ class ShowUser(show.ShowOne):
info = {}
info.update(user._info)
- return zip(*sorted(info.iteritems()))
+ return zip(*sorted(six.iteritems(info)))