Handle error in associate floating IP (bug 845507)

* Raise NoFloatingIpInterface when associate floating IP has an
  interface that doesn't exist.
* Return 500 Internal server Error, indicate only that associate
  action failed

Change-Id: I6b032f7554795de64bce8e669d20269210c62e33
This commit is contained in:
Dean Troyer
2012-01-20 16:39:41 -06:00
parent f6c8243573
commit 66dacf88a1
2 changed files with 21 additions and 0 deletions

View File

@@ -584,6 +584,10 @@ class NoFloatingIpsDefined(NotFound):
message = _("Zero floating ips exist.")
class NoFloatingIpInterface(NotFound):
message = _("Interface %(interface)s not found.")
class KeypairNotFound(NotFound):
message = _("Keypair %(name)s not found for user %(user_id)s")