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/common/quota.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openstackclient/common/quota.py') diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py index e79fd7ed..65367e03 100644 --- a/openstackclient/common/quota.py +++ b/openstackclient/common/quota.py @@ -23,6 +23,8 @@ import sys from cliff import command from cliff import show +from openstackclient.common import utils + # List the quota items, map the internal argument name to the option # name that the user sees. @@ -89,8 +91,8 @@ class SetQuota(command.Command): ) return parser + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) compute_client = self.app.client_manager.compute volume_client = self.app.client_manager.volume @@ -188,8 +190,8 @@ class ShowQuota(show.ShowOne): else: return {} + @utils.log_method(log) def take_action(self, parsed_args): - self.log.debug('take_action(%s)', parsed_args) compute_client = self.app.client_manager.compute volume_client = self.app.client_manager.volume -- cgit v1.2.1