diff options
| author | Akihiro Motoki <motoki@da.jp.nec.com> | 2016-01-10 21:54:53 +0900 |
|---|---|---|
| committer | Akihiro Motoki <motoki@da.jp.nec.com> | 2016-02-02 09:58:32 +0900 |
| commit | 258c1102cc6b93a860bcd7cc083d4e14ae0025ce (patch) | |
| tree | 6b963e16d6bd946c066a7163f6f36e7becba9b3b /openstackclient/compute/v2/console.py | |
| parent | e9ff42eee73de147339c42bca90f777a8f40f5c1 (diff) | |
| download | python-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/compute/v2/console.py')
| -rw-r--r-- | openstackclient/compute/v2/console.py | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/openstackclient/compute/v2/console.py b/openstackclient/compute/v2/console.py index f0864786..6c0ec31a 100644 --- a/openstackclient/compute/v2/console.py +++ b/openstackclient/compute/v2/console.py @@ -15,13 +15,10 @@ """Compute v2 Console action implementations""" -import logging import six import sys -from cliff import command -from cliff import show - +from openstackclient.common import command from openstackclient.common import parseractions from openstackclient.common import utils @@ -29,8 +26,6 @@ from openstackclient.common import utils class ShowConsoleLog(command.Command): """Show server's console output""" - log = logging.getLogger(__name__ + '.ShowConsoleLog') - def get_parser(self, prog_name): parser = super(ShowConsoleLog, self).get_parser(prog_name) parser.add_argument( @@ -49,7 +44,6 @@ class ShowConsoleLog(command.Command): ) return parser - @utils.log_method(log) def take_action(self, parsed_args): compute_client = self.app.client_manager.compute @@ -67,11 +61,9 @@ class ShowConsoleLog(command.Command): sys.stdout.write(data) -class ShowConsoleURL(show.ShowOne): +class ShowConsoleURL(command.ShowOne): """Show server's remote console URL""" - log = logging.getLogger(__name__ + '.ShowConsoleURL') - def get_parser(self, prog_name): parser = super(ShowConsoleURL, self).get_parser(prog_name) parser.add_argument( @@ -104,7 +96,6 @@ class ShowConsoleURL(show.ShowOne): ) return parser - @utils.log_method(log) def take_action(self, parsed_args): compute_client = self.app.client_manager.compute server = utils.find_resource( |
