mirror of https://github.com/apache/jclouds.git
merge to master
This commit is contained in:
parent
e24b96e043
commit
5518149db9
|
@ -92,8 +92,6 @@ public class CloneMediaParams
|
|||
|
||||
public CloneMediaParams build() {
|
||||
return new CloneMediaParams(description, name, source, isSourceDelete);
|
||||
cloneMediaParams.setName(name);
|
||||
cloneMediaParams.setDescription(description);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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<T extends EntityType<T>> extends ResourceType<T
|
|||
|
||||
@XmlElement(name = "Description")
|
||||
private String description;
|
||||
@XmlElement(namespace = VCLOUD_1_5_NS, name = "Tasks")
|
||||
@XmlElement(name = "Tasks")
|
||||
private TasksInProgress tasksInProgress;
|
||||
@XmlAttribute
|
||||
private String id;
|
||||
|
|
|
@ -58,7 +58,6 @@ import com.google.common.collect.Sets;
|
|||
*/
|
||||
@XmlType(name = "File")
|
||||
public class File extends EntityType<File> {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -194,13 +193,11 @@ public class File extends EntityType<File> {
|
|||
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
|
||||
|
|
|
@ -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<File> files) {
|
||||
this.files = ImmutableSet.copyOf(files);
|
||||
private FilesList(List<File> files) {
|
||||
this.files = ImmutableList.copyOf(files);
|
||||
}
|
||||
|
||||
|
||||
@XmlElement(name = "File", required = true)
|
||||
protected Set<File> files = Sets.newLinkedHashSet();
|
||||
protected List<File> files = Lists.newLinkedList();
|
||||
|
||||
/**
|
||||
* Gets the value of the file property.
|
||||
*/
|
||||
public Set<File> getFiles() {
|
||||
public List<File> getFiles() {
|
||||
return this.files;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ public class Media extends ResourceEntityType<Media> {
|
|||
public static final List<String> ALL = Arrays.asList(ISO, FLOPPY);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue