diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java index 982a0440be..e96cc68b01 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java @@ -92,8 +92,6 @@ public class CloneMediaParams public CloneMediaParams build() { return new CloneMediaParams(description, name, source, isSourceDelete); - cloneMediaParams.setName(name); - cloneMediaParams.setDescription(description); } diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java index b866ccd307..3645f5e4d1 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java @@ -23,6 +23,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import java.net.URI; import java.util.Set; + import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; @@ -137,7 +138,7 @@ public abstract class EntityType> extends ResourceType { - @SuppressWarnings("unchecked") public static Builder builder() { return new Builder(); } @@ -194,13 +193,11 @@ public class File extends EntityType { this.checksum = checksum; } + @SuppressWarnings("unused") private File() { - // For JAXB and builder use + // For JAXB } - private File(URI href, String name) { - super(href, name); - } @XmlAttribute protected Long size; @XmlAttribute diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java index 642a6131ff..233e132923 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java @@ -22,13 +22,14 @@ package org.jclouds.vcloud.director.v1_5.domain; import static com.google.common.base.Objects.equal; import static com.google.common.base.Preconditions.checkNotNull; -import java.util.Set; +import java.util.List; + import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; -import com.google.common.collect.Sets; /** @@ -99,18 +100,18 @@ public class FilesList { // For JAXB and builder use } - private FilesList(Set files) { - this.files = ImmutableSet.copyOf(files); + private FilesList(List files) { + this.files = ImmutableList.copyOf(files); } @XmlElement(name = "File", required = true) - protected Set files = Sets.newLinkedHashSet(); + protected List files = Lists.newLinkedList(); /** * Gets the value of the file property. */ - public Set getFiles() { + public List getFiles() { return this.files; } diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Media.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Media.java index 010a18ba3f..1c42578cb0 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Media.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Media.java @@ -48,7 +48,6 @@ public class Media extends ResourceEntityType { public static final List ALL = Arrays.asList(ISO, FLOPPY); } - @SuppressWarnings("unchecked") public static Builder builder() { return new Builder(); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientExpectTest.java index 6d7e96e03f..1ccd0a2042 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientExpectTest.java @@ -193,29 +193,6 @@ public class VdcClientExpectTest extends BaseVCloudDirectorRestClientExpectTest } } - @Test - @Test(enabled = false) - public void testCloneVApp() { - VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, - new VcloudHttpRequestPrimer() - .apiCommand("POST", "/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f/action/cloneVApp") - .xmlFilePayload("/vdc/params/cloneVApp.xml", VCloudDirectorMediaType.CLONE_V_APP_PARAMS) - .acceptAnyMedia() - .httpRequestBuilder().build(), - new VcloudHttpResponsePrimer() - .xmlFilePayload("/vdc/cloneVApp.xml", VCloudDirectorMediaType.V_APP) - .httpResponseBuilder().build()); - - VApp expected = cloneVApp(); - - // TODO: configure params - CloneVAppParams params = CloneVAppParams.builder() - - .build(); - - assertEquals(client.getVdcClient().cloneVApp(vdcRef, params), expected); - } - @Test(enabled = false) public void testCloneVAppTemplate() { VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,