From e3c46ece4a496584a54b9d39b55921990db4a7b3 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Tue, 1 Sep 2015 16:43:07 -0700 Subject: 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 --- openstackclient/volume/v2/volume.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'openstackclient/volume/v2/volume.py') diff --git a/openstackclient/volume/v2/volume.py b/openstackclient/volume/v2/volume.py index fe4a3ff6..151d3b7d 100644 --- a/openstackclient/volume/v2/volume.py +++ b/openstackclient/volume/v2/volume.py @@ -223,8 +223,8 @@ class ListVolume(lister.Lister): ) 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 compute_client = self.app.client_manager.compute @@ -335,8 +335,8 @@ class SetVolume(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 volume = utils.find_resource(volume_client.volumes, parsed_args.volume) @@ -383,8 +383,8 @@ class ShowVolume(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 volume = utils.find_resource(volume_client.volumes, parsed_args.volume) @@ -416,8 +416,8 @@ class UnsetVolume(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 volume = utils.find_resource( volume_client.volumes, parsed_args.volume) -- cgit v1.2.1