Fix prebuilt images usability. (#1375)

- add a better error message when user uses an unknown ami
- add image_location in the default fake images

Fixes #1372
This commit is contained in:
Pierre Tardy 2017-12-05 10:22:13 +01:00 committed by Terry Cain
commit d8f6f77a0f
2 changed files with 37 additions and 1 deletions

View file

@ -392,7 +392,9 @@ class Instance(TaggedEC2Resource, BotoInstance):
if ami is None:
warnings.warn('Could not find AMI with image-id:{0}, '
'in the near future this will '
'cause an error'.format(image_id),
'cause an error.\n'
'Use ec2_backend.describe_images() to'
'find suitable image for your test'.format(image_id),
PendingDeprecationWarning)
self.platform = ami.platform if ami else None