use of org.ovirt.engine.ui.webadmin.section.main.view.popup.host.panels.NetworkPanel in project ovirt-engine by oVirt.
the class HostSetupNetworksPopupView method updateNetworks.
private void updateNetworks(List<LogicalNetworkModel> allNetworks) {
internalNetworkList.clear();
externalNetworkList.clear();
Collections.sort(allNetworks);
List<NetworkPanel> staticNetworkPanels = new ArrayList<>();
List<NetworkPanel> dynamicNetworkPanels = new ArrayList<>();
for (LogicalNetworkModel network : allNetworks) {
if (network.getNetwork().isExternal()) {
dynamicNetworkPanels.add(new ExternalNetworkPanel(network, style));
} else if (!network.isAttached()) {
staticNetworkPanels.add(new InternalNetworkPanel(network, style));
}
}
internalNetworkList.addAll(staticNetworkPanels, !rendered);
externalNetworkList.addAll(dynamicNetworkPanels, !rendered);
}
Aggregations