summaryrefslogtreecommitdiff
path: root/openstackclient/identity/v3/group.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-09-01 16:43:07 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2015-09-01 16:49:54 -0700
commite3c46ece4a496584a54b9d39b55921990db4a7b3 (patch)
treeaadf0d2f80f18d77ebc003be3168d36dcb01a275 /openstackclient/identity/v3/group.py
parentf14251669f96d6010581702417828f4380144aa2 (diff)
downloadpython-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/group.py')
-rw-r--r--openstackclient/identity/v3/group.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/openstackclient/identity/v3/group.py b/openstackclient/identity/v3/group.py
index d659f71e..82975065 100644
--- a/openstackclient/identity/v3/group.py
+++ b/openstackclient/identity/v3/group.py
@@ -50,8 +50,8 @@ class AddUserToGroup(command.Command):
common.add_user_domain_option_to_parser(parser)
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
user_id = common.find_user(identity_client,
@@ -92,8 +92,8 @@ class CheckUserInGroup(command.Command):
common.add_user_domain_option_to_parser(parser)
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
user_id = common.find_user(identity_client,
@@ -142,8 +142,8 @@ class CreateGroup(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
domain = None
@@ -188,8 +188,8 @@ class DeleteGroup(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
for group in parsed_args.groups:
@@ -226,8 +226,8 @@ class ListGroup(lister.Lister):
)
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
domain = None
@@ -284,8 +284,8 @@ class RemoveUserFromGroup(command.Command):
common.add_user_domain_option_to_parser(parser)
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
user_id = common.find_user(identity_client,
@@ -331,8 +331,8 @@ class SetGroup(command.Command):
help='New group description')
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
group = common.find_group(identity_client, parsed_args.group,
parsed_args.domain)
@@ -368,8 +368,8 @@ class ShowGroup(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
group = common.find_group(identity_client,