use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest 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);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method getVmLeaseInfo.
@Override
public LeaseInfoReturn getVmLeaseInfo(String leaseUUID, String sdUUID) {
HashMap<String, Object> leaseDict = new HashMap<>();
leaseDict.put("lease_id", leaseUUID);
leaseDict.put("sd_id", sdUUID);
JsonRpcRequest request = new RequestBuilder("Lease.info").withParameter("lease", leaseDict).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new LeaseInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method setStorageDomainDescription.
@Override
public StatusOnlyReturn setStorageDomainDescription(String sdUUID, String description) {
JsonRpcRequest request = new RequestBuilder("StorageDomain.setDescription").withParameter("storagedomainID", sdUUID).withParameter("description", description).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 JsonRpcIIrsServer method getIrsStats.
@Override
public IrsStatsAndStatus getIrsStats() {
JsonRpcRequest request = new RequestBuilder("Host.getStorageRepoStats").build();
Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("stats");
return new IrsStatsAndStatus(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest 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);
}
Aggregations