Remove the unnecessary log message
This change removed the unnecessary log messages. Those messages are duplicated with messages in exception functions. Co-Authored-By: Rico Lin <rico.l@inwinstack.com> Change-Id: I00bd9190464c7d7630fb5f4225623a42a4d6acc3 Closes-Bug: #1516196
This commit is contained in:
parent
64d58eca04
commit
b0f758ef2e
|
@ -92,26 +92,20 @@ class CinderClientPlugin(client_plugin.ClientPlugin):
|
|||
def get_volume(self, volume):
|
||||
try:
|
||||
return self.client().volumes.get(volume)
|
||||
except exceptions.NotFound as ex:
|
||||
LOG.info(_LI('Volume (%(volume)s) not found: %(ex)s'),
|
||||
{'volume': volume, 'ex': ex})
|
||||
except exceptions.NotFound:
|
||||
raise exception.EntityNotFound(entity='Volume', name=volume)
|
||||
|
||||
def get_volume_snapshot(self, snapshot):
|
||||
try:
|
||||
return self.client().volume_snapshots.get(snapshot)
|
||||
except exceptions.NotFound as ex:
|
||||
LOG.info(_LI('VolumeSnapshot (%(snapshot)s) not found: %(ex)s'),
|
||||
{'snapshot': snapshot, 'ex': ex})
|
||||
except exceptions.NotFound:
|
||||
raise exception.EntityNotFound(entity='VolumeSnapshot',
|
||||
name=snapshot)
|
||||
|
||||
def get_volume_backup(self, backup):
|
||||
try:
|
||||
return self.client().backups.get(backup)
|
||||
except exceptions.NotFound as ex:
|
||||
LOG.info(_LI('Volume backup (%(backup)s) not found: %(ex)s'),
|
||||
{'backup': backup, 'ex': ex})
|
||||
except exceptions.NotFound:
|
||||
raise exception.EntityNotFound(entity='Volume backup',
|
||||
name=backup)
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ from oslo_utils import uuidutils
|
|||
|
||||
from heat.common import exception
|
||||
from heat.common.i18n import _
|
||||
from heat.common.i18n import _LI
|
||||
from heat.engine.clients import client_plugin
|
||||
from heat.engine import constraints
|
||||
|
||||
|
@ -93,13 +92,9 @@ class GlanceClientPlugin(client_plugin.ClientPlugin):
|
|||
_("Error retrieving image list from glance: %s") % ex)
|
||||
num_matches = len(image_list)
|
||||
if num_matches == 0:
|
||||
LOG.info(_LI("Image %s was not found in glance"),
|
||||
image_identifier)
|
||||
raise exception.EntityNotFound(entity='Image',
|
||||
name=image_identifier)
|
||||
elif num_matches > 1:
|
||||
LOG.info(_LI("Multiple images %s were found in glance with name"),
|
||||
image_identifier)
|
||||
raise exception.PhysicalResourceNameAmbiguity(
|
||||
name=image_identifier)
|
||||
else:
|
||||
|
|
|
@ -111,9 +111,7 @@ class NovaClientPlugin(client_plugin.ClientPlugin):
|
|||
"""
|
||||
try:
|
||||
return self.client().servers.get(server)
|
||||
except exceptions.NotFound as ex:
|
||||
LOG.warn(_LW('Server (%(server)s) not found: %(ex)s'),
|
||||
{'server': server, 'ex': ex})
|
||||
except exceptions.NotFound:
|
||||
raise exception.EntityNotFound(entity='Server', name=server)
|
||||
|
||||
def fetch_server(self, server_id):
|
||||
|
|
|
@ -22,7 +22,6 @@ import six
|
|||
|
||||
from heat.common import exception
|
||||
from heat.common.i18n import _
|
||||
from heat.common.i18n import _LI
|
||||
from heat.engine.clients import client_plugin
|
||||
from heat.engine import constraints
|
||||
|
||||
|
@ -115,13 +114,9 @@ class SaharaClientPlugin(client_plugin.ClientPlugin):
|
|||
"%s") % six.text_type(ex))
|
||||
num_matches = len(image_list)
|
||||
if num_matches == 0:
|
||||
LOG.info(_LI("Image %s was not found in sahara images"),
|
||||
image_identifier)
|
||||
raise exception.EntityNotFound(entity='Image',
|
||||
name=image_identifier)
|
||||
elif num_matches > 1:
|
||||
LOG.info(_LI("Multiple images %s were found in sahara with name"),
|
||||
image_identifier)
|
||||
raise exception.PhysicalResourceNameAmbiguity(
|
||||
name=image_identifier)
|
||||
else:
|
||||
|
@ -137,7 +132,6 @@ class SaharaClientPlugin(client_plugin.ClientPlugin):
|
|||
try:
|
||||
self.client().plugins.get(plugin_name)
|
||||
except sahara_base.APIException:
|
||||
LOG.info(_LI("Plugin %s was not found in sahara"), plugin_name)
|
||||
raise exception.EntityNotFound(entity='Plugin',
|
||||
name=plugin_name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue