aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonutilities
diff options
context:
space:
mode:
authorRuan HE <ruan.he@orange.com>2018-01-03 13:26:16 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-03 13:26:16 +0000
commite6d21f0f716da780b0990a9cc37ef6f2634ee9bf (patch)
tree49100bd2f1e99249e5a6b132fc5958311741ce00 /python_moonutilities
parent68fba32ca955bc07035522c3db5f1b62dc2d357e (diff)
parent941fcf7048f9f36d68e9af23a01a924be811d0c1 (diff)
Merge "Add policy exceptions"
Diffstat (limited to 'python_moonutilities')
-rw-r--r--python_moonutilities/python_moonutilities/exceptions.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py
index f14d6abf..1abb5aa7 100644
--- a/python_moonutilities/python_moonutilities/exceptions.py
+++ b/python_moonutilities/python_moonutilities/exceptions.py
@@ -534,3 +534,18 @@ class PdpExisting(MoonError):
code = 409
title = 'Pdp Error'
logger = "Error"
+
+
+class PolicyUnknown(MoonError):
+ description = _("The policy is unknown.")
+ code = 400
+ title = 'Policy Unknown'
+ logger = "Error"
+
+
+class PolicyExisting(MoonError):
+ description = _("The policy already exists.")
+ code = 409
+ title = 'Policy Error'
+ logger = "Error"
+