Search in sources :

Example 1 with GetVmsAndNetworkInterfacesByNetworkIdParameters

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

the class NetworkVmListModel method syncSearch.

@Override
protected void syncSearch() {
    if (getEntity() == null) {
        return;
    }
    GetVmsAndNetworkInterfacesByNetworkIdParameters params = new GetVmsAndNetworkInterfacesByNetworkIdParameters(getEntity().getId(), NetworkVmFilter.running.equals(getViewFilterType()));
    params.setRefresh(getIsQueryFirstTime());
    final NetworkVmFilter filter = getViewFilterType();
    Frontend.getInstance().runQuery(QueryType.GetVmsAndNetworkInterfacesByNetworkId, params, new AsyncQuery<QueryReturnValue>(returnValue -> {
        if (filter.equals(getViewFilterType())) {
            setItems((Collection<PairQueryable<VmNetworkInterface, VM>>) returnValue.getReturnValue());
        }
    }));
}
Also used : QueryType(org.ovirt.engine.core.common.queries.QueryType) ActionUtils(org.ovirt.engine.core.common.ActionUtils) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) VmNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface) Collection(java.util.Collection) UICommand(org.ovirt.engine.ui.uicommonweb.UICommand) HelpTag(org.ovirt.engine.ui.uicommonweb.help.HelpTag) ApplicationMode(org.ovirt.engine.core.common.mode.ApplicationMode) SearchableListModel(org.ovirt.engine.ui.uicommonweb.models.SearchableListModel) ArrayList(java.util.ArrayList) ActionType(org.ovirt.engine.core.common.action.ActionType) Frontend(org.ovirt.engine.ui.frontend.Frontend) List(java.util.List) VM(org.ovirt.engine.core.common.businessentities.VM) ConstantsManager(org.ovirt.engine.ui.uicompat.ConstantsManager) GetVmsAndNetworkInterfacesByNetworkIdParameters(org.ovirt.engine.core.common.queries.GetVmsAndNetworkInterfacesByNetworkIdParameters) PairQueryable(org.ovirt.engine.core.common.utils.PairQueryable) Comparator(java.util.Comparator) VMStatus(org.ovirt.engine.core.common.businessentities.VMStatus) PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs) NetworkView(org.ovirt.engine.core.common.businessentities.network.NetworkView) RemoveVmInterfaceModel(org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmInterfaceModel) QueryReturnValue(org.ovirt.engine.core.common.queries.QueryReturnValue) VmNetworkInterface(org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface) VM(org.ovirt.engine.core.common.businessentities.VM) Collection(java.util.Collection) GetVmsAndNetworkInterfacesByNetworkIdParameters(org.ovirt.engine.core.common.queries.GetVmsAndNetworkInterfacesByNetworkIdParameters)

Aggregations

ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 Comparator (java.util.Comparator)1 List (java.util.List)1 ActionUtils (org.ovirt.engine.core.common.ActionUtils)1 ActionType (org.ovirt.engine.core.common.action.ActionType)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 VMStatus (org.ovirt.engine.core.common.businessentities.VMStatus)1 NetworkView (org.ovirt.engine.core.common.businessentities.network.NetworkView)1 VmNetworkInterface (org.ovirt.engine.core.common.businessentities.network.VmNetworkInterface)1 ApplicationMode (org.ovirt.engine.core.common.mode.ApplicationMode)1 GetVmsAndNetworkInterfacesByNetworkIdParameters (org.ovirt.engine.core.common.queries.GetVmsAndNetworkInterfacesByNetworkIdParameters)1 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)1 QueryType (org.ovirt.engine.core.common.queries.QueryType)1 PairQueryable (org.ovirt.engine.core.common.utils.PairQueryable)1 Frontend (org.ovirt.engine.ui.frontend.Frontend)1 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)1 HelpTag (org.ovirt.engine.ui.uicommonweb.help.HelpTag)1 SearchableListModel (org.ovirt.engine.ui.uicommonweb.models.SearchableListModel)1 RemoveVmInterfaceModel (org.ovirt.engine.ui.uicommonweb.models.vms.RemoveVmInterfaceModel)1