use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method hotUnplugNic.
@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn hotUnplugNic(Map info) {
JsonRpcRequest request = new RequestBuilder("VM.hotunplugNic").withParameter("vmID", getVmId(info)).withParameter("params", info).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumeGeoRepSessionResume.
@Override
public StatusOnlyReturn glusterVolumeGeoRepSessionResume(String volumeName, String slaveHostName, String slaveVolumeName, String userName, boolean force) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepSessionResume").withParameter("volumeName", volumeName).withParameter("remoteHost", slaveHostName).withParameter("remoteVolumeName", slaveVolumeName).withOptionalParameter("remoteUserName", userName).withParameter("force", force).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumesList.
@Override
public GlusterVolumesListReturn glusterVolumesList(Guid clusterId) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.list").build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new GlusterVolumesListReturn(clusterId, response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumeBrickAdd.
@Override
public StatusOnlyReturn glusterVolumeBrickAdd(String volumeName, String[] bricks, int replicaCount, int stripeCount, boolean force) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.addBrick").withParameter("volumeName", volumeName).withParameter("brickList", new ArrayList<>(Arrays.asList(bricks))).withParameter("replicaCount", replicaCount).withParameter("stripeCount", stripeCount).withParameter("force", force).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterHooksList.
@Override
public GlusterHooksListReturn glusterHooksList() {
JsonRpcRequest request = new RequestBuilder("GlusterHook.list").build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new GlusterHooksListReturn(response);
}
Aggregations