X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fwim%2Ferrors.py;h=ca8c2b737453a13188067ab49105b0a38bc4c5c3;hb=250e329c4c12a0e9407bc0f75c7d64a30b2e5632;hp=16c53b55a7ac225e11c705c9f6bb9384ba52f8d6;hpb=f2813e8e41b842c0f7ad2a2fc95a1195e18cded8;p=osm%2FRO.git diff --git a/osm_ro/wim/errors.py b/osm_ro/wim/errors.py index 16c53b55..ca8c2b73 100644 --- a/osm_ro/wim/errors.py +++ b/osm_ro/wim/errors.py @@ -178,3 +178,12 @@ class WimAccountNotActive(HttpMappedError, KeyError): message += ('\nThe thread responsible for processing the actions have ' 'suddenly stopped, or have never being spawned') super(WimAccountNotActive, self).__init__(message, http_code) + + +class NoExternalPortFound(HttpMappedError): + """No external port associated to the instance_net""" + + def __init__(self, instance_net): + super(NoExternalPortFound, self).__init__( + '{} uuid({})'.format(self.__class__.__doc__, instance_net['uuid']), + http_code=Not_Found)