Search in sources :

Example 91 with RequestBuilder

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

the class JsonRpcVdsServer method glusterServicesList.

@Override
public GlusterServicesReturn glusterServicesList(Guid serverId, String[] serviceNames) {
    JsonRpcRequest request = new RequestBuilder("GlusterService.get").withParameter("serviceNames", new ArrayList<>(Arrays.asList(serviceNames))).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterServicesReturn(serverId, response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) ArrayList(java.util.ArrayList) GlusterServicesReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterServicesReturn)

Example 92 with RequestBuilder

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

the class JsonRpcVdsServer method hotplugMemory.

@Override
@SuppressWarnings("rawtypes")
public StatusOnlyReturn hotplugMemory(Map info) {
    JsonRpcRequest request = new RequestBuilder("VM.hotplugMemory").withParameter("vmID", getVmId(info)).withParameter("params", info).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 93 with RequestBuilder

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

the class JsonRpcVdsServer method glusterVolumeRebalanceStop.

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

Example 94 with RequestBuilder

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

the class JsonRpcVdsServer method getDevicesVisibility.

@Override
public DevicesVisibilityMapReturn getDevicesVisibility(String[] devicesList) {
    JsonRpcRequest request = new RequestBuilder("Host.getDevicesVisibility").withParameter("guidList", new ArrayList<>(Arrays.asList(devicesList))).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("visible");
    return new DevicesVisibilityMapReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) ArrayList(java.util.ArrayList) DevicesVisibilityMapReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.DevicesVisibilityMapReturn)

Example 95 with RequestBuilder

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

the class JsonRpcVdsServer method glusterVolumeProfileInfo.

@Override
public GlusterVolumeProfileInfoReturn glusterVolumeProfileInfo(Guid clusterId, String volumeName, boolean nfs) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.profileInfo").withParameter("volumeName", volumeName).withParameter("nfs", nfs).build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    return new GlusterVolumeProfileInfoReturn(clusterId, response);
}
Also used : GlusterVolumeProfileInfoReturn(org.ovirt.engine.core.vdsbroker.gluster.GlusterVolumeProfileInfoReturn) JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder)

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