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) {
JsonRpcRequest request = new RequestBuilder("VM.shutdown").withParameter("vmID", vmId).withOptionalParameter("delay", timeout).withOptionalParameter("message", message).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumeHealInfo.
@Override
public GlusterVolumesHealInfoReturn glusterVolumeHealInfo(String volumeName) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.healInfo").withParameter("volumeName", volumeName).build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new GlusterVolumesHealInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumeRemoveBrickStatus.
@Override
public GlusterVolumeTaskReturn glusterVolumeRemoveBrickStatus(String volumeName, String[] bricksList) {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.removeBrickStatus").withParameter("volumeName", volumeName).withParameter("brickList", new ArrayList<>(Arrays.asList(bricksList))).build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new GlusterVolumeTaskReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method fenceNode.
@Override
public FenceStatusReturn fenceNode(String ip, String port, String type, String user, String password, String action, String secured, String options, Map<String, Object> fencingPolicy) {
JsonRpcRequest request = new RequestBuilder("Host.fenceNode").withParameter("addr", ip).withParameter("port", port).withParameter("agent", type).withParameter("username", user).withParameter("password", password).withParameter("action", action).withOptionalParameter("secure", secured).withOptionalParameter("options", options).withOptionalParameterAsMap("policy", fencingPolicy).build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new FenceStatusReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.RequestBuilder in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method getLldp.
@Override
public LldpReturn getLldp(String[] interfaces) {
Map<String, Object> filter = new HashMap<>();
filter.put("devices", interfaces);
JsonRpcRequest request = new RequestBuilder("Host.getLldp").withParameter("filter", filter).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new LldpReturn(response);
}
Aggregations