use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class SnapshotService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
// enable metadata indexing
td.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(td);
SnapshotState template = (SnapshotState) td;
template.id = UUID.randomUUID().toString();
template.name = "snapshot01";
template.description = "";
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class GCPTestUtil method deleteDocument.
/**
* Delete the document by specified docuemnt link.
* @param host The test host service.
* @param documentToDelete The document link of the document to be deleted.
* @throws Throwable The exception during deleting document.
*/
public static void deleteDocument(VerificationHost host, String documentToDelete) throws Throwable {
host.testStart(1);
host.send(Operation.createDelete(UriUtils.buildUri(host, documentToDelete)).setBody(new ServiceDocument()).setCompletion(host.getCompletion()));
host.testWait();
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class TestAWSSetupUtils method deleteDocument.
/**
* Method for deleting a document with the said identifier.
*
* @param host
* The verification host
* @param documentToDelete
* The identifier of the document to be deleted.
* @throws Throwable
*/
public static void deleteDocument(VerificationHost host, String documentToDelete) throws Throwable {
host.testStart(1);
host.send(Operation.createDelete(UriUtils.buildUri(host, documentToDelete)).setBody(new ServiceDocument()).setCompletion(host.getCompletion()));
host.testWait();
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class PhotonModelAdaptersRegistryService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument template = super.getDocumentTemplate();
ServiceUtils.setRetentionLimit(template);
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class ScheduledTaskService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
ServiceUtils.setRetentionLimit(td);
ScheduledTaskState template = (ScheduledTaskState) td;
return template;
}
Aggregations