diff options
| author | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-09-01 16:43:07 -0700 |
|---|---|---|
| committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-09-01 16:49:54 -0700 |
| commit | e3c46ece4a496584a54b9d39b55921990db4a7b3 (patch) | |
| tree | aadf0d2f80f18d77ebc003be3168d36dcb01a275 /openstackclient/identity/v3/consumer.py | |
| parent | f14251669f96d6010581702417828f4380144aa2 (diff) | |
| download | python-openstackclient-e3c46ece4a496584a54b9d39b55921990db4a7b3.tar.gz | |
Use a common decorator to log 'take_action' activation
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.
Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
Diffstat (limited to 'openstackclient/identity/v3/consumer.py')
| -rw-r--r-- | openstackclient/identity/v3/consumer.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openstackclient/identity/v3/consumer.py b/openstackclient/identity/v3/consumer.py index ffbd5104..0a6ade67 100644 --- a/openstackclient/identity/v3/consumer.py +++ b/openstackclient/identity/v3/consumer.py @@ -40,8 +40,8 @@ class CreateConsumer(show.ShowOne): ) return parser + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity consumer = identity_client.oauth1.consumers.create( parsed_args.description @@ -64,8 +64,8 @@ class DeleteConsumer(command.Command): ) return parser + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity consumer = utils.find_resource( identity_client.oauth1.consumers, parsed_args.consumer) @@ -78,8 +78,8 @@ class ListConsumer(lister.Lister): log = logging.getLogger(__name__ + '.ListConsumer') + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) columns = ('ID', 'Description') data = self.app.client_manager.identity.oauth1.consumers.list() return (columns, @@ -108,8 +108,8 @@ class SetConsumer(command.Command): ) return parser + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity consumer = utils.find_resource( identity_client.oauth1.consumers, parsed_args.consumer) @@ -140,8 +140,8 @@ class ShowConsumer(show.ShowOne): ) return parser + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) identity_client = self.app.client_manager.identity consumer = utils.find_resource( identity_client.oauth1.consumers, parsed_args.consumer) |
