From 9374d8166b37b57b4b163b44702c16d591b76d01 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Mon, 6 Feb 2012 19:02:38 -0800 Subject: [PATCH] Partial fix for bug 919051 Test instance and volume IDs Change-Id: Icbdeb3a082e3e85f7d1698875529bfffbf6fa5f2 --- nova/exception.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nova/exception.py b/nova/exception.py index 4f7cc5f33..518a95a62 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -404,10 +404,6 @@ class FlagNotSet(NotFound): message = _("Required flag %(flag)s not set.") -class InstanceNotFound(NotFound): - message = _("Instance %(instance_id)s could not be found.") - - class VolumeNotFound(NotFound): message = _("Volume %(volume_id)s could not be found.") @@ -985,3 +981,11 @@ class SolidFireAPIDataException(SolidFireAPIException): class DuplicateVlan(Duplicate): message = _("Detected existing vlan with id %(vlan)") + + +class InstanceNotFound(NotFound): + message = _("Instance %(instance_id)s could not be found.") + + +class InvalidInstanceIDMalformed(Invalid): + message = _("Invalid id: %(val) (expecting \"i-...\").")