summaryrefslogtreecommitdiff
path: root/openstackclient/common/quota.py
diff options
context:
space:
mode:
authorAkihiro Motoki <motoki@da.jp.nec.com>2016-01-10 21:54:53 +0900
committerAkihiro Motoki <motoki@da.jp.nec.com>2016-02-02 09:58:32 +0900
commit258c1102cc6b93a860bcd7cc083d4e14ae0025ce (patch)
tree6b963e16d6bd946c066a7163f6f36e7becba9b3b /openstackclient/common/quota.py
parente9ff42eee73de147339c42bca90f777a8f40f5c1 (diff)
downloadpython-openstackclient-258c1102cc6b93a860bcd7cc083d4e14ae0025ce.tar.gz
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
Diffstat (limited to 'openstackclient/common/quota.py')
-rw-r--r--openstackclient/common/quota.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py
index 8a9b910f..480abbd9 100644
--- a/openstackclient/common/quota.py
+++ b/openstackclient/common/quota.py
@@ -16,13 +16,10 @@
"""Quota action implementations"""
import itertools
-import logging
import six
import sys
-from cliff import command
-from cliff import show
-
+from openstackclient.common import command
from openstackclient.common import utils
@@ -60,8 +57,6 @@ NETWORK_QUOTAS = {
class SetQuota(command.Command):
"""Set quotas for project or class"""
- log = logging.getLogger(__name__ + '.SetQuota')
-
def get_parser(self, prog_name):
parser = super(SetQuota, self).get_parser(prog_name)
parser.add_argument(
@@ -92,7 +87,6 @@ class SetQuota(command.Command):
)
return parser
- @utils.log_method(log)
def take_action(self, parsed_args):
identity_client = self.app.client_manager.identity
@@ -143,11 +137,9 @@ class SetQuota(command.Command):
**volume_kwargs)
-class ShowQuota(show.ShowOne):
+class ShowQuota(command.ShowOne):
"""Show quotas for project or class"""
- log = logging.getLogger(__name__ + '.ShowQuota')
-
def get_parser(self, prog_name):
parser = super(ShowQuota, self).get_parser(prog_name)
parser.add_argument(
@@ -203,7 +195,6 @@ class ShowQuota(show.ShowOne):
else:
return {}
- @utils.log_method(log)
def take_action(self, parsed_args):
compute_client = self.app.client_manager.compute