use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterVolumeRemoveBricksStart.
@Override
public GlusterTaskInfoReturn glusterVolumeRemoveBricksStart(String volumeName, String[] brickList, int replicaCount, Boolean forceRemove) {
String command = "GlusterVolume.removeBrickStart";
if (forceRemove) {
command = "GlusterVolume.removeBrickForce";
}
JsonRpcRequest request = new RequestBuilder(command).withParameter("volumeName", volumeName).withParameter("brickList", new ArrayList<>(Arrays.asList(brickList))).withParameter("replicaCount", replicaCount).build();
Map<String, Object> response = new FutureMap(this.client, request).withIgnoreResponseKey();
return new GlusterTaskInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method remove_image_ticket.
@Override
public StatusOnlyReturn remove_image_ticket(String ticketId) {
JsonRpcRequest request = new RequestBuilder("Host.remove_image_ticket").withParameter("uuid", ticketId).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method glusterGeoRepKeysGet.
@Override
public GlusterHostsPubKeyReturn glusterGeoRepKeysGet() {
JsonRpcRequest request = new RequestBuilder("GlusterVolume.geoRepKeysGet").build();
Map<String, Object> response = new FutureMap(this.client, request);
return new GlusterHostsPubKeyReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcVdsServer method getHardwareInfo.
@Override
public VDSInfoReturn getHardwareInfo() {
JsonRpcRequest request = new RequestBuilder("Host.getHardwareInfo").build();
Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("info");
return new VDSInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest 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);
}
Aggregations