Search in sources :

Example 31 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method sparsifyVolume.

@Override
public StatusOnlyReturn sparsifyVolume(String jobId, Map<String, Object> volumeAddress) {
    JsonRpcRequest request = new RequestBuilder("SDM.sparsify_volume").withParameter("job_id", jobId).withParameter("vol_info", volumeAddress).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 32 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method hotplugDisk.

@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn hotplugDisk(Map info) {
    JsonRpcRequest request = new RequestBuilder("VM.hotplugDisk").withParameter("vmID", getVmId(info)).withParameter("params", info).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 33 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method moveDomainDevice.

@Override
public StatusOnlyReturn moveDomainDevice(String jobId, Map<String, Object> moveParams) {
    JsonRpcRequest request = new RequestBuilder("SDM.move_domain_device").withParameter("job_id", jobId).withParameter("move_params", moveParams).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 34 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method freeze.

@Override
public StatusOnlyReturn freeze(String vmId) {
    JsonRpcRequest request = new RequestBuilder("VM.freeze").withParameter("vmID", vmId).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 35 with StatusOnlyReturn

use of org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method formatStorageDomain.

@Override
public StatusOnlyReturn formatStorageDomain(String sdUUID) {
    JsonRpcRequest request = new RequestBuilder("StorageDomain.format").withParameter("storagedomainID", sdUUID).withParameter("autoDetach", false).build();
    Map<String, Object> response = new FutureMap(this.client, request);
    return new StatusOnlyReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Aggregations

StatusOnlyReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)118 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)117 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)117 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)2 FutureTask (java.util.concurrent.FutureTask)1 HttpClient (org.apache.commons.httpclient.HttpClient)1 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)1 AsyncTaskCreationInfo (org.ovirt.engine.core.common.asynctasks.AsyncTaskCreationInfo)1 Guid (org.ovirt.engine.core.compat.Guid)1 VdsManager (org.ovirt.engine.core.vdsbroker.VdsManager)1 VDSErrorException (org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException)1