Skip to content

Commit 62a2083

Browse files
author
Dean Troyer
committed
Fix ec2 credentials commands for new auth
These commands were not updated for the new authentication model. Closes-Bug: 1399757 Change-Id: I5d4beb9d1fa6914fef5e4c7b459cdd967e614b24
1 parent a977748 commit 62a2083

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎openstackclient/identity/v2_0/ec2creds.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ def take_action(self, parsed_args):
5757
).id
5858
else:
5959
# Get the project from the current auth
60-
project = identity_client.auth_tenant_id
60+
project = self.app.client_manager.auth_ref.project_id
6161
if parsed_args.user:
6262
user = utils.find_resource(
6363
identity_client.users,
6464
parsed_args.user,
6565
).id
6666
else:
6767
# Get the user from the current auth
68-
user = identity_client.auth_user_id
68+
user = self.app.client_manager.auth_ref.user_id
6969

7070
creds = identity_client.ec2.create(user, project)
7171

@@ -104,7 +104,7 @@ def take_action(self, parsed_args):
104104
).id
105105
else:
106106
# Get the user from the current auth
107-
user = identity_client.auth_user_id
107+
user = self.app.client_manager.auth_ref.user_id
108108

109109
identity_client.ec2.delete(user, parsed_args.access_key)
110110

@@ -134,7 +134,7 @@ def take_action(self, parsed_args):
134134
).id
135135
else:
136136
# Get the user from the current auth
137-
user = identity_client.auth_user_id
137+
user = self.app.client_manager.auth_ref.user_id
138138

139139
columns = ('access', 'secret', 'tenant_id', 'user_id')
140140
column_headers = ('Access', 'Secret', 'Project ID', 'User ID')
@@ -177,7 +177,7 @@ def take_action(self, parsed_args):
177177
).id
178178
else:
179179
# Get the user from the current auth
180-
user = identity_client.auth_user_id
180+
user = self.app.client_manager.auth_ref.user_id
181181

182182
creds = identity_client.ec2.get(user, parsed_args.access_key)
183183

0 commit comments

Comments
 (0)