Search in sources :

Example 1 with TagDeletionRequest

use of com.vmware.photon.controller.model.tasks.TagGroomerTaskService.TagDeletionRequest in project photon-model by vmware.

the class TagGroomerTaskServiceTest method executeTagsGroomerTask.

/**
 * Run groomer task and wait for completion
 */
private void executeTagsGroomerTask() {
    TagDeletionRequest state = new TagDeletionRequest();
    state.documentSelfLink = UriUtils.buildUriPath(TagGroomerTaskService.FACTORY_LINK, UUID.randomUUID().toString());
    Operation postOp = Operation.createPost(UriUtils.buildUri(this.host, TagGroomerTaskService.FACTORY_LINK)).setBody(state);
    this.host.waitForResponse(postOp);
    this.host.waitForFinishedTask(TagDeletionRequest.class, state.documentSelfLink);
}
Also used : TagDeletionRequest(com.vmware.photon.controller.model.tasks.TagGroomerTaskService.TagDeletionRequest) Operation(com.vmware.xenon.common.Operation)

Aggregations

TagDeletionRequest (com.vmware.photon.controller.model.tasks.TagGroomerTaskService.TagDeletionRequest)1 Operation (com.vmware.xenon.common.Operation)1