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
This commit is contained in:
openstackclient
common
compute
v2
identity
v2_0
v3
image
network
object
volume
@ -15,18 +15,13 @@
|
||||
|
||||
"""Fixed IP action implementations"""
|
||||
|
||||
import logging
|
||||
|
||||
from cliff import command
|
||||
|
||||
from openstackclient.common import command
|
||||
from openstackclient.common import utils
|
||||
|
||||
|
||||
class AddFixedIP(command.Command):
|
||||
"""Add fixed IP address to server"""
|
||||
|
||||
log = logging.getLogger(__name__ + ".AddFixedIP")
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(AddFixedIP, self).get_parser(prog_name)
|
||||
parser.add_argument(
|
||||
@ -42,7 +37,6 @@ class AddFixedIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
network = utils.find_resource(
|
||||
@ -57,8 +51,6 @@ class AddFixedIP(command.Command):
|
||||
class RemoveFixedIP(command.Command):
|
||||
"""Remove fixed IP address from server"""
|
||||
|
||||
log = logging.getLogger(__name__ + ".RemoveFixedIP")
|
||||
|
||||
def get_parser(self, prog_name):
|
||||
parser = super(RemoveFixedIP, self).get_parser(prog_name)
|
||||
parser.add_argument(
|
||||
@ -74,7 +66,6 @@ class RemoveFixedIP(command.Command):
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
self.log.debug("take_action(%s)", parsed_args)
|
||||
compute_client = self.app.client_manager.compute
|
||||
|
||||
server = utils.find_resource(
|
||||
|
Reference in New Issue
Block a user