Search in sources :

Example 1 with GetDeviceCustomPropertiesParameters

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

the class VnicProfileModel method initCustomPropertySheet.

private void initCustomPropertySheet(Version dcCompatibilityVersion) {
    if (!customPropertiesVisible) {
        return;
    }
    GetDeviceCustomPropertiesParameters params = new GetDeviceCustomPropertiesParameters();
    params.setVersion(dcCompatibilityVersion);
    params.setDeviceType(VmDeviceGeneralType.INTERFACE);
    startProgress();
    Frontend.getInstance().runQuery(QueryType.GetDeviceCustomProperties, params, new AsyncQuery<QueryReturnValue>(returnValue -> {
        if (returnValue != null) {
            Map<String, String> customPropertiesList = returnValue.getReturnValue();
            getCustomPropertySheet().setKeyValueMap(customPropertiesList);
            getCustomPropertySheet().setIsChangeable(!customPropertiesList.isEmpty());
            initCustomProperties();
        }
        stopProgress();
    }));
}
Also used : SearchType(org.ovirt.engine.core.common.interfaces.SearchType) NotEmptyValidation(org.ovirt.engine.ui.uicommonweb.validation.NotEmptyValidation) StoragePool(org.ovirt.engine.core.common.businessentities.StoragePool) QueryType(org.ovirt.engine.core.common.queries.QueryType) Arrays(java.util.Arrays) NetworkQoS(org.ovirt.engine.core.common.businessentities.network.NetworkQoS) Guid(org.ovirt.engine.core.compat.Guid) GetDeviceCustomPropertiesParameters(org.ovirt.engine.core.common.queries.GetDeviceCustomPropertiesParameters) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue) SearchableListModel(org.ovirt.engine.ui.uicommonweb.models.SearchableListModel) ActionParametersBase(org.ovirt.engine.core.common.action.ActionParametersBase) IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) ArrayList(java.util.ArrayList) VmDeviceGeneralType(org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) ActionType(org.ovirt.engine.core.common.action.ActionType) Frontend(org.ovirt.engine.ui.frontend.Frontend) Map(java.util.Map) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) Network(org.ovirt.engine.core.common.businessentities.network.Network) Version(org.ovirt.engine.core.compat.Version) AsyncDataProvider(org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider) Model(org.ovirt.engine.ui.uicommonweb.models.Model) SearchParameters(org.ovirt.engine.core.common.queries.SearchParameters) NetworkFilter(org.ovirt.engine.core.common.businessentities.network.NetworkFilter) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) Linq(org.ovirt.engine.ui.uicommonweb.Linq) IValidation(org.ovirt.engine.ui.uicommonweb.validation.IValidation) Collection(java.util.Collection) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) VnicProfile(org.ovirt.engine.core.common.businessentities.network.VnicProfile) ListModel(org.ovirt.engine.ui.uicommonweb.models.ListModel) BusinessEntitiesDefinitions(org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions) VersionQueryParameters(org.ovirt.engine.core.common.action.VersionQueryParameters) NetworkQoSModel(org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkQoSModel) VnicProfileParameters(org.ovirt.engine.core.common.action.VnicProfileParameters) Objects(java.util.Objects) List(java.util.List) KeyValueModel(org.ovirt.engine.ui.uicommonweb.models.vms.key_value.KeyValueModel) UIConstants(org.ovirt.engine.ui.uicompat.UIConstants) LengthValidation(org.ovirt.engine.ui.uicommonweb.validation.LengthValidation) GetDeviceCustomPropertiesParameters(org.ovirt.engine.core.common.queries.GetDeviceCustomPropertiesParameters) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) Map(java.util.Map)

Aggregations

ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 List (java.util.List)1 Map (java.util.Map)1 Objects (java.util.Objects)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 VersionQueryParameters (org.ovirt.engine.core.common.action.VersionQueryParameters)1 VnicProfileParameters (org.ovirt.engine.core.common.action.VnicProfileParameters)1 BusinessEntitiesDefinitions (org.ovirt.engine.core.common.businessentities.BusinessEntitiesDefinitions)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 VmDeviceGeneralType (org.ovirt.engine.core.common.businessentities.VmDeviceGeneralType)1 Network (org.ovirt.engine.core.common.businessentities.network.Network)1 NetworkFilter (org.ovirt.engine.core.common.businessentities.network.NetworkFilter)1 NetworkQoS (org.ovirt.engine.core.common.businessentities.network.NetworkQoS)1 VnicProfile (org.ovirt.engine.core.common.businessentities.network.VnicProfile)1 SearchType (org.ovirt.engine.core.common.interfaces.SearchType)1 GetDeviceCustomPropertiesParameters (org.ovirt.engine.core.common.queries.GetDeviceCustomPropertiesParameters)1