mirror of https://github.com/apache/jclouds.git
EC2ImageParser was not setting the name
This commit is contained in:
parent
223b5b6316
commit
7c9fb31d0f
|
@ -86,6 +86,7 @@ public class EC2ImageParser implements Function<org.jclouds.ec2.domain.Image, Im
|
|||
ImageBuilder builder = new ImageBuilder();
|
||||
builder.providerId(from.getId());
|
||||
builder.id(from.getRegion() + "/" + from.getId());
|
||||
builder.name(from.getName());
|
||||
builder.description(from.getDescription() != null ? from.getDescription() : from.getImageLocation());
|
||||
builder.userMetadata(ImmutableMap.<String, String> builder().put("owner", from.getImageOwnerId()).put(
|
||||
"rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType",
|
||||
|
|
|
@ -61,16 +61,16 @@ public class EC2ImageParserTest {
|
|||
assertEquals(Iterables.get(result, 0), new ImageBuilder().operatingSystem(
|
||||
new OperatingSystem.Builder().family(OsFamily.UNRECOGNIZED).arch("paravirtual").version("").description(
|
||||
"137112412989/amzn-ami-0.9.7-beta.i386-ebs").is64Bit(false).build()).description("Amazon")
|
||||
.defaultCredentials(new LoginCredentials("ec2-user", false)).id("us-east-1/ami-82e4b5c7").providerId(
|
||||
"ami-82e4b5c7").location(defaultLocation).userMetadata(
|
||||
.defaultCredentials(new LoginCredentials("ec2-user", false)).id("us-east-1/ami-82e4b5c7").name("amzn-ami-0.9.7-beta.i386-ebs")
|
||||
.providerId("ami-82e4b5c7").location(defaultLocation).userMetadata(
|
||||
ImmutableMap.of("owner", "137112412989", "rootDeviceType", "ebs")).build());
|
||||
|
||||
assertEquals(Iterables.get(result, 3), new ImageBuilder().operatingSystem(
|
||||
new OperatingSystem.Builder().family(OsFamily.UNRECOGNIZED).arch("paravirtual").version("").description(
|
||||
"amzn-ami-us-west-1/amzn-ami-0.9.7-beta.x86_64.manifest.xml").is64Bit(true).build())
|
||||
.description("Amazon Linux AMI x86_64 S3").defaultCredentials(new LoginCredentials("ec2-user", false)).id(
|
||||
"us-east-1/ami-f2e4b5b7").providerId("ami-f2e4b5b7").location(defaultLocation).userMetadata(
|
||||
ImmutableMap.of("owner", "137112412989", "rootDeviceType", "ebs")).build());
|
||||
"us-east-1/ami-f2e4b5b7").providerId("ami-f2e4b5b7").name("amzn-ami-0.9.7-beta.x86_64-S3").location(defaultLocation)
|
||||
.userMetadata(ImmutableMap.of("owner", "137112412989", "rootDeviceType", "ebs")).build());
|
||||
}
|
||||
|
||||
static Location defaultLocation = new LocationBuilder().scope(LocationScope.REGION).id("us-east-1").description(
|
||||
|
|
Loading…
Reference in New Issue