Search in sources :

Example 41 with RequestBuilder

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

the class JsonRpcVdsServer method glusterHookRemove.

@Override
public StatusOnlyReturn glusterHookRemove(String glusterCommand, String stage, String hookName) {
    JsonRpcRequest request = new RequestBuilder("GlusterHook.remove").withParameter("glusterCmd", glusterCommand).withParameter("hookLevel", stage).withParameter("hookName", hookName).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 42 with RequestBuilder

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

the class JsonRpcVdsServer method glusterVolumeProfileStart.

@Override
public StatusOnlyReturn glusterVolumeProfileStart(String volumeName) {
    JsonRpcRequest request = new RequestBuilder("GlusterVolume.profileStart").withParameter("volumeName", volumeName).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 43 with RequestBuilder

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

the class JsonRpcVdsServer method diskSizeExtend.

@Override
public ImageSizeReturn diskSizeExtend(String vmId, Map<String, String> diskParams, String newSize) {
    JsonRpcRequest request = new RequestBuilder("VM.diskSizeExtend").withParameter("vmID", vmId).withParameter("driveSpecs", diskParams).withParameter("newSize", newSize).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("size");
    return new ImageSizeReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) ImageSizeReturn(org.ovirt.engine.core.vdsbroker.vdsbroker.ImageSizeReturn)

Example 44 with RequestBuilder

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

the class JsonRpcVdsServer method sparsifyVolume.

@Override
public StatusOnlyReturn sparsifyVolume(String jobId, Map<String, Object> volumeAddress) {
    JsonRpcRequest request = new RequestBuilder("SDM.sparsify_volume").withParameter("job_id", jobId).withParameter("vol_info", volumeAddress).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 45 with RequestBuilder

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

the class JsonRpcVdsServer method hotplugDisk.

@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn hotplugDisk(Map info) {
    JsonRpcRequest request = new RequestBuilder("VM.hotplugDisk").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)

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