diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-06-17 16:54:08 -0500 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-06-17 16:54:08 -0500 |
| commit | a2f9e4be5ca400b407fbb8aa11dd0888aad21aa1 (patch) | |
| tree | f4f967336f95c89fc89716551a7d3e90e9c743e9 | |
| parent | 749eac4d36ff2f7a855044d677f3cde07451f32a (diff) | |
renamed VirtualInterface exception and extend NovaException
| -rw-r--r-- | nova/exception.py | 5 | ||||
| -rw-r--r-- | nova/network/manager.py | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/nova/exception.py b/nova/exception.py index 6346c8931..5eec4b0cc 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -118,8 +118,9 @@ class NovaException(Exception): return self._error_string -class VirtualInterface(Exception): - message = _("Attempt to create virtual interface failed") +class VirtualInterfaceMacAddressException(NovaException): + message = _("5 attempts to create virtual interface" + "with unique mac address failed") class NotAuthorized(NovaException): diff --git a/nova/network/manager.py b/nova/network/manager.py index fd592c3e3..583ea3f8d 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -456,7 +456,7 @@ class NetworkManager(manager.SchedulerDependentManager): else: self.db.virtual_interface_delete_by_instance(context, instance_id) - raise exception.VirtualInterface(_("5 create attempts failed")) + raise exception.VirtualInterfaceMacAddressException() def generate_mac_address(self): """Generate a mac address for a vif on an instance.""" |
