summaryrefslogtreecommitdiff
path: root/openstackclient/volume/v2/qos_specs.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/volume/v2/qos_specs.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/volume/v2/qos_specs.py')
-rw-r--r--openstackclient/volume/v2/qos_specs.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/openstackclient/volume/v2/qos_specs.py b/openstackclient/volume/v2/qos_specs.py
index ac78ca15..b3a34cac 100644
--- a/openstackclient/volume/v2/qos_specs.py
+++ b/openstackclient/volume/v2/qos_specs.py
@@ -45,8 +45,8 @@ class AssociateQos(command.Command):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_spec = utils.find_resource(volume_client.qos_specs,
parsed_args.qos_spec)
@@ -88,8 +88,8 @@ class CreateQos(show.ShowOne):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
specs = {}
specs.update({'consumer': parsed_args.consumer})
@@ -117,8 +117,8 @@ class DeleteQos(command.Command):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
for qos in parsed_args.qos_specs:
qos_spec = utils.find_resource(volume_client.qos_specs, qos)
@@ -153,8 +153,8 @@ class DisassociateQos(command.Command):
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_spec = utils.find_resource(volume_client.qos_specs,
parsed_args.qos_spec)
@@ -174,8 +174,8 @@ class ListQos(lister.Lister):
log = logging.getLogger(__name__ + '.ListQos')
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_specs_list = volume_client.qos_specs.list()
@@ -218,8 +218,8 @@ class SetQos(command.Command):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_spec = utils.find_resource(volume_client.qos_specs,
parsed_args.qos_spec)
@@ -247,8 +247,8 @@ class ShowQos(show.ShowOne):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_spec = utils.find_resource(volume_client.qos_specs,
parsed_args.qos_spec)
@@ -287,8 +287,8 @@ class UnsetQos(command.Command):
)
return parser
+ @utils.log_method(log)
def take_action(self, parsed_args):
- self.log.debug('take_action(%s)', parsed_args)
volume_client = self.app.client_manager.volume
qos_spec = utils.find_resource(volume_client.qos_specs,
parsed_args.qos_spec)