From 258c1102cc6b93a860bcd7cc083d4e14ae0025ce Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Sun, 10 Jan 2016 21:54:53 +0900 Subject: log take_action parameters in a single place Previously each command logs take_action parameters explicitly by using @utils.log_method decorator or log.debug(). Some commands have no logging. This commit calls a logger in the base class and drops all logging definition from individual commands. Closes-Bug: #1532294 Change-Id: I43cd0290a4353c68c075bade9571c940733da1be --- openstackclient/compute/v2/hypervisor_stats.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'openstackclient/compute/v2/hypervisor_stats.py') diff --git a/openstackclient/compute/v2/hypervisor_stats.py b/openstackclient/compute/v2/hypervisor_stats.py index 43ba9fc8..290f5418 100644 --- a/openstackclient/compute/v2/hypervisor_stats.py +++ b/openstackclient/compute/v2/hypervisor_stats.py @@ -14,19 +14,15 @@ """Hypervisor Stats action implementations""" -import logging import six -from cliff import show +from openstackclient.common import command -class ShowHypervisorStats(show.ShowOne): +class ShowHypervisorStats(command.ShowOne): """Display hypervisor stats details""" - log = logging.getLogger(__name__ + ".ShowHypervisorStats") - def take_action(self, parsed_args): - self.log.debug("take_action(%s)", parsed_args) compute_client = self.app.client_manager.compute hypervisor_stats = compute_client.hypervisors.statistics().to_dict() -- cgit v1.2.1