diff options
-rw-r--r-- | nova/api/ec2/cloud.py | 2 | ||||
-rw-r--r-- | nova/exception.py | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 834b5b7e2..c252684a3 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -1181,7 +1181,7 @@ class CloudController(object): if image: image_state = self._get_image_state(image) else: - raise exception.ImageNotFound(image_id=kwargs['image_id']) + raise exception.ImageNotFoundEC2(image_id=kwargs['image_id']) if image_state != 'available': raise exception.EC2APIError(_('Image must be available')) diff --git a/nova/exception.py b/nova/exception.py index f89b3e541..83c3f9c03 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -486,6 +486,13 @@ class ImageNotFound(NotFound): message = _("Image %(image_id)s could not be found.") +class ImageNotFoundEC2(ImageNotFound): + message = _("Image %(image_id)s could not be found. The nova EC2 API " + "assigns image ids dynamically when they are listed for the " + "first time. Have you listed image ids since adding this " + "image?") + + class ProjectNotFound(NotFound): message = _("Project %(project_id)s could not be found.") |