Remove unnecessary debug/info logs of normal API ops
There are some debug/info log messages about normal API operations in each API method, but Nova WSGI framework has already output the similar messages. So these messages are meaningless, and this patch removes them. Change-Id: Ifea3edd912ec80eed2869c3f97345d403ea96c89
This commit is contained in:
parent
96b39341d5
commit
cedabf7793
|
@ -18,9 +18,7 @@ from nova.api.openstack import wsgi
|
|||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova import network
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'networks_associate')
|
||||
|
||||
|
||||
|
@ -34,7 +32,7 @@ class NetworkAssociateActionController(wsgi.Controller):
|
|||
def _disassociate_host_only(self, req, id, body):
|
||||
context = req.environ['nova.context']
|
||||
authorize(context)
|
||||
LOG.debug("Disassociating host with network with id %s", id)
|
||||
|
||||
try:
|
||||
self.network_api.associate(context, id, host=None)
|
||||
except exception.NetworkNotFound:
|
||||
|
@ -50,7 +48,7 @@ class NetworkAssociateActionController(wsgi.Controller):
|
|||
def _disassociate_project_only(self, req, id, body):
|
||||
context = req.environ['nova.context']
|
||||
authorize(context)
|
||||
LOG.debug("Disassociating project with network with id %s", id)
|
||||
|
||||
try:
|
||||
self.network_api.associate(context, id, project=None)
|
||||
except exception.NetworkNotFound:
|
||||
|
|
|
@ -22,13 +22,10 @@ from nova.api.openstack import extensions
|
|||
from nova.api.openstack import wsgi
|
||||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova.i18n import _LI
|
||||
from nova import network
|
||||
from nova.objects import base as base_obj
|
||||
from nova.objects import fields as obj_fields
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute', 'networks')
|
||||
authorize_view = extensions.extension_authorizer('compute',
|
||||
'networks:view')
|
||||
|
@ -98,7 +95,6 @@ class NetworkController(wsgi.Controller):
|
|||
def _disassociate_host_and_project(self, req, id, body):
|
||||
context = req.environ['nova.context']
|
||||
authorize(context)
|
||||
LOG.debug("Disassociating network with id %s", id)
|
||||
|
||||
try:
|
||||
self.network_api.associate(context, id, host=None, project=None)
|
||||
|
@ -114,7 +110,7 @@ class NetworkController(wsgi.Controller):
|
|||
def show(self, req, id):
|
||||
context = req.environ['nova.context']
|
||||
authorize_view(context)
|
||||
LOG.debug("Showing network with id %s", id)
|
||||
|
||||
try:
|
||||
network = self.network_api.get(context, id)
|
||||
except exception.NetworkNotFound:
|
||||
|
@ -125,7 +121,6 @@ class NetworkController(wsgi.Controller):
|
|||
def delete(self, req, id):
|
||||
context = req.environ['nova.context']
|
||||
authorize(context)
|
||||
LOG.info(_LI("Deleting network with id %s"), id)
|
||||
try:
|
||||
self.network_api.delete(context, id)
|
||||
except exception.NetworkInUse as e:
|
||||
|
@ -156,8 +151,6 @@ class NetworkController(wsgi.Controller):
|
|||
if params.get("project_id") == "":
|
||||
params["project_id"] = None
|
||||
|
||||
LOG.debug("Creating network with label %s", params["label"])
|
||||
|
||||
try:
|
||||
params["num_networks"] = 1
|
||||
try:
|
||||
|
@ -187,10 +180,7 @@ class NetworkController(wsgi.Controller):
|
|||
|
||||
network_id = body.get('id', None)
|
||||
project_id = context.project_id
|
||||
LOG.debug("Associating network %(network)s"
|
||||
" with project %(project)s",
|
||||
{"network": network_id or "",
|
||||
"project": project_id})
|
||||
|
||||
try:
|
||||
self.network_api.add_network_to_project(
|
||||
context, project_id, network_id)
|
||||
|
|
|
@ -26,7 +26,6 @@ from nova import context as nova_context
|
|||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova.i18n import _LE
|
||||
from nova.i18n import _LI
|
||||
import nova.network
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import quota
|
||||
|
@ -107,7 +106,7 @@ class NetworkController(object):
|
|||
def show(self, req, id):
|
||||
context = req.environ['nova.context']
|
||||
authorize(context)
|
||||
LOG.debug("Showing network with id %s", id)
|
||||
|
||||
try:
|
||||
network = self.network_api.get(context, id)
|
||||
except exception.NetworkNotFound:
|
||||
|
@ -127,8 +126,6 @@ class NetworkController(object):
|
|||
LOG.exception(_LE("Failed to update usages deallocating "
|
||||
"network."))
|
||||
|
||||
LOG.info(_LI("Deleting network with id %s"), id)
|
||||
|
||||
def _rollback_quota(reservation):
|
||||
if CONF.enable_network_quota and reservation:
|
||||
QUOTAS.rollback(context, reservation)
|
||||
|
|
|
@ -24,7 +24,6 @@ import nova.context
|
|||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova import objects
|
||||
from nova.openstack.common import log as logging
|
||||
from nova import quota
|
||||
from nova import utils
|
||||
|
||||
|
@ -36,9 +35,6 @@ NON_QUOTA_KEYS = ['tenant_id', 'id', 'force']
|
|||
EXTENDED_QUOTAS = {'server_groups': 'os-server-group-quotas',
|
||||
'server_group_members': 'os-server-group-quotas'}
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
authorize_update = extensions.extension_authorizer('compute', 'quotas:update')
|
||||
authorize_show = extensions.extension_authorizer('compute', 'quotas:show')
|
||||
authorize_delete = extensions.extension_authorizer('compute', 'quotas:delete')
|
||||
|
@ -180,8 +176,6 @@ class QuotaSetsController(wsgi.Controller):
|
|||
raise webob.exc.HTTPBadRequest(
|
||||
explanation=e.format_message())
|
||||
|
||||
LOG.debug("force update quotas: %s", force_update)
|
||||
|
||||
if bad_keys:
|
||||
msg = _("Bad key(s) %s in quota_set") % ",".join(bad_keys)
|
||||
raise webob.exc.HTTPBadRequest(explanation=msg)
|
||||
|
|
|
@ -23,10 +23,8 @@ from nova.api.openstack import xmlutil
|
|||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova.network.security_group import openstack_driver
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
authorize = extensions.extension_authorizer('compute',
|
||||
'security_group_default_rules')
|
||||
|
||||
|
@ -149,7 +147,6 @@ class SecurityGroupDefaultRulesController(sg.SecurityGroupControllerBase):
|
|||
|
||||
id = self.security_group_api.validate_id(id)
|
||||
|
||||
LOG.debug("Showing security_group_default_rule with id %s", id)
|
||||
try:
|
||||
rule = self.security_group_api.get_default_rule(context, id)
|
||||
except exception.SecurityGroupDefaultRuleNotFound:
|
||||
|
|
|
@ -20,10 +20,6 @@ from nova import compute
|
|||
from nova import exception
|
||||
from nova.i18n import _
|
||||
from nova import objects
|
||||
from nova.openstack.common import log as logging
|
||||
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class ServerStartStopActionController(wsgi.Controller):
|
||||
|
@ -46,7 +42,7 @@ class ServerStartStopActionController(wsgi.Controller):
|
|||
context = req.environ['nova.context']
|
||||
instance = self._get_instance(context, id)
|
||||
extensions.check_compute_policy(context, 'start', instance)
|
||||
LOG.debug('start instance', instance=instance)
|
||||
|
||||
try:
|
||||
self.compute_api.start(context, instance)
|
||||
except (exception.InstanceNotReady, exception.InstanceIsLocked,
|
||||
|
@ -60,7 +56,7 @@ class ServerStartStopActionController(wsgi.Controller):
|
|||
context = req.environ['nova.context']
|
||||
instance = self._get_instance(context, id)
|
||||
extensions.check_compute_policy(context, 'stop', instance)
|
||||
LOG.debug('stop instance', instance=instance)
|
||||
|
||||
try:
|
||||
self.compute_api.stop(context, instance)
|
||||
except (exception.InstanceNotReady, exception.InstanceIsLocked,
|
||||
|
|
Loading…
Reference in New Issue