Search in sources :

Example 81 with StatusOnlyReturn

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

the class JsonRpcVdsServer method reduceDomain.

@Override
public StatusOnlyReturn reduceDomain(String jobId, Map<String, Object> reduceParams) {
    JsonRpcRequest request = new RequestBuilder("SDM.reduce_domain").withParameter("job_id", jobId).withParameter("reduce_params", reduceParams).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 82 with StatusOnlyReturn

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

the class JsonRpcVdsServer method snapshot.

@Override
public StatusOnlyReturn snapshot(String vmId, Map<String, String>[] disks, String memory, boolean frozen) {
    JsonRpcRequest request = new RequestBuilder("VM.snapshot").withParameter("vmID", vmId).withParameter("snapDrives", new ArrayList<>(Arrays.asList(disks))).withOptionalParameter("snapMemory", memory).withParameter("frozen", frozen).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) ArrayList(java.util.ArrayList) StatusOnlyReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)

Example 83 with StatusOnlyReturn

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

the class JsonRpcVdsServer method glusterVolumeSet.

@Override
public StatusOnlyReturn glusterVolumeSet(String volumeName, String key, String value) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.set").withParameter("volumeName", volumeName).withParameter("option", key).withParameter("value", value).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 84 with StatusOnlyReturn

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

the class JsonRpcVdsServer method reconstructMaster.

@Override
public StatusOnlyReturn reconstructMaster(String spUUID, String poolName, String masterDom, Map<String, String> domDict, int masterVersion, String lockPolicy, int lockRenewalIntervalSec, int leaseTimeSec, int ioOpTimeoutSec, int leaseRetries, int hostSpmId) {
    // no lockPolicy and hostSpmId not needed can be removed from the interface
    JsonRpcRequest request = new RequestBuilder("StoragePool.reconstructMaster").withParameter("storagepoolID", spUUID).withParameter("hostId", hostSpmId).withParameter("name", poolName).withParameter("masterSdUUID", masterDom).withParameter("masterVersion", masterVersion).withParameter("domainDict", domDict).withParameter("lockRenewalIntervalSec", lockRenewalIntervalSec).withParameter("leaseTimeSec", leaseTimeSec).withParameter("ioOpTimeoutSec", ioOpTimeoutSec).withParameter("leaseRetries", leaseRetries).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 85 with StatusOnlyReturn

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

the class JsonRpcVdsServer method glusterVolumeGeoRepConfigSet.

@Override
public StatusOnlyReturn glusterVolumeGeoRepConfigSet(String volumeName, String slaveHost, String slaveVolumeName, String configKey, String configValue, String userName) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepConfigSet").withParameter("volumeName", volumeName).withParameter("remoteHost", slaveHost).withParameter("remoteVolumeName", slaveVolumeName).withParameter("optionName", configKey).withParameter("optionValue", configValue).withOptionalParameter("remoteUserName", userName).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