summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-12-05 12:54:19 -0600
committerDean Troyer <dtroyer@gmail.com>2014-12-05 22:21:32 -0600
commit1a25cbaf8f2c1643181ef6233f72a57aaac5404d (patch)
treed1db670fc2db6075e89035968977995e77e07315 /openstackclient
parent62a2083a785bcfac25b2b7e409e1c7e066f9edff (diff)
downloadpython-openstackclient-1a25cbaf8f2c1643181ef6233f72a57aaac5404d.tar.gz
Followup for ec2 credentials command fix
Add functional tests for 'ec2 credentials' commands. Also fix tenant_id in output for create and show. Change-Id: I6ba3249b67408571624709e17f8aa2ac6d80237d
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/v2_0/ec2creds.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/openstackclient/identity/v2_0/ec2creds.py b/openstackclient/identity/v2_0/ec2creds.py
index 7a4dea66..a20ffd4b 100644
--- a/openstackclient/identity/v2_0/ec2creds.py
+++ b/openstackclient/identity/v2_0/ec2creds.py
@@ -71,6 +71,12 @@ class CreateEC2Creds(show.ShowOne):
info = {}
info.update(creds._info)
+
+ if 'tenant_id' in info:
+ info.update(
+ {'project_id': info.pop('tenant_id')}
+ )
+
return zip(*sorted(six.iteritems(info)))
@@ -183,4 +189,10 @@ class ShowEC2Creds(show.ShowOne):
info = {}
info.update(creds._info)
+
+ if 'tenant_id' in info:
+ info.update(
+ {'project_id': info.pop('tenant_id')}
+ )
+
return zip(*sorted(six.iteritems(info)))