summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeodor Tersin <ftersin@cloudscaling.com>2015-04-07 17:30:58 +0300
committerFeodor Tersin <ftersin@cloudscaling.com>2015-04-07 17:30:58 +0300
commit2ba24d09d7a030e15ec47fd7ff0f52ebe08ee1a3 (patch)
tree60531e532d8dfd087f59a191d179d9232c539163
parent564450cf58d992a2f2e455dfced858fbf5d92380 (diff)
downloadtempest-2ba24d09d7a030e15ec47fd7ff0f52ebe08ee1a3.tar.gz
Adjust registration of ami image in boto tests
Adjust registration of ami image in boto tests to be compatible with stackforge ec2api. This change set kernel_id and ramdisk_id properties of an ami image. As a result the image could be used to run an instance without specifying of these additional images. Nova EC2 doesn't support set of these attributes in register image operation (LP #954335). So a run operation must specify both of them. Ec2api doesn't support specifying these in run operation (LP #1441138). So registration of ami image must set both of them. Now both requirements are satisfied, thus this testcase should work properly for both Nova EC2 and ec2api. Change-Id: I36ef88a561e60fb5dc3e687cb8bc02b27ec2e814
-rw-r--r--tempest/thirdparty/boto/test_ec2_instance_run.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index 8894de023..19a77dce3 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -68,12 +68,21 @@ class InstanceRunTest(boto_test.BotoTestCase):
"ari":
{"name": data_utils.rand_name("ari-name"),
"location": cls.bucket_name + "/" + ari_manifest}}
- for image in cls.images.itervalues():
+ for image_type in ("aki", "ari"):
+ image = cls.images[image_type]
image["image_id"] = cls.ec2_client.register_image(
name=image["name"],
image_location=image["location"])
cls.addResourceCleanUp(cls.ec2_client.deregister_image,
image["image_id"])
+ image = cls.images["ami"]
+ image["image_id"] = cls.ec2_client.register_image(
+ name=image["name"],
+ image_location=image["location"],
+ kernel_id=cls.images["aki"]["image_id"],
+ ramdisk_id=cls.images["ari"]["image_id"])
+ cls.addResourceCleanUp(cls.ec2_client.deregister_image,
+ image["image_id"])
for image in cls.images.itervalues():
def _state():