Search in sources :

Example 1 with OneUuidReturn

use of org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method spmStart.

@Override
public OneUuidReturn spmStart(String spUUID, int prevID, String prevLVER, int recoveryMode, String SCSIFencing, int maxHostId, String storagePoolFormatType) {
    // storagePoolFormatType not used and can be removed from the interface
    JsonRpcRequest request = new RequestBuilder("StoragePool.spmStart").withParameter("storagepoolID", spUUID).withParameter("prevID", prevID).withParameter("prevLver", prevLVER).withParameter("enableScsiFencing", SCSIFencing).withParameter("maxHostID", maxHostId).withOptionalParameter("domVersion", storagePoolFormatType).build();
    Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("uuid").withResponseType(String.class);
    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 2 with OneUuidReturn

use of org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn in project ovirt-engine by oVirt.

the class JsonRpcVdsServer method glusterHostUUIDGet.

@Override
public OneUuidReturn glusterHostUUIDGet() {
    JsonRpcRequest request = new RequestBuilder("GlusterHost.uuid").build();
    Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
    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 3 with OneUuidReturn

use of org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method uploadImage.

@SuppressWarnings("rawtypes")
@Override
public OneUuidReturn uploadImage(Map methodInfo, String spUUID, String sdUUID, String srcImgGUID, String srcVolUUID) {
    JsonRpcRequest request = new RequestBuilder("Image.upload").withParameter("methodArgs", methodInfo).withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("imageID", srcImgGUID).withParameter("volumeID", srcVolUUID).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 4 with OneUuidReturn

use of org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method mergeSnapshots.

@Override
public OneUuidReturn mergeSnapshots(String sdUUID, String spUUID, String vmGUID, String imgGUID, String ancestorUUID, String successorUUID, String postZero, Boolean discard) {
    // vmGUID not used and can be removed from the interface
    JsonRpcRequest request = new RequestBuilder("Image.mergeSnapshots").withParameter("imageID", imgGUID).withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("ancestor", ancestorUUID).withParameter("successor", successorUUID).withParameter("postZero", postZero).withOptionalParameter("discard", discard).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 5 with OneUuidReturn

use of org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn in project ovirt-engine by oVirt.

the class JsonRpcIIrsServer method extendVolumeSize.

@Override
public OneUuidReturn extendVolumeSize(String spUUID, String sdUUID, String imageUUID, String volumeUUID, String newSize) {
    JsonRpcRequest request = new RequestBuilder("Volume.extendSize").withParameter("storagepoolID", spUUID).withParameter("storagedomainID", sdUUID).withParameter("imageID", imageUUID).withParameter("volumeID", volumeUUID).withParameter("newSize", newSize).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)

Aggregations

OneUuidReturn (org.ovirt.engine.core.vdsbroker.irsbroker.OneUuidReturn)19 JsonRpcRequest (org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest)19 RequestBuilder (org.ovirt.vdsm.jsonrpc.client.RequestBuilder)18 ArrayList (java.util.ArrayList)1 ObjectMapper (org.codehaus.jackson.map.ObjectMapper)1 Test (org.junit.Test)1 JsonRpcClient (org.ovirt.vdsm.jsonrpc.client.JsonRpcClient)1 JsonRpcResponse (org.ovirt.vdsm.jsonrpc.client.JsonRpcResponse)1