diff options
Diffstat (limited to 'openstackclient/identity/v3/trust.py')
| -rw-r--r-- | openstackclient/identity/v3/trust.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/openstackclient/identity/v3/trust.py b/openstackclient/identity/v3/trust.py index 2c3cf537..26fb8338 100644 --- a/openstackclient/identity/v3/trust.py +++ b/openstackclient/identity/v3/trust.py @@ -14,22 +14,16 @@ """Identity v3 Trust action implementations""" import datetime -import logging import six -from cliff import command -from cliff import lister -from cliff import show - +from openstackclient.common import command from openstackclient.common import utils from openstackclient.identity import common -class CreateTrust(show.ShowOne): +class CreateTrust(command.ShowOne): """Create new trust""" - log = logging.getLogger(__name__ + '.CreateTrust') - def get_parser(self, prog_name): parser = super(CreateTrust, self).get_parser(prog_name) parser.add_argument( @@ -85,7 +79,6 @@ class CreateTrust(show.ShowOne): return parser def take_action(self, parsed_args): - self.log.debug('take_action(%s)' % parsed_args) identity_client = self.app.client_manager.identity # NOTE(stevemar): Find the two users, project and roles that @@ -138,8 +131,6 @@ class CreateTrust(show.ShowOne): class DeleteTrust(command.Command): """Delete trust(s)""" - log = logging.getLogger(__name__ + '.DeleteTrust') - def get_parser(self, prog_name): parser = super(DeleteTrust, self).get_parser(prog_name) parser.add_argument( @@ -151,20 +142,16 @@ class DeleteTrust(command.Command): return parser def take_action(self, parsed_args): - self.log.debug('take_action(%s)' % parsed_args) identity_client = self.app.client_manager.identity for t in parsed_args.trust: trust_obj = utils.find_resource(identity_client.trusts, t) identity_client.trusts.delete(trust_obj.id) -class ListTrust(lister.Lister): +class ListTrust(command.Lister): """List trusts""" - log = logging.getLogger(__name__ + '.ListTrust') - def take_action(self, parsed_args): - self.log.debug('take_action(%s)' % parsed_args) columns = ('ID', 'Expires At', 'Impersonation', 'Project ID', 'Trustee User ID', 'Trustor User ID') data = self.app.client_manager.identity.trusts.list() @@ -175,11 +162,9 @@ class ListTrust(lister.Lister): ) for s in data)) -class ShowTrust(show.ShowOne): +class ShowTrust(command.ShowOne): """Display trust details""" - log = logging.getLogger(__name__ + '.ShowTrust') - def get_parser(self, prog_name): parser = super(ShowTrust, self).get_parser(prog_name) parser.add_argument( @@ -190,7 +175,6 @@ class ShowTrust(show.ShowOne): return parser def take_action(self, parsed_args): - self.log.debug('take_action(%s)' % parsed_args) identity_client = self.app.client_manager.identity trust = utils.find_resource(identity_client.trusts, parsed_args.trust) |
