summaryrefslogtreecommitdiffstats
path: root/nova/exception.py
diff options
context:
space:
mode:
authorDave Walker (Daviey) <DaveWalker@ubuntu.com>2011-08-06 19:08:08 +0100
committerDave Walker (Daviey) <DaveWalker@ubuntu.com>2011-08-06 19:08:08 +0100
commit43548ac4b2bf93dd6e6b1d0cbbc340ae005b4dbf (patch)
tree5dcf02ebbc9b93b4ea923a0c2364d3000c122aa5 /nova/exception.py
parent2e3b199005d16ee3e35cd6c71b8512628e3631bc (diff)
parentc5cff2f02e887e518744f42f5a21605398a301a4 (diff)
downloadnova-43548ac4b2bf93dd6e6b1d0cbbc340ae005b4dbf.tar.gz
nova-43548ac4b2bf93dd6e6b1d0cbbc340ae005b4dbf.tar.xz
nova-43548ac4b2bf93dd6e6b1d0cbbc340ae005b4dbf.zip
Merge with trunk, resolving merge conflict
Diffstat (limited to 'nova/exception.py')
-rw-r--r--nova/exception.py26
1 files changed, 24 insertions, 2 deletions
diff --git a/nova/exception.py b/nova/exception.py
index 8f3cf0af6..5374d2a90 100644
--- a/nova/exception.py
+++ b/nova/exception.py
@@ -78,8 +78,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(notifier=None, publisher_id=None, event_type=None,
@@ -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))
@@ -149,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")
@@ -378,6 +383,10 @@ class StorageRepositoryNotFound(NotFound):
message = _("Cannot find SR to read/write VDI.")
+class NetworkNotCreated(NovaException):
+ message = _("%(req)s is required to create a network.")
+
+
class NetworkNotFound(NotFound):
message = _("Network %(network_id)s could not be found.")
@@ -414,6 +423,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 FixedIpNotFoundForSpecificInstance(FixedIpNotFound):
message = _("Instance %(instance_id)s doesn't have fixed ip '%(ip)s'.")
@@ -688,3 +702,11 @@ 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.")