Search in sources :

Example 1 with GlusterTaskInfoReturn

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

the class JsonRpcVdsServer method glusterVolumeRemoveBricksStart.

@Override
public GlusterTaskInfoReturn glusterVolumeRemoveBricksStart(String volumeName, String[] brickList, int replicaCount, Boolean forceRemove) {
    String command = "GlusterVolume.removeBrickStart";
    if (forceRemove) {
        command = "GlusterVolume.removeBrickForce";
    }
    JsonRpcRequest request = new RequestBuilder(command).withParameter("volumeName", volumeName).withParameter("brickList", new ArrayList<>(Arrays.asList(brickList))).withParameter("replicaCount", replicaCount).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterTaskInfoReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) GlusterTaskInfoReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturn)

Example 2 with GlusterTaskInfoReturn

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

the class JsonRpcVdsServer method glusterVolumeRebalanceStart.

@Override
public GlusterTaskInfoReturn glusterVolumeRebalanceStart(String volumeName, Boolean fixLayoutOnly, Boolean force) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.rebalanceStart").withParameter("volumeName", volumeName).withParameter("rebalanceType", fixLayoutOnly).withParameter("force", force).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterTaskInfoReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) GlusterTaskInfoReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturn)

Aggregations

GlusterTaskInfoReturn (org.ovirt.engine.core.vdsbroker.gluster.GlusterTaskInfoReturn)2 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)2 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)2