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
diff --git a/tempest/thirdparty/boto/test_ec2_instance_run.py b/tempest/thirdparty/boto/test_ec2_instance_run.py
index 8894de0..19a77dc 100644
--- a/tempest/thirdparty/boto/test_ec2_instance_run.py
+++ b/tempest/thirdparty/boto/test_ec2_instance_run.py
@@ -68,12 +68,21 @@
                       "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():