diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-06-26 18:20:35 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-06-27 09:14:58 -0500 |
| commit | 1fca946890be22f51463975c1bf6449b8680c23a (patch) | |
| tree | afa95b303f5be8aa761f96f2bf2e39b5480c6ad4 /openstackclient/identity/v2_0 | |
| parent | 8f59524c3e1ff3f34474d0cfcd217bc9fe0cbfc1 (diff) | |
| download | python-openstackclient-1fca946890be22f51463975c1bf6449b8680c23a.tar.gz | |
Rename token classes to match command
The token create/delete commands were renamed but not the class names.
Rename them to match.
Change-Id: Icbf9c0a954ed0332fa4c99e4ee2612bb11f89e3a
Diffstat (limited to 'openstackclient/identity/v2_0')
| -rw-r--r-- | openstackclient/identity/v2_0/token.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/openstackclient/identity/v2_0/token.py b/openstackclient/identity/v2_0/token.py index fe1557a5..01e1b3b2 100644 --- a/openstackclient/identity/v2_0/token.py +++ b/openstackclient/identity/v2_0/token.py @@ -22,30 +22,31 @@ from cliff import command from cliff import show -class CreateToken(show.ShowOne): - """Issue token command""" +class IssueToken(show.ShowOne): + """Issue new token""" - log = logging.getLogger(__name__ + '.CreateToken') + log = logging.getLogger(__name__ + '.IssueToken') def get_parser(self, prog_name): - parser = super(CreateToken, self).get_parser(prog_name) + parser = super(IssueToken, self).get_parser(prog_name) return parser def take_action(self, parsed_args): self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity + token = identity_client.service_catalog.get_token() token['project_id'] = token.pop('tenant_id') return zip(*sorted(six.iteritems(token))) -class DeleteToken(command.Command): +class RevokeToken(command.Command): """Revoke token command""" - log = logging.getLogger(__name__ + '.DeleteToken') + log = logging.getLogger(__name__ + '.RevokeToken') def get_parser(self, prog_name): - parser = super(DeleteToken, self).get_parser(prog_name) + parser = super(RevokeToken, self).get_parser(prog_name) parser.add_argument( 'token', metavar='<token>', @@ -56,5 +57,6 @@ class DeleteToken(command.Command): def take_action(self, parsed_args): self.log.debug('take_action(%s)' % parsed_args) identity_client = self.app.client_manager.identity + identity_client.tokens.delete(parsed_args.token) return |
