Search in sources :

Example 16 with GetConfigurationValueParameters

use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getStorageDomainMaxNameLength.

public void getStorageDomainMaxNameLength(AsyncQuery<Integer> aQuery) {
    aQuery.converterCallback = new DefaultValueConverter<>(1);
    getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.StorageDomainNameSizeLimit, getDefaultConfigurationVersion()), aQuery);
}
Also used : GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)

Example 17 with GetConfigurationValueParameters

use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getClusterDesktopMemoryOverCommit.

public void getClusterDesktopMemoryOverCommit(AsyncQuery<Integer> aQuery) {
    aQuery.converterCallback = new DefaultValueConverter<>(0);
    getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.MaxVdsMemOverCommit, getDefaultConfigurationVersion()), aQuery);
}
Also used : GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)

Example 18 with GetConfigurationValueParameters

use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getPmTypeList.

public void getPmTypeList(AsyncQuery<List<String>> aQuery, Version version) {
    aQuery.converterCallback = source -> {
        ArrayList<String> list = new ArrayList<>();
        if (source != null) {
            // $NON-NLS-1$
            String[] array = ((String) source).split("[,]", -1);
            for (String item : array) {
                list.add(item);
            }
        }
        return list;
    };
    GetConfigurationValueParameters param = new GetConfigurationValueParameters(ConfigValues.VdsFenceType);
    param.setVersion(version != null ? version.toString() : getDefaultConfigurationVersion());
    Frontend.getInstance().runQuery(QueryType.GetFenceConfigurationValue, param, aQuery);
}
Also used : GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters) ArrayList(java.util.ArrayList)

Example 19 with GetConfigurationValueParameters

use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getSpiceUsbAutoShare.

public void getSpiceUsbAutoShare(AsyncQuery<Boolean> aQuery) {
    aQuery.converterCallback = new DefaultValueConverter<>(Boolean.TRUE);
    getConfigFromCache(new GetConfigurationValueParameters(ConfigValues.SpiceUsbAutoShare, getDefaultConfigurationVersion()), aQuery);
}
Also used : GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)

Example 20 with GetConfigurationValueParameters

use of org.ovirt.engine.core.common.queries.GetConfigurationValueParameters in project ovirt-engine by oVirt.

the class AsyncDataProvider method getMaxNumOfCPUsPerSocket.

public void getMaxNumOfCPUsPerSocket(AsyncQuery<Integer> aQuery, String version) {
    aQuery.converterCallback = new DefaultValueConverter<>(1);
    GetConfigurationValueParameters tempVar = new GetConfigurationValueParameters(ConfigValues.MaxNumOfCpuPerSocket);
    tempVar.setVersion(version);
    getConfigFromCache(tempVar, aQuery);
}
Also used : GetConfigurationValueParameters(org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)

Aggregations

GetConfigurationValueParameters (org.ovirt.engine.core.common.queries.GetConfigurationValueParameters)25 ArrayList (java.util.ArrayList)4 ConfigValues (org.ovirt.engine.core.common.config.ConfigValues)3 ServletException (javax.servlet.ServletException)2 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)2 IOException (java.io.IOException)1 MalformedURLException (java.net.MalformedURLException)1 Collections (java.util.Collections)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Locale (java.util.Locale)1 RequestDispatcher (javax.servlet.RequestDispatcher)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 CreateBrickParameters (org.ovirt.engine.core.common.action.gluster.CreateBrickParameters)1 SyncGlusterStorageDevicesParameter (org.ovirt.engine.core.common.action.gluster.SyncGlusterStorageDevicesParameter)1 RaidType (org.ovirt.engine.core.common.businessentities.RaidType)1 VDS (org.ovirt.engine.core.common.businessentities.VDS)1 VDSStatus (org.ovirt.engine.core.common.businessentities.VDSStatus)1 StorageDevice (org.ovirt.engine.core.common.businessentities.gluster.StorageDevice)1