X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_ro%2Fwim%2Ferrors.py;h=ca8c2b737453a13188067ab49105b0a38bc4c5c3;hb=1d55a23c9cd32f17bb7a6f21e5b6c2b476c5804f;hp=16c53b55a7ac225e11c705c9f6bb9384ba52f8d6;hpb=c5293def02d95ed4ee086dd8842437b76ec05c4e;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)