From 02e0b75e85f753043fc71ac2e0714ec4d4b0cca8 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Mon, 25 Oct 2010 10:43:03 -0700 Subject: update error message --- nova/api/ec2/cloud.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nova/api') diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index bd7fbc3ac..62a8c475c 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -535,7 +535,8 @@ class CloudController(object): def attach_volume(self, context, volume_id, instance_id, device, **kwargs): volume_ref = db.volume_get_by_ec2_id(context, volume_id) if not re.match("^/dev/[a-z]d[a-z]+$", device): - raise exception.ApiError("Invalid device. Example /dev/vdb") + raise exception.ApiError("Invalid device specified: %s. " + "Example device: /dev/vdb" % device) # TODO(vish): abstract status checking? if volume_ref['status'] != "available": raise exception.ApiError("Volume status must be available") -- cgit