diff options
author | MohamedAssem <rfawzy.ext@orange.com> | 2017-12-27 14:24:52 +0200 |
---|---|---|
committer | MohamedAssem <rfawzy.ext@orange.com> | 2017-12-27 14:24:52 +0200 |
commit | ec9fb14fd4e556745bcef9646470e3b8a63aa7da (patch) | |
tree | 9da80eb42845f2ec1fd2ca1cabc8be2284ad1a32 | |
parent | a7d5b9a4b29e3b3d18b3a63bd32b28c1008ec48e (diff) |
Add pdp exceptions in python_moonutilities exceptions
Change-Id: Ie9198d912bc651a93bfd4dafde58795be5977c3c
Signed-off-by: ReemFawzy <rfawzy.ext@orange.com>
-rw-r--r-- | python_moonutilities/python_moonutilities/exceptions.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py index 5bbab2be..dab398cf 100644 --- a/python_moonutilities/python_moonutilities/exceptions.py +++ b/python_moonutilities/python_moonutilities/exceptions.py @@ -14,7 +14,7 @@ class MoonErrorMetaClass(type): def __init__(cls, name, bases, dct): super(MoonErrorMetaClass, cls).__init__(name, bases, dct) - cls.hierarchy += "/"+str(name) + cls.hierarchy += "/" + str(name) class MoonError(HTTPException): @@ -109,6 +109,7 @@ class TenantNoIntraAuthzExtension(TenantNoIntraExtension): title = 'Tenant No Intra_Admin_Extension' logger = "ERROR" + # Exceptions for IntraExtension @@ -520,3 +521,16 @@ class ContainerMissing(DockerError): title = 'Container missing' logger = "ERROR" + +class PdpUnknown(MoonError): + description = _("The pdp is unknown.") + code = 400 + title = 'Pdp Unknown' + logger = "Error" + + +class PdpExisting(MoonError): + description = _("The pdp already exists.") + code = 409 + title = 'Pdp Error' + logger = "Error" |