Use EntityNotFound as super class for exceptions.

For exception which showing not found message, we change the super class to
EntityNotFound in order to categorize exception
Change-Id: I0e5bc9ed1254a596240044a23cb7ab59f36de7cb
Closes-Bug: #1515603
This commit is contained in:
ricolin 2015-11-23 23:38:52 +08:00
parent 1cb612b253
commit 0af8a5dbaf

View File

@ -191,12 +191,12 @@ class InvalidSchemaError(HeatException):
msg_fmt = _("%(message)s")
class ResourceNotFound(HeatException):
class ResourceNotFound(EntityNotFound):
msg_fmt = _("The Resource (%(resource_name)s) could not be found "
"in Stack %(stack_name)s.")
class SnapshotNotFound(HeatException):
class SnapshotNotFound(EntityNotFound):
msg_fmt = _("The Snapshot (%(snapshot)s) for Stack (%(stack)s) "
"could not be found.")
@ -214,8 +214,8 @@ class ResourceNotAvailable(HeatException):
msg_fmt = _("The Resource (%(resource_name)s) is not available.")
class WatchRuleNotFound(HeatException):
'''Keep this for AWS compatiblility.'''
class WatchRuleNotFound(EntityNotFound):
"""Keep this for AWS compatiblility."""
msg_fmt = _("The Watch Rule (%(watch_name)s) could not be found.")