Search in sources :

Example 46 with StatusOnlyReturn

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

the class JsonRpcIIrsServer method forcedDetachStorageDomain.

@Override
public StatusOnlyReturn forcedDetachStorageDomain(String sdUUID, String spUUID) {
    JsonRpcRequest request = new RequestBuilder("StorageDomain.detach").withParameter("storagedomainID", sdUUID).withParameter("storagepoolID", spUUID).withParameter("force", true).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 47 with StatusOnlyReturn

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

the class JsonRpcVdsServer method mergeSubchain.

@Override
public StatusOnlyReturn mergeSubchain(String jobId, Map<String, Object> subchainInfo) {
    JsonRpcRequest request = new RequestBuilder("SDM.merge").withParameter("job_id", jobId).withParameter("subchain_info", subchainInfo).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 48 with StatusOnlyReturn

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

the class JsonRpcVdsServer method merge.

@Override
public StatusOnlyReturn merge(String vmId, Map<String, String> drive, String baseVolUUID, String topVolUUID, String bandwidth, String jobUUID) {
    JsonRpcRequest request = new RequestBuilder("VM.merge").withParameter("vmID", vmId).withParameter("drive", drive).withParameter("baseVolUUID", baseVolUUID).withParameter("topVolUUID", topVolUUID).withParameter("bandwidth", bandwidth).withParameter("jobUUID", jobUUID).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 49 with StatusOnlyReturn

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

the class JsonRpcVdsServer method disconnectStoragePool.

@Override
public StatusOnlyReturn disconnectStoragePool(String spUUID, int hostSpmId, String SCSIKey) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.disconnect").withParameter("storagepoolID", spUUID).withParameter("hostID", hostSpmId).withParameter("scsiKey", SCSIKey).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 50 with StatusOnlyReturn

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

the class JsonRpcVdsServer method hotplugMemory.

@Override
@SuppressWarnings("rawtypes")
public StatusOnlyReturn hotplugMemory(Map info) {
    JsonRpcRequest request = new RequestBuilder("VM.hotplugMemory").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)

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