From 8c2daea590df4fb3f6877c21007afedc889e1416 Mon Sep 17 00:00:00 2001 From: "Anton V. Yanchenko" Date: Wed, 8 Aug 2012 12:35:55 +0000 Subject: Uniqueness checks for floating ip addresses. Fixes bug 1003392. Change-Id: I3f4554659c68476539c82d359cc080b34088b3ae --- nova/exception.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index a7ce890b0..912a45b3c 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -639,6 +639,15 @@ class NoFixedIpsDefined(NotFound): message = _("Zero fixed ips could be found.") +#TODO(bcwaldon): EOL this exception! +class Duplicate(NovaException): + pass + + +class FloatingIpExists(Duplicate): + message = _("Floating ip %(address)s already exists.") + + class FloatingIpNotFound(NotFound): message = _("Floating ip not found for id %(id)s.") @@ -907,11 +916,6 @@ class RotationRequiredForBackup(NovaException): message = _("Rotation param is required for backup image_type") -#TODO(bcwaldon): EOL this exception! -class Duplicate(NovaException): - pass - - class KeyPairExists(Duplicate): message = _("Key pair %(key_name)s already exists.") -- cgit