diff --git a/heat/engine/clients/os/cinder.py b/heat/engine/clients/os/cinder.py index a535a843aa..122639ca5d 100644 --- a/heat/engine/clients/os/cinder.py +++ b/heat/engine/clients/os/cinder.py @@ -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) diff --git a/heat/engine/clients/os/glance.py b/heat/engine/clients/os/glance.py index 759c7c1449..dac362e56f 100644 --- a/heat/engine/clients/os/glance.py +++ b/heat/engine/clients/os/glance.py @@ -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: diff --git a/heat/engine/clients/os/nova.py b/heat/engine/clients/os/nova.py index a83fa43475..716e89e553 100644 --- a/heat/engine/clients/os/nova.py +++ b/heat/engine/clients/os/nova.py @@ -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): diff --git a/heat/engine/clients/os/sahara.py b/heat/engine/clients/os/sahara.py index 3ed61cb484..a9442c518d 100644 --- a/heat/engine/clients/os/sahara.py +++ b/heat/engine/clients/os/sahara.py @@ -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)