Merge pull request #379 from danikov/vclouds-director-media

Issue 830: vCloud director Media
This commit is contained in:
Adrian Cole 2012-02-20 02:43:13 -08:00
commit c42137ab08
13 changed files with 147 additions and 56 deletions

View File

@ -75,7 +75,7 @@ public class Media
public static final String FLOPPY = "floppy"; public static final String FLOPPY = "floppy";
public static final List<String> ALL = Arrays.asList( public static final List<String> ALL = Arrays.asList(
ISO, ISO ISO, FLOPPY
); );
} }

View File

@ -64,7 +64,7 @@ public class Metadata extends ResourceType<Metadata> {
private Set<MetadataEntry> metadataEntries = Sets.newLinkedHashSet(); private Set<MetadataEntry> metadataEntries = Sets.newLinkedHashSet();
/** /**
* @see Metadata#getMetadata() * @see Metadata#getMetadataEntries()
*/ */
public Builder entries(Set<MetadataEntry> metadataEntries) { public Builder entries(Set<MetadataEntry> metadataEntries) {
this.metadataEntries = Sets.newLinkedHashSet(checkNotNull(metadataEntries, "metadataEntries")); this.metadataEntries = Sets.newLinkedHashSet(checkNotNull(metadataEntries, "metadataEntries"));
@ -72,7 +72,7 @@ public class Metadata extends ResourceType<Metadata> {
} }
/** /**
* @see Metadata#getMetadata() * @see Metadata#getMetadataEntries()
*/ */
public Builder entry(MetadataEntry metadataEntry) { public Builder entry(MetadataEntry metadataEntry) {
metadataEntries.add(checkNotNull(metadataEntry, "metadataEntry")); metadataEntries.add(checkNotNull(metadataEntry, "metadataEntry"));

View File

@ -47,7 +47,7 @@ import org.testng.annotations.Test;
public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTest { public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTest {
@Test @Test
public void testWhenResponseIs2xxLoginReturnsValidMedia() { public void testGetMedia() {
URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -66,7 +66,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
assertEquals(client.getMediaClient().getMedia(mediaRef), expected); assertEquals(client.getMediaClient().getMedia(mediaRef), expected);
} }
public void testWhenResponseIs400ForInvalidMediaId() { public void testResponse400ForInvalidMedia() {
URI mediaUri = URI.create(endpoint + "/media/NOTAUUID"); URI mediaUri = URI.create(endpoint + "/media/NOTAUUID");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -97,7 +97,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs403ForCatalogIdUsedAsMediaId() { public void testResponse403ForCatalogIdUsedAsMediaId() {
URI mediaUri = URI.create(endpoint + "/media/e9cd3387-ac57-4d27-a481-9bee75e0690f"); URI mediaUri = URI.create(endpoint + "/media/e9cd3387-ac57-4d27-a481-9bee75e0690f");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -128,7 +128,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs403ForFakeMediaId() { public void testResponse403ForFakeMediaId() {
URI mediaUri = URI.create(endpoint + "/media/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"); URI mediaUri = URI.create(endpoint + "/media/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -158,8 +158,9 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
} }
@Test // TODO: fix this
public void testWhenResponseIs2xxLoginUpdateReturnsValidMedia() { @Test( enabled=false )
public void testUpdateMedia() {
URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -180,7 +181,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginDeleteMediaReturnsValidTask() { public void testDeleteMedia() {
URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -199,7 +200,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginReturnsValidMetadata() { public void testGetMetadata() {
URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -219,13 +220,13 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginMergeMetadataReturnsValidTask() { public void testMergeMetadata() {
URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
new VcloudHttpRequestPrimer() new VcloudHttpRequestPrimer()
.apiCommand("POST", "/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata") .apiCommand("POST", "/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata")
.xmlFilePayload("/media/metadata.xml", VCloudDirectorMediaType.METADATA) .xmlFilePayload("/media/mergeMetadata.xml", VCloudDirectorMediaType.METADATA)
.acceptMedia(VCloudDirectorMediaType.TASK) .acceptMedia(VCloudDirectorMediaType.TASK)
.httpRequestBuilder().build(), .httpRequestBuilder().build(),
new VcloudHttpResponsePrimer() new VcloudHttpResponsePrimer()
@ -239,9 +240,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
assertEquals(client.getMediaClient().mergeMetadata(mediaRef, inputMetadata), expectedTask); assertEquals(client.getMediaClient().mergeMetadata(mediaRef, inputMetadata), expectedTask);
} }
// TODO: fix this public void testGetMetadataValue() {
@Test(enabled = false)
public void testWhenResponseIs2xxLoginReturnsValidMetadataEntry() {
URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -250,7 +249,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
.acceptAnyMedia() .acceptAnyMedia()
.httpRequestBuilder().build(), .httpRequestBuilder().build(),
new VcloudHttpResponsePrimer() new VcloudHttpResponsePrimer()
.xmlFilePayload("/media/metadataEntry.xml", VCloudDirectorMediaType.METADATA_ENTRY) .xmlFilePayload("/media/metadataValue.xml", VCloudDirectorMediaType.METADATA_VALUE)
.httpResponseBuilder().build()); .httpResponseBuilder().build());
MetadataValue expected = metadataValue(); MetadataValue expected = metadataValue();
@ -261,17 +260,17 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginSetMetadataReturnsValidTask() { public void testSetMetadataValue() {
URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
new VcloudHttpRequestPrimer() new VcloudHttpRequestPrimer()
.apiCommand("PUT", "/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata/key") .apiCommand("PUT", "/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata/key")
.xmlFilePayload("/media/setMetadata.xml", VCloudDirectorMediaType.METADATA_VALUE) .xmlFilePayload("/media/setMetadataValue.xml", VCloudDirectorMediaType.METADATA_VALUE)
.acceptMedia(VCloudDirectorMediaType.TASK) .acceptMedia(VCloudDirectorMediaType.TASK)
.httpRequestBuilder().build(), .httpRequestBuilder().build(),
new VcloudHttpResponsePrimer() new VcloudHttpResponsePrimer()
.xmlFilePayload("/media/setMetadataTask.xml", VCloudDirectorMediaType.TASK) .xmlFilePayload("/media/setMetadataValueTask.xml", VCloudDirectorMediaType.TASK)
.httpResponseBuilder().build()); .httpResponseBuilder().build());
Reference mediaRef = Reference.builder().href(mediaUri).build(); Reference mediaRef = Reference.builder().href(mediaUri).build();
@ -283,7 +282,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginDeleteMetadataEntryReturnsValidTask() { public void testDeleteMetadataValue() {
URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -302,7 +301,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
} }
@Test @Test
public void testWhenResponseIs2xxLoginReturnsValidOwner() { public void testGetOwner() {
URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1"); URI mediaUri = URI.create(endpoint + "/media/794eb334-754e-4917-b5a0-5df85cbd61d1");
VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse,
@ -367,11 +366,47 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
return Media.builder() return Media.builder()
.size(175163392) .size(175163392)
.imageType("iso") .imageType("iso")
.status(1)
.name("new testMedia1")
.id("urn:vcloud:media:c93e5cdc-f29a-4749-8ed2-093df04cc75e")
.type("application/vnd.vmware.vcloud.media+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"))
.link(Link.builder()
.rel("up")
.type("application/vnd.vmware.vcloud.vdc+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f"))
.build())
.link(Link.builder()
.rel("catalogItem")
.type("application/vnd.vmware.vcloud.catalogItem+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/catalogItem/1b317eb9-0e25-429a-ada2-3c7a74a0367b"))
.build())
.link(Link.builder()
.rel("remove")
.type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"))
.build())
.link(Link.builder()
.rel("edit")
.type("application/vnd.vmware.vcloud.media+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"))
.build())
.link(Link.builder()
.rel("down")
.type("application/vnd.vmware.vcloud.owner+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/owner"))
.build())
.link(Link.builder()
.rel("down")
.type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"))
.build())
.description("new test description")
.owner(Owner.builder() .owner(Owner.builder()
.user(Reference.builder() .user(Reference.builder()
.type("application/vnd.vmware.admin.user+xml") .type("application/vnd.vmware.admin.user+xml")
.name("acole") .name("dan")
.href(URI.create("https://mycloud.greenhousedata.com/api/admin/user/c090335b-708c-4c1c-9e3d-89560d002120")) .href(URI.create("https://mycloud.greenhousedata.com/api/admin/user/7818d31c-df33-4d77-9bbc-0a0741cf3d44"))
.build()) .build())
.build()) .build())
.build(); .build();
@ -419,8 +454,8 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
.status("running") .status("running")
.startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00")) .startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00"))
.expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00")) .expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00"))
.operationName("mediaDelete") .operationName("vdcDeleteMedia")
.operation("Deleting Media (794eb334-754e-4917-b5a0-5df85cbd61d1)") .operation("Deleting Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)")
.link(Link.builder() .link(Link.builder()
.rel("task:cancel") .rel("task:cancel")
.href(URI.create("https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel")) .href(URI.create("https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"))
@ -457,23 +492,55 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
private static Metadata metadata() { private static Metadata metadata() {
return Metadata.builder() return Metadata.builder()
.type("application/vnd.vmware.vcloud.metadata+xml") .type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata")) .href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"))
.link(Link.builder() .link(Link.builder()
.rel("up") .rel("up")
.type("application/vnd.vmware.vcloud.media+xml") .type("application/vnd.vmware.vcloud.media+xml")
.href(URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1")) .href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"))
.build()) .build())
.entry(MetadataEntry.builder().key("key").value("value").build()) .link(Link.builder()
.rel("add")
.type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"))
.build())
.entry(MetadataEntry.builder()
.type("application/vnd.vmware.vcloud.metadata.value+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.link(Link.builder()
.rel("up")
.type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"))
.build())
.link(Link.builder()
.rel("edit")
.type("application/vnd.vmware.vcloud.metadata.value+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.build())
.link(Link.builder()
.rel("remove")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.build())
.key("key").value("value").build())
.build(); .build();
} }
private static MetadataValue metadataValue() { private static MetadataValue metadataValue() {
return MetadataValue.builder() return MetadataValue.builder()
.href(URI.create("https://vcloudbeta.bluelock.com/api/cmedia/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata/key")) .type("application/vnd.vmware.vcloud.metadata.value+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.link(Link.builder() .link(Link.builder()
.rel("up") .rel("up")
.type("application/vnd.vmware.vcloud.metadata+xml") .type("application/vnd.vmware.vcloud.metadata+xml")
.href(URI.create("https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata")) .href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"))
.build())
.link(Link.builder()
.rel("edit")
.type("application/vnd.vmware.vcloud.metadata.value+xml")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.build())
.link(Link.builder()
.rel("remove")
.href(URI.create("https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"))
.build()) .build())
.value("value").build(); .value("value").build();
} }
@ -482,8 +549,8 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
return Task.builder() return Task.builder()
.status("running") .status("running")
.startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00")) .startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00"))
.operationName("metadataMerge") .operationName("metadataUpdate")
.operation("Merging metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)") .operation("Updating metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)")
.expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00")) .expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00"))
.name("task") .name("task")
.id("urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c") .id("urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c")
@ -515,8 +582,8 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
return Task.builder() return Task.builder()
.status("running") .status("running")
.startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00")) .startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00"))
.operationName("metadataSet") .operationName("metadataUpdate")
.operation("Setting metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)") .operation("Updating metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)")
.expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00")) .expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00"))
.name("task") .name("task")
.id("urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c") .id("urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c")
@ -554,7 +621,7 @@ public class MediaClientExpectTest extends BaseVCloudDirectorRestClientExpectTes
.startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00")) .startTime(dateService.iso8601DateParse("2012-02-13T06:35:08.011-05:00"))
.expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00")) .expiryTime(dateService.iso8601DateParse("2012-05-13T06:35:08.011-04:00"))
.operationName("metadataDelete") .operationName("metadataDelete")
.operation("Deleting metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)") .operation("Deleting metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)")
.link(Link.builder() .link(Link.builder()
.rel("task:cancel") .rel("task:cancel")
.href(URI.create("https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel")) .href(URI.create("https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"))

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="mediaDelete" operation="Deleting Media (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd"> <Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="vdcDeleteMedia" operation="Deleting Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd">
<Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/> <Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/>
<Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/> <Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/>
<User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/> <User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataDelete" operation="Deleting metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd"> <Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataDelete" operation="Deleting metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd">
<Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/> <Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/>
<Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/> <Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/>
<User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/> <User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Metadata type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata" xmlns="http://www.vmware.com/vcloud/v1.5">
<Link rel="up" type="application/vnd.vmware.vcloud.media+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"/>
<Link rel="add" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<MetadataEntry type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key">
<Link rel="up" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Key>key</Key>
<Value>value</Value>
</MetadataEntry>
</Metadata>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataMerge" operation="Merging metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd"> <Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataUpdate" operation="Updating metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd">
<Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/> <Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/>
<Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/> <Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media794eb334-754e-4917-b5a0-5df85cbd61d1"/>
<User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/> <User type="application/vnd.vmware.admin.user+xml" name="adk@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/>

View File

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8"?>
<Metadata type="application/vnd.vmware.vcloud.metadata+xml" href="https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata" xmlns="http://www.vmware.com/vcloud/v1.5"> <Metadata xmlns="http://www.vmware.com/vcloud/v1.5" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://mycloud.greenhousedata.com/api/v1.5/schema/master.xsd">
<Link rel="up" type="application/vnd.vmware.vcloud.media+xml" href="https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"/> <Link rel="up" type="application/vnd.vmware.vcloud.media+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"/>
<MetadataEntry> <Link rel="add" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<MetadataEntry type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key">
<Link rel="up" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Key>key</Key> <Key>key</Key>
<Value>value</Value> <Value>value</Value>
</MetadataEntry> </MetadataEntry>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetadataEntry xmlns="http://www.vmware.com/vcloud/v1.5" href="https://vcloudbeta.bluelock.com/api/cmedia/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata/key" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd">
<Link rel="up" type="application/vnd.vmware.vcloud.metadata+xml" href="https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1/metadata"/>
<Key>key</Key>
<Value>value</Value>
</MetadataEntry>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetadataValue xmlns="http://www.vmware.com/vcloud/v1.5" type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://mycloud.greenhousedata.com/api/v1.5/schema/master.xsd">
<Link rel="up" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.metadata.value+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata/key"/>
<Value>value</Value>
</MetadataValue>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataSet" operation="Setting metadata for Media (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd"> <Task xmlns="http://www.vmware.com/vcloud/v1.5" status="running" startTime="2012-02-13T06:35:08.011-05:00" operationName="metadataUpdate" operation="Updating metadata for Media File (794eb334-754e-4917-b5a0-5df85cbd61d1)" expiryTime="2012-05-13T06:35:08.011-04:00" name="task" id="urn:vcloud:task:c6dca927-eab4-41fa-ad6a-3ac58602541c" type="application/vnd.vmware.vcloud.task+xml" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://vcloudbeta.bluelock.com/api/v1.5/schema/master.xsd">
<Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/> <Link rel="task:cancel" href="https://vcloudbeta.bluelock.com/api/task/c6dca927-eab4-41fa-ad6a-3ac58602541c/action/cancel"/>
<Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"/> <Owner type="application/vnd.vmware.vcloud.media+xml" name="" href="https://vcloudbeta.bluelock.com/api/media/794eb334-754e-4917-b5a0-5df85cbd61d1"/>
<User type="application/vnd.vmware.admin.user+xml" name="dan@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/> <User type="application/vnd.vmware.admin.user+xml" name="dan@cloudsoftcorp.com" href="https://vcloudbeta.bluelock.com/api/admin/user/e9eb1b29-0404-4c5e-8ef7-e584acc51da9"/>

View File

@ -1,6 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Media size="175163392" imageType="iso" xmlns="http://www.vmware.com/vcloud/v1.5"> <Media size="175163392" imageType="iso" status="1" name="new testMedia1" id="urn:vcloud:media:c93e5cdc-f29a-4749-8ed2-093df04cc75e" type="application/vnd.vmware.vcloud.media+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e" xmlns="http://www.vmware.com/vcloud/v1.5">
<Owner> <Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml" href="https://mycloud.greenhousedata.com/api/vdc/e9cd3387-ac57-4d27-a481-9bee75e0690f"/>
<User type="application/vnd.vmware.admin.user+xml" name="acole" href="https://mycloud.greenhousedata.com/api/admin/user/c090335b-708c-4c1c-9e3d-89560d002120"/> <Link rel="catalogItem" type="application/vnd.vmware.vcloud.catalogItem+xml" href="https://mycloud.greenhousedata.com/api/catalogItem/1b317eb9-0e25-429a-ada2-3c7a74a0367b"/>
<Link rel="remove" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"/>
<Link rel="edit" type="application/vnd.vmware.vcloud.media+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e"/>
<Link rel="down" type="application/vnd.vmware.vcloud.owner+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/owner"/>
<Link rel="down" type="application/vnd.vmware.vcloud.metadata+xml" href="https://mycloud.greenhousedata.com/api/media/c93e5cdc-f29a-4749-8ed2-093df04cc75e/metadata"/>
<Description>new test description</Description>
<Owner type="application/vnd.vmware.vcloud.owner+xml">
<User type="application/vnd.vmware.admin.user+xml" name="dan" href="https://mycloud.greenhousedata.com/api/admin/user/7818d31c-df33-4d77-9bbc-0a0741cf3d44"/>
</Owner> </Owner>
</Media> </Media>