Set<org.jclouds.compute.domain.Image> result = convertImages("/greenqloud_images.xml");
assertEquals(result.size(), 9);
assertEquals(
Iterables.get(result, 0).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.UBUNTU).version("10.04")
.description("Ubuntu Server 10.04 (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("Ubuntu Server 10.04 (64-bit)")
.name("Ubuntu Server 10.04.3")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-4e5b842f")
.providerId("qmi-4e5b842f")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 0).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 1).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.UBUNTU).version("11.10")
.description("Ubuntu Server 11.10 (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("Ubuntu Server 11.10 (64-bit)")
.name("Ubuntu Server 11.10")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-9ac92558")
.providerId("qmi-9ac92558")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 1).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 2).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.CENTOS).version("5.5")
.description("CentOS 5.5 Server 64-bit").is64Bit(true)
.arch("paravirtual").build())
.description("CentOS 5.5 Server 64-bit")
.name("CentOS 5.5 Server")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-33a467aa")
.providerId("qmi-33a467aa")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 2).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 3).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.DEBIAN).version("6.0")
.description("Debian 6.0 (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("Debian 6.0 (64-bit)")
.name("Debian 6.0")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-f2a9d2ba")
.providerId("qmi-f2a9d2ba")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 3).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 4).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.CENTOS).version("6.0")
.description("CentOS 6.0 (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("CentOS 6.0 (64-bit)")
.name("CentOS 6.0")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-96f82145")
.providerId("qmi-96f82145")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 4).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 5).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.CENTOS).version("6.0")
.description("CentOS 6.0 GUI (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("CentOS 6.0 GUI (64-bit)")
.name("CentOS 6.0 GUI")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-42e877f6")
.providerId("qmi-42e877f6")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 5).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 6).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.UBUNTU).version("11.04")
.description("Ubuntu Server 11.04 (64-bit)").is64Bit(true)
.arch("paravirtual").build())
.description("Ubuntu Server 11.04 (64-bit)")
.name("Ubuntu Server 11.04")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-eed8cea7")
.providerId("qmi-eed8cea7")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 6).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 7).toString(),
new ImageBuilder()
.operatingSystem(
// fedora is not in the image version map, yet
OperatingSystem.builder().family(OsFamily.FEDORA).version("")
.description("Fedora 16 Server").is64Bit(false)
.arch("paravirtual").build())
.description("Fedora 16 Server")
.name("Fedora 16 Server")
.defaultCredentials(LoginCredentials.builder().user("root").build())
.id("us-east-1/qmi-fa4bdae0")
.providerId("qmi-fa4bdae0")
.location(defaultLocation)
.userMetadata(
ImmutableMap.of("owner", "admin", "rootDeviceType", "ebs", "virtualizationType",
"paravirtual", "hypervisor", "xen"))
.status(org.jclouds.compute.domain.Image.Status.AVAILABLE).backendStatus("available").build().toString());
assertEquals(Iterables.get(result, 7).getStatus(), org.jclouds.compute.domain.Image.Status.AVAILABLE);
assertEquals(
Iterables.get(result, 8).toString(),
new ImageBuilder()
.operatingSystem(
OperatingSystem.builder().family(OsFamily.CENTOS).version("5.6")
.description("CentOS 5.6 Server GUI 64-bit").is64Bit(true)
.arch("paravirtual").build())
.description("CentOS 5.6 Server GUI 64-bit")