Search in sources :

Example 76 with RequestBuilder

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

the class JsonRpcIIrsServer method setVolumeDescription.

@Override
public StatusOnlyReturn setVolumeDescription(String sdUUID, String spUUID, String imgGUID, String volUUID, String description) {
    JsonRpcRequest request = new RequestBuilder("Volume.setDescription").withParameter("volumeID", volUUID).withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("imageID", imgGUID).withParameter("description", description).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 77 with RequestBuilder

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

the class JsonRpcIIrsServer method reconcileVolumeChain.

@Override
public VolumeListReturn reconcileVolumeChain(String spUUID, String sdUUID, String imgGUID, String leafVolUUID) {
    JsonRpcRequest request = new RequestBuilder("Image.reconcileVolumeChain").withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("imageID", imgGUID).withParameter("leafVolID", leafVolUUID).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("volumes").withResponseType(Object[].class);
    return new VolumeListReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) VolumeListReturn(org.ovirt.engine.core.vdsbroker.irsbroker.VolumeListReturn)

Example 78 with RequestBuilder

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

the class JsonRpcIIrsServer method updateVMInImportExport.

@SuppressWarnings("rawtypes")
@Override
public StatusOnlyReturn updateVMInImportExport(String spUUID, Map[] vms, String StorageDomainId) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.updateVMs").withParameter("storagepoolID", spUUID).withParameter("vmList", new ArrayList<>(Arrays.asList(vms))).withOptionalParameter("storagedomainID", StorageDomainId).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 79 with RequestBuilder

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

the class JsonRpcIIrsServer method moveImage.

@Override
public OneUuidReturn moveImage(String spUUID, String srcDomUUID, String dstDomUUID, String imgGUID, String vmGUID, int op, String postZero, Boolean discard, String force) {
    JsonRpcRequest request = new RequestBuilder("Image.move").withParameter("imageID", imgGUID).withParameter("storagepoolID", spUUID).withParameter("storagedomainID", srcDomUUID).withParameter("dstSdUUID", dstDomUUID).withParameter("operation", op).withParameter("postZero", postZero).withOptionalParameter("discard", discard).withParameter("force", force).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("uuid");
    return new OneUuidReturn(response);
}
Also used : JsonRpcRequest(org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest) RequestBuilder(org.ovirt.vdsm.jsonrpc.client.RequestBuilder) OneUuidReturn(org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn)

Example 80 with RequestBuilder

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

the class JsonRpcIIrsServer method upgradeStoragePool.

@Override
public StatusOnlyReturn upgradeStoragePool(String storagePoolId, String targetVersion) {
    JsonRpcRequest request = new RequestBuilder("StoragePool.upgrade").withParameter("storagepoolID", storagePoolId).withParameter("targetDomVersion", targetVersion).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