Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Don't attach external networks to NIC by label
......................................................................

webadmin: Don't attach external networks to NIC by label

External networks shouldn't be statically attached to a host's
interface, neither manually nor by label.

Change-Id: I202843bce1635facda3228855e8b2569370e4ed6
Bug-Url: https://bugzilla.redhat.com/1059233
Signed-off-by: Lior Vernia <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/57/23857/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
index d005081..d4924f0 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java
@@ -608,12 +608,14 @@
             LogicalNetworkModel networkModel = new 
LogicalNetworkModel(network, this);
             networkModels.put(network.getName(), networkModel);
 
-            NetworkLabelModel labelModel = labelMap.get(network.getLabel());
-            if (labelModel == null) {
-                labelModel = new NetworkLabelModel(network.getLabel(), this);
-                labelMap.put(network.getLabel(), labelModel);
+            if (!network.isExternal()) {
+                NetworkLabelModel labelModel = 
labelMap.get(network.getLabel());
+                if (labelModel == null) {
+                    labelModel = new NetworkLabelModel(network.getLabel(), 
this);
+                    labelMap.put(network.getLabel(), labelModel);
+                }
+                labelModel.getNetworks().add(networkModel);
             }
-            labelModel.getNetworks().add(networkModel);
         }
         setNetworks(networkModels);
     }


-- 
To view, visit http://gerrit.ovirt.org/23857
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I202843bce1635facda3228855e8b2569370e4ed6
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to