summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2013-01-16 09:37:39 +1300
committerRobert Collins <robertc@robertcollins.net>2013-01-16 09:37:39 +1300
commita3eaf784ad2f9103a010646aa2a13db6f09f3679 (patch)
treebb6e363839037b491ade8377459b6c4c5c20d021 /nova/exception.py
parent9670c932c913fccbca263713bd9cee1b5e149d1c (diff)
downloadnova-a3eaf784ad2f9103a010646aa2a13db6f09f3679.tar.gz
nova-a3eaf784ad2f9103a010646aa2a13db6f09f3679.tar.xz
nova-a3eaf784ad2f9103a010646aa2a13db6f09f3679.zip
Reject user ports that have MACs the hypervisor cannot use.
If a hypervisor has requested specific MAC addresses, ports requested by the user have to be in that set of MAC addresses, or they cannot be used. Raising an error at network allocation time is cleaner than waiting for the hypervisor to attempt to plug its vifs and error. Change-Id: If556cc518a01df658044e3ba6b9d7584bfabe588
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/nova/exception.py b/nova/exception.py
index f96b1eaf3..b16bc7669 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -522,6 +522,10 @@ class PortNotFound(NotFound):
message = _("Port %(port_id)s could not be found.")
+class PortNotUsable(NovaException):
+ message = _("Port %(port_id)s not usable for instance %(instance)s.")
+
+
class FixedIpNotFound(NotFound):
message = _("No fixed IP associated with id %(id)s.")