use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getNetworkConnectivityCheckTimeoutInSeconds.
public void getNetworkConnectivityCheckTimeoutInSeconds(AsyncQuery<Integer> aQuery) {
aQuery.converterCallback = new DefaultValueConverter<>(120);
getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.NetworkConnectivityCheckTimeoutInSeconds, getDefaultConfigurationVersion()), aQuery);
}
use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getMaxNumOfVmCpus.
public void getMaxNumOfVmCpus(AsyncQuery<Integer> aQuery, String version) {
aQuery.converterCallback = new DefaultValueConverter<>(1);
GetConfigurationValueParameters tempVar = new GetConfigurationValueParameters(ConfigValues.MaxNumOfVmCpus);
tempVar.setVersion(version);
getConfigFromCache(tempVar, aQuery);
}
use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getMaxNumOfThreadsPerCpu.
public void getMaxNumOfThreadsPerCpu(AsyncQuery<Integer> aQuery, String version) {
aQuery.converterCallback = new DefaultValueConverter<>(1);
GetConfigurationValueParameters tempVar = new GetConfigurationValueParameters(ConfigValues.MaxNumOfThreadsPerCpu);
tempVar.setVersion(version);
getConfigFromCache(tempVar, aQuery);
}
use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.
the class AsyncDataProvider method getWANDisableEffects.
public void getWANDisableEffects(AsyncQuery<List<WanDisableEffects>> aQuery) {
aQuery.converterCallback = source -> {
if (source == null) {
return new ArrayList<>();
}
List<WanDisableEffects> res = new ArrayList<>();
String fromDb = (String) source;
for (String value : fromDb.split(",")) {
// $NON-NLS-1$
if (value == null) {
continue;
}
String trimmedValue = value.trim();
if ("".equals(trimmedValue)) {
continue;
}
res.add(WanDisableEffects.fromString(trimmedValue));
}
return res;
};
getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.WANDisableEffects, getDefaultConfigurationVersion()), aQuery);
}
use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.
the class HostGlusterStorageDevicesListModel method createBrick.
private void createBrick() {
if (getWindow() != null) {
return;
}
VDS host = getEntity();
if (host == null) {
return;
}
final CreateBrickModel lvModel = new CreateBrickModel();
lvModel.setTitle(ConstantsManager.getInstance().getConstants().createBrick());
lvModel.setHelpTag(HelpTag.create_brick);
// $NON-NLS-1$
lvModel.setHashName("create_brick");
lvModel.startProgress(ConstantsManager.getInstance().getConstants().fetchingDataMessage());
setWindow(lvModel);
lvModel.getRaidTypeList().setSelectedItem(RaidType.RAID6);
List<StorageDevice> selectedDevices = getSelectedItems();
lvModel.getStorageDevices().setItems(selectedDevices);
lvModel.setSelectedDevices(selectedDevices);
AsyncQuery<String> asyncQueryForDefaultMountPoint = lvModel.asyncQuery(defaultMountPoint -> {
lvModel.stopProgress();
lvModel.getDefaultMountFolder().setEntity(defaultMountPoint);
});
AsyncDataProvider.getInstance().getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.GlusterDefaultBrickMountPoint, AsyncDataProvider.getInstance().getDefaultConfigurationVersion()), asyncQueryForDefaultMountPoint);
AsyncDataProvider.getInstance().getStorageDevices(new AsyncQuery<>(returnValue -> {
if (returnValue != null) {
List<StorageDevice> storageDeviceList = new ArrayList<>();
// $NON-NLS-1$
storageDeviceList.add(null);
for (StorageDevice storagedevice : returnValue) {
if (storagedevice.getCanCreateBrick() && !selectedDevices.contains(storagedevice)) {
storageDeviceList.add(storagedevice);
}
}
lvModel.getCacheDevicePathTypeList().setItems(storageDeviceList);
}
}), host.getId());
// $NON-NLS-1$
UICommand okCommand = UICommand.createDefaultOkUiCommand("onCreateBrick", this);
lvModel.getCommands().add(okCommand);
// $NON-NLS-1$
UICommand cancelCommand = UICommand.createCancelUiCommand("closeWindow", this);
lvModel.getCommands().add(cancelCommand);
}
Aggregations