mirror of https://github.com/apache/jclouds.git
extract out media methods, correct var name
This commit is contained in:
parent
8bca943086
commit
a307c44a22
|
@ -73,8 +73,8 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
vdcRef = Reference.builder()
|
vdcRef = Reference.builder()
|
||||||
.type("application/vnd.vmware.vcloud.vdc+xml")
|
.type("application/vnd.vmware.vcloud.vdc+xml")
|
||||||
.name("")
|
.name("")
|
||||||
.href(URI.create(endpoint+"/vdc/"+vDCId))
|
.href(URI.create(endpoint+"/vdc/"+vdcId))
|
||||||
.id(vDCId)
|
.id(vdcId)
|
||||||
.build();
|
.build();
|
||||||
vdcClient = context.getApi().getVdcClient();
|
vdcClient = context.getApi().getVdcClient();
|
||||||
}
|
}
|
||||||
|
@ -143,23 +143,6 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
// TODO: make assertions that the task was successful
|
// TODO: make assertions that the task was successful
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/cloneMedia")
|
|
||||||
public void testCloneMedia() {
|
|
||||||
Reference mediaSource = null; // TODO: media reference
|
|
||||||
Media media = vdcClient.cloneMedia(vdcRef, CloneMediaParams.builder()
|
|
||||||
.source(mediaSource)
|
|
||||||
// TODO: test optional params
|
|
||||||
//.name("")
|
|
||||||
//.description("")
|
|
||||||
//.isSourceDelete(true)
|
|
||||||
.build());
|
|
||||||
|
|
||||||
Checks.checkMediaFor(VDC, media);
|
|
||||||
|
|
||||||
// TODO: await task to complete
|
|
||||||
// TODO: make assertions that the task was successful
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/action/cloneVApp", enabled = false)
|
@Test(testName = "POST /vdc/{id}/action/cloneVApp", enabled = false)
|
||||||
public void testCloneVApp() {
|
public void testCloneVApp() {
|
||||||
Reference vAppSource = null; // TODO: vApp reference
|
Reference vAppSource = null; // TODO: vApp reference
|
||||||
|
@ -260,25 +243,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
// TODO: make assertions that the task was successful
|
// TODO: make assertions that the task was successful
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "POST /vdc/{id}/media")
|
@Test(testName = "GET /network/{id}/metadata", enabled = false)
|
||||||
public void testCreateMedia() {
|
|
||||||
Media media = vdcClient.createMedia(vdcRef, Media.builder()
|
|
||||||
.name("")
|
|
||||||
.imageType(Media.ImageType.ISO)
|
|
||||||
.size(0)
|
|
||||||
// TODO: test optional params
|
|
||||||
//.name("")
|
|
||||||
//.description("")
|
|
||||||
//.isSourceDelete(true)
|
|
||||||
.build());
|
|
||||||
|
|
||||||
Checks.checkMediaFor(VDC, media);
|
|
||||||
|
|
||||||
// TODO: await task to complete
|
|
||||||
// TODO: make assertions that the task was successful
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test(testName = "GET /network/{id}/metadata")
|
|
||||||
public void testGetMetadata() {
|
public void testGetMetadata() {
|
||||||
Metadata metadata = vdcClient.getMetadata(vdcRef);
|
Metadata metadata = vdcClient.getMetadata(vdcRef);
|
||||||
// required for testing
|
// required for testing
|
||||||
|
@ -288,7 +253,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest {
|
||||||
Checks.checkMetadataFor(VDC, metadata);
|
Checks.checkMetadataFor(VDC, metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(testName = "GET /network/{id}/metadata/{key}")
|
@Test(testName = "GET /network/{id}/metadata/{key}", enabled = false)
|
||||||
public void testGetMetadataValue() {
|
public void testGetMetadataValue() {
|
||||||
MetadataValue metadataValue = vdcClient.getMetadataValue(vdcRef, "key");
|
MetadataValue metadataValue = vdcClient.getMetadataValue(vdcRef, "key");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue