From 01b9d211e606ee0be221b27edae8aab1d35096ff Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Tue, 5 Jul 2011 11:51:46 -0700 Subject: First round of changes for ha-flatdhcp. * added 'host' column to fixed_ips to allow associating with a host * added 'multi_host' column to network for multi_host possibility * moved extra db access from linux_net to manager * added host parameter to network calls --- nova/exception.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index a6776b64f..29a209c3e 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -377,6 +377,11 @@ class FixedIpNotFoundForInstance(FixedIpNotFound): message = _("Instance %(instance_id)s has zero fixed ips.") +class FixedIpNotFoundForNetworkHost(FixedIpNotFound): + message = _("Network host %(host)s has zero fixed ips " + "in network %(network_id)s.") + + class FixedIpNotFoundForVirtualInterface(FixedIpNotFound): message = _("Virtual interface %(vif_id)s has zero associated fixed ips.") -- cgit From c8a35349be912bb862789059abc95ccf9f7b8ef5 Mon Sep 17 00:00:00 2001 From: Matt Dietz Date: Fri, 15 Jul 2011 19:07:58 +0000 Subject: Updated with some changes from manual testing --- nova/exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 988940d6a..a98b0a36b 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -77,8 +77,8 @@ def wrap_db_error(f): except Exception, e: LOG.exception(_('DB exception wrapped.')) raise DBError(e) - return _wrap _wrap.func_name = f.func_name + return _wrap def wrap_exception(f): -- cgit From 9008b1f291ae38a4de9b5af5087b1815b3562e3f Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Wed, 27 Jul 2011 09:19:45 -0700 Subject: add invalid device test and make sure NovaExceptions don't get wrapped --- nova/exception.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 38e705417..ea046b712 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -116,7 +116,8 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None, notifier.notify(publisher_id, temp_type, temp_level, payload) - if not isinstance(e, Error): + if (not isinstance(e, Error) and + not isinstance(e, NovaException)): #exc_type, exc_value, exc_traceback = sys.exc_info() LOG.exception(_('Uncaught exception')) #logging.error(traceback.extract_stack(exc_traceback)) -- cgit From a0b536064620e4d18ab00c1154ec3b597ab16a67 Mon Sep 17 00:00:00 2001 From: Trey Morris Date: Wed, 27 Jul 2011 11:44:14 -0500 Subject: updated nova-manage create network. better help, handling of required args, and exceptions. Also updated FLAG flat_network_bridge to default to None --- nova/exception.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 38e705417..637cad7ee 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -372,6 +372,10 @@ class StorageRepositoryNotFound(NotFound): message = _("Cannot find SR to read/write VDI.") +class NetworkNotCreated(NovaException): + message = _("A %(req)s is required to create a network.") + + class NetworkNotFound(NotFound): message = _("Network %(network_id)s could not be found.") -- cgit From 2b0134bdfa73e7eb616414b3f8cd1b5ed99b8283 Mon Sep 17 00:00:00 2001 From: Trey Morris Date: Wed, 27 Jul 2011 13:49:36 -0500 Subject: added ipv6 requirements to nova-manage network create. changed --network to --fixed_range_v4 --- nova/exception.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 637cad7ee..ca2ba3c96 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -373,7 +373,7 @@ class StorageRepositoryNotFound(NotFound): class NetworkNotCreated(NovaException): - message = _("A %(req)s is required to create a network.") + message = _("%(req)s is required to create a network.") class NetworkNotFound(NotFound): -- cgit From 055a422643fc229ec0e7db3f6dcba9904c5a4f5d Mon Sep 17 00:00:00 2001 From: Brian Lamar Date: Fri, 29 Jul 2011 18:05:31 -0400 Subject: Created exceptions for accepting in OSAPI, and handled them appropriately. --- nova/exception.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 8c9b45a80..b6455db9f 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -692,3 +692,15 @@ class PasteConfigNotFound(NotFound): class PasteAppNotFound(NotFound): message = _("Could not load paste app '%(name)s' from %(path)s") + + +class CannotResizeToSameSize(NovaException): + message = _("When resizing, instances must change size!") + + +class CannotResizeToSmallerSize(NovaException): + message = _("Resizing to a smaller size is not supported.") + + +class FlavorDoesNotExist(NovaException): + message = _("Requested flavor '%(flavor_id)s' does not exist.") -- cgit From a7f0eb04236b15a026654346b47bc434886b9d97 Mon Sep 17 00:00:00 2001 From: Brian Lamar Date: Fri, 29 Jul 2011 18:13:28 -0400 Subject: FlavorNotFound already existed, no need to create another exception. --- nova/exception.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index b6455db9f..68e6ac937 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -700,7 +700,3 @@ class CannotResizeToSameSize(NovaException): class CannotResizeToSmallerSize(NovaException): message = _("Resizing to a smaller size is not supported.") - - -class FlavorDoesNotExist(NovaException): - message = _("Requested flavor '%(flavor_id)s' does not exist.") -- cgit From 9602a558b6be6e6812626b986c0f9557a3862fe6 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Fri, 5 Aug 2011 11:59:14 -0400 Subject: glance image service pagination --- nova/exception.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nova/exception.py') diff --git a/nova/exception.py b/nova/exception.py index 68e6ac937..792e306c1 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -150,6 +150,10 @@ class NovaException(Exception): return self._error_string +class ImagePaginationFailed(NovaException): + message = _("Failed to paginate through images from image service") + + class VirtualInterfaceCreateException(NovaException): message = _("Virtual Interface creation failed") -- cgit