use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest 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);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method getVmsInfo.
@Override
public GetVmsInfoReturn getVmsInfo(String storagePoolId, String storageDomainId, String[] VMIDList) {
JsonRpcRequest request = new RequestBuilder("StoragePool.getBackedUpVmsInfo").withParameter("storagepoolID", storagePoolId).withParameter("storagedomainID", storageDomainId).withParameter("vmList", new ArrayList<>(Arrays.asList(VMIDList))).build();
Map<String, Object> response = new FutureMap(this.client, request).withResponseKey("vmlist");
return new GetVmsInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method setVolumeLegality.
@Override
public StatusReturn setVolumeLegality(String spID, String sdID, String imageID, String volumeID, String legality) {
JsonRpcRequest request = new RequestBuilder("Volume.setLegality").withParameter("storagepoolID", spID).withParameter("storagedomainID", sdID).withParameter("imageID", imageID).withParameter("volumeID", volumeID).withParameter("legality", legality).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method addVmLease.
@Override
public VmLeaseTaskInfoReturn addVmLease(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.create").withParameter("lease", leaseDict).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new VmLeaseTaskInfoReturn(response);
}
use of org.ovirt.vdsm.jsonrpc.client.JsonRpcRequest in project ovirt-engine by oVirt.
the class JsonRpcIIrsServer method destroyStoragePool.
@Override
public StatusOnlyReturn destroyStoragePool(String spUUID, int hostSpmId, String SCSIKey) {
JsonRpcRequest request = new RequestBuilder("StoragePool.destroy").withParameter("storagepoolID", spUUID).withParameter("hostID", hostSpmId).withParameter("scsiKey", SCSIKey).build();
Map<String, Object> response = new FutureMap(this.client, request);
return new StatusOnlyReturn(response);
}
Aggregations