From 7c9fb31d0ff6b6b6937382dc4e85b7666f044754 Mon Sep 17 00:00:00 2001 From: Richard Downer Date: Wed, 1 Feb 2012 16:57:05 +0000 Subject: [PATCH] EC2ImageParser was not setting the name --- .../org/jclouds/ec2/compute/functions/EC2ImageParser.java | 1 + .../jclouds/ec2/compute/functions/EC2ImageParserTest.java | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/EC2ImageParser.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/EC2ImageParser.java index 1cdaf72b5e..7f14e25ad5 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/EC2ImageParser.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/EC2ImageParser.java @@ -86,6 +86,7 @@ public class EC2ImageParser implements Function builder().put("owner", from.getImageOwnerId()).put( "rootDeviceType", from.getRootDeviceType().value()).put("virtualizationType", diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/EC2ImageParserTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/EC2ImageParserTest.java index 54dafaa650..147210fdcc 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/EC2ImageParserTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/compute/functions/EC2ImageParserTest.java @@ -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(