From 1e3c19b82374585ed7261bcb1abd6ddd38b5d9f8 Mon Sep 17 00:00:00 2001 From: ReemMahmoud Date: Wed, 10 Jan 2018 16:04:00 +0200 Subject: Refactor moon_authz Change-Id: I27dd56f22fa457727568d3fe76ed5fa862ba97ae Signed-off-by: ReemMahmoud --- python_moonutilities/python_moonutilities/exceptions.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'python_moonutilities') diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py index 2d689287..6db7bf01 100644 --- a/python_moonutilities/python_moonutilities/exceptions.py +++ b/python_moonutilities/python_moonutilities/exceptions.py @@ -443,6 +443,13 @@ class MetaRuleExisting(AdminMetaRule): logger = "ERROR" +class MetaRuleContentError(AdminMetaRule): + description = _("Invalid content of pdp.") + code = 400 + title = 'Meta Rule Error' + logger = "ERROR" + + class RuleExisting(AdminRule): description = _("The rule already exists.") code = 400 @@ -542,6 +549,13 @@ class PdpExisting(MoonError): logger = "Error" +class PdpContentError(MoonError): + description = _("Invalid content of pdp.") + code = 409 + title = 'Pdp Error' + logger = "Error" + + class PdpKeystoneMappingConflict(MoonError): description = _("A pdp is already mapped to that Keystone project.") code = 409 @@ -561,4 +575,3 @@ class PolicyExisting(MoonError): code = 409 title = 'Policy Error' logger = "Error" - -- cgit 1.2.3-korg