use of org.ovirt.engine.api.model.Action in project ovirt-engine by oVirt.
the class BackendDiskResourceTest method testIncompleteExport.
@Test
public void testIncompleteExport() throws Exception {
setUriInfo(setUpBasicUriExpectations());
try {
resource.export(new Action());
fail("expected WebApplicationException on incomplete parameters");
} catch (WebApplicationException wae) {
verifyIncompleteException(wae, "Action", "export", "storageDomain.id|name");
}
}
use of org.ovirt.engine.api.model.Action in project ovirt-engine by oVirt.
the class BackendEventsResourceTest method testUndelete.
@Test
public void testUndelete() throws Exception {
setUriInfo(setUpActionExpectations(ActionType.DisplayAllAuditLogAlerts, ActionParametersBase.class, new String[] {}, new Object[] {}, true, true));
collection.undelete(new Action());
}
use of org.ovirt.engine.api.model.Action in project ovirt-engine by oVirt.
the class BackendAttachedStorageDomainResourceTest method doTestActivateAsync.
private void doTestActivateAsync(AsyncTaskStatusEnum asyncStatus, CreationStatus actionStatus) throws Exception {
setUriInfo(setUpActionExpectations(ActionType.ActivateStorageDomain, StorageDomainPoolParametersBase.class, new String[] { "StorageDomainId", "StoragePoolId" }, new Object[] { STORAGE_DOMAIN_ID, DATA_CENTER_ID }, asList(GUIDS[1]), asList(new AsyncTaskStatus(asyncStatus))));
Response response = resource.activate(new Action());
verifyActionResponse(response, "datacenters/" + DATA_CENTER_ID + "/storagedomains/" + STORAGE_DOMAIN_ID, true, null);
Action action = (Action) response.getEntity();
assertTrue(action.isSetStatus());
assertEquals(actionStatus.value(), action.getStatus());
}
use of org.ovirt.engine.api.model.Action in project ovirt-engine by oVirt.
the class BackendDiskResourceTest method testExport.
@Test
public void testExport() throws Exception {
setUriInfo(setUpActionExpectations(ActionType.ExportRepoImage, ExportRepoImageParameters.class, new String[] { "ImageGroupID", "DestinationDomainId" }, new Object[] { DISK_ID, GUIDS[3] }, true, true, null, null, true));
Action action = new Action();
action.setStorageDomain(new StorageDomain());
action.getStorageDomain().setId(GUIDS[3].toString());
verifyActionResponse(resource.export(action));
}
use of org.ovirt.engine.api.model.Action in project ovirt-engine by oVirt.
the class BackendDiskResourceTest method setUpParams.
private Action setUpParams(boolean byName) {
Action action = new Action();
StorageDomain sd = new StorageDomain();
if (byName) {
sd.setName(NAMES[2]);
} else {
sd.setId(GUIDS[3].toString());
}
action.setStorageDomain(sd);
return action;
}
Aggregations