public void getProductCodesForImageInRegion() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_image_attribute_productCodes.xml"); Set<String> result = amiApi().getProductCodesForImageInRegion(DEFAULT_REGION, "ami-246f8d4d"); assertFalse(result.isEmpty()); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeImageAttribute&Attribute=productCodes&ImageId=ami-246f8d4d"); }
public void getBlockDeviceMappingsForImageInRegion() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_image_attribute_blockDeviceMapping.xml"); Map<String, Image.EbsBlockDevice> result = amiApi() .getBlockDeviceMappingsForImageInRegion(DEFAULT_REGION, "ami-246f8d4d"); assertFalse(result.isEmpty()); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeImageAttribute&Attribute=blockDeviceMapping&ImageId=ami-246f8d4d"); }
public void describeImagesInRegion() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/amzn_images.xml"); Set<? extends Image> result = amiApi().describeImagesInRegion(DEFAULT_REGION); assertFalse(result.isEmpty()); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeImages"); }
public void getLaunchPermissionForImageInRegion() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/describe_image_attribute_launchPermission.xml"); Permission result = amiApi().getLaunchPermissionForImageInRegion(DEFAULT_REGION, "ami-246f8d4d"); assertNotNull(result); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeImageAttribute&Attribute=launchPermission&ImageId=ami-246f8d4d"); }
public void describeImagesInRegion_options() throws Exception { enqueueRegions(DEFAULT_REGION); enqueueXml(DEFAULT_REGION, "/amzn_images.xml"); Set<? extends Image> result = amiApi() .describeImagesInRegion(DEFAULT_REGION, executableBy("me").ownedBy("fred", "nancy").imageIds("1", "2")); assertFalse(result.isEmpty()); assertPosted(DEFAULT_REGION, "Action=DescribeRegions"); assertPosted(DEFAULT_REGION, "Action=DescribeImages&ExecutableBy=me&Owner.1=fred&Owner.2=nancy&ImageId.1=1&ImageId.2=2"); }