Set<org.jclouds.compute.domain.Image> result = convertImages("/alestic_canonical.xml");
assertEquals(
Iterables.get(result, 0),
new ImageBuilder()
.operatingSystem(
new OperatingSystem.Builder().family(OsFamily.UBUNTU).arch("paravirtual").version("8.04")
.description("ubuntu-images-us/ubuntu-hardy-8.04-i386-server-20091130.manifest.xml")
.is64Bit(false).build())
.description("ubuntu-images-us/ubuntu-hardy-8.04-i386-server-20091130.manifest.xml")
.defaultCredentials(LoginCredentials.builder().user("ubuntu").build()).id("us-east-1/ami-7e28ca17")
.providerId("ami-7e28ca17").location(defaultLocation).version("20091130")
.userMetadata(ImmutableMap.of(
"owner", "099720109477",
"rootDeviceType", "instance-store",
"virtualizationType", "paravirtual",
"hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE)
.backendStatus("available")
.build());
assertEquals(Iterables.get(result, 0).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 4),
new ImageBuilder()
.operatingSystem(
new OperatingSystem.Builder().family(OsFamily.UBUNTU).arch("paravirtual").version("8.04")
.description("alestic/ubuntu-8.04-hardy-base-20080905.manifest.xml").is64Bit(false)
.build()).description("alestic/ubuntu-8.04-hardy-base-20080905.manifest.xml")
.defaultCredentials(LoginCredentials.builder().user("ubuntu").build()).id("us-east-1/ami-c0fa1ea9")
.providerId("ami-c0fa1ea9").location(defaultLocation).version("20080905")
.userMetadata(ImmutableMap.of("owner", "063491364108", "rootDeviceType", "instance-store"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build());
assertEquals(Iterables.get(result, 4).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 6),
new ImageBuilder()
.name("ebs/ubuntu-images/ubuntu-lucid-10.04-i386-server-20100827")
.operatingSystem(
new OperatingSystem.Builder().family(OsFamily.UBUNTU).arch("paravirtual").version("10.04")
.description("099720109477/ebs/ubuntu-images/ubuntu-lucid-10.04-i386-server-20100827")
.is64Bit(false).build())