Search in sources :

Example 31 with RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method glusterSnapshotDeactivate.

@Override
public StatusOnlyReturn glusterSnapshotDeactivate(String snapshotName) {
    JsonRpcRequest request = new RequestBuilder("GlusterSnapshot.deactivate").withParameter("snapName", snapshotName).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 RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method diskReplicateStart.

@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn diskReplicateStart(String vmUUID, Map srcDisk, Map dstDisk) {
    JsonRpcRequest request = new RequestBuilder("VM.diskReplicateStart").withParameter("vmID", vmUUID).withParameter("srcDisk", srcDisk).withParameter("dstDisk", dstDisk).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 RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method isolateVolume.

@Override
public StatusOnlyReturn isolateVolume(String sdUUID, String srcImageID, String dstImageID, String volumeID) {
    JsonRpcRequest request = new RequestBuilder("SDM.isolateVolume").withParameter("storagedomainID", sdUUID).withParameter("srcImageID", srcImageID).withParameter("dstImageID", dstImageID).withParameter("volumeID", volumeID).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 RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method shutdown.

@Override
public StatusOnlyReturn shutdown(String vmId, String timeout, String message, boolean reboot) {
    JsonRpcRequest request = new RequestBuilder("VM.shutdown").withParameter("vmID", vmId).withOptionalParameter("delay", timeout).withOptionalParameter("message", message).withParameter("reboot", reboot).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 RequestBuilder

use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method glusterVolumeResetBrickCommitForce.

@Override
public StatusOnlyReturn glusterVolumeResetBrickCommitForce(String volumeName, String existingBrickDir) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.resetBrickCommitForce").withParameter("volumeName", volumeName).withParameter("existingBrick", existingBrickDir).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

JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)223 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)223 StatusOnlyReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturn)117 OneUuidReturn (org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn)18 ArrayList (java.util.ArrayList)8 HashMap (java.util.HashMap)7 OneVmReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.OneVmReturn)5 GlusterVolumeTaskReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeTaskReturn)4 ServerConnectionStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.ServerConnectionStatusReturn)4 GlusterVolumeStatusReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeStatusReturn)3 StatusReturn (org.ovirt.engine.core.vdsbroker.irsbroker.StatusReturn)3 FenceStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.FenceStatusReturn)3 MigrateStatusReturn (org.ovirt.engine.core.vdsbroker.vdsbroker.MigrateStatusReturn)3 Map (java.util.Map)2 FutureTask (java.util.concurrent.FutureTask)2 GlusterServicesReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)2 GlusterTaskInfoReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturn)2 GlusterVolumeGeoRepStatus (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeGeoRepStatus)2 GlusterVolumesListReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumesListReturn)2 StoragePoolInfo (org.ovirt.engine.core.vdsbroker.irsbroker.StoragePoolInfo)2