fix cloneMedia (bad path) and deleteMedia (wrong ID)

This commit is contained in:
danikov 2012-03-20 23:55:27 +00:00
parent 0f5cae3eaf
commit f0913ee6b4
2 changed files with 3 additions and 2 deletions

View File

@ -78,11 +78,12 @@ public interface MediaAsyncClient {
* @see MediaClient#cloneMedia(URI, CloneMediaParams)
*/
@POST
@Path("/action/cloneMedia")
@Consumes(VCloudDirectorMediaType.MEDIA)
@Produces(VCloudDirectorMediaType.CLONE_MEDIA_PARAMS)
@JAXBResponseParser
@ExceptionParser(ThrowVCloudErrorOn4xx.class)
ListenableFuture<Media> cloneMedia(@EndpointParam URI cloneLink,
ListenableFuture<Media> cloneMedia(@EndpointParam URI vdcRef,
@BinderParam(BindToXMLPayload.class) CloneMediaParams params);
/**

View File

@ -398,7 +398,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest {
Error expected = Error.builder()
.message(String.format(
"No access to entity \"(com.vmware.vcloud.entity.media:%s)\".",
media.getId()))
media.getId().substring("urn:vcloud:media:".length())))
.majorErrorCode(403)
.minorErrorCode("ACCESS_TO_RESOURCE_IS_FORBIDDEN")
.build();