aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonutilities
diff options
context:
space:
mode:
authorThomas Duval <thomas.duval@orange.com>2018-01-05 16:28:07 +0100
committerThomas Duval <thomas.duval@orange.com>2018-01-08 09:32:19 +0100
commit48857b80be18bb0985aab643f5c8c899194d636b (patch)
tree649feb37d8c2c0dd672aad4ce4a38365cd79f4dd /python_moonutilities
parent646e77e86cd220f4be02110b16ce802d85c35b27 (diff)
prevent the mapping N*PDP <=> 1*Keystone_project
Change-Id: Ia43d7fb2a2c8054e9cf492395f2e3ef396d184cf
Diffstat (limited to 'python_moonutilities')
-rw-r--r--python_moonutilities/Changelog4
-rw-r--r--python_moonutilities/python_moonutilities/__init__.py2
-rw-r--r--python_moonutilities/python_moonutilities/exceptions.py8
3 files changed, 13 insertions, 1 deletions
diff --git a/python_moonutilities/Changelog b/python_moonutilities/Changelog
index 91f09cbf..2c4c02a8 100644
--- a/python_moonutilities/Changelog
+++ b/python_moonutilities/Changelog
@@ -74,3 +74,7 @@ CHANGES
1.4.4
-----
- Code cleaning
+
+1.4.5
+-----
+- Add PdpKeystoneMappingConflict exception
diff --git a/python_moonutilities/python_moonutilities/__init__.py b/python_moonutilities/python_moonutilities/__init__.py
index 6d1ac746..bcd7e545 100644
--- a/python_moonutilities/python_moonutilities/__init__.py
+++ b/python_moonutilities/python_moonutilities/__init__.py
@@ -3,6 +3,6 @@
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-__version__ = "1.4.4"
+__version__ = "1.4.5"
diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py
index 5b9ff340..2d689287 100644
--- a/python_moonutilities/python_moonutilities/exceptions.py
+++ b/python_moonutilities/python_moonutilities/exceptions.py
@@ -504,6 +504,7 @@ class ConsulComponentNotFound(ConsulError):
title = 'Consul error'
logger = "WARNING"
+
class ConsulComponentContentError(ConsulError):
description = _("invalid content of component .")
code = 500
@@ -541,6 +542,13 @@ class PdpExisting(MoonError):
logger = "Error"
+class PdpKeystoneMappingConflict(MoonError):
+ description = _("A pdp is already mapped to that Keystone project.")
+ code = 409
+ title = 'Pdp Mapping Error'
+ logger = "Error"
+
+
class PolicyUnknown(MoonError):
description = _("The policy is unknown.")
code = 400