Use EntityNotFound instead of NovaNetworkNotFound.

replace and remove NovaNetworkNotFound

Change-Id: Iaf8fa96ebd68c305ac2ec7565ff54d7b43c45a09
Partial-Bug: #1515603
This commit is contained in:
ricolin
2015-11-12 20:43:06 +08:00
parent 868b4616e9
commit 65d890174c
6 changed files with 7 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ from heat.engine import constraints
class NetworkConstraint(constraints.BaseCustomConstraint):
expected_exceptions = (exceptions.NeutronClientException,
exception.NovaNetworkNotFound,
exception.EntityNotFound,
exception.PhysicalResourceNameAmbiguity)
def validate_with_client(self, client, value):

View File

@@ -573,7 +573,7 @@ echo -e '%s\tALL=(ALL)\tNOPASSWD: ALL' >> /etc/sudoers
except exceptions.NotFound as ex:
LOG.debug('Nova network (%(net)s) not found: %(ex)s',
{'net': label, 'ex': ex})
raise exception.NovaNetworkNotFound(network=label)
raise exception.EntityNotFound(entity='Nova network', name=label)
except exceptions.NoUniqueMatch as exc:
LOG.debug('Nova network (%(net)s) is not unique matched: %(exc)s',
{'net': label, 'exc': exc})
@@ -692,7 +692,7 @@ class FlavorConstraint(constraints.BaseCustomConstraint):
class NetworkConstraint(constraints.BaseCustomConstraint):
expected_exceptions = (exception.NovaNetworkNotFound,
expected_exceptions = (exception.EntityNotFound,
exception.PhysicalResourceNameAmbiguity)
def validate_with_client(self, client, network):