Alona Kaplan has uploaded a new change for review. Change subject: webadmin: Setup Network- doesn't show the correct boot protocol. ......................................................................
webadmin: Setup Network- doesn't show the correct boot protocol. The fix in commit 30f20efd648a1329c996f5c12f31741038bdc0be caused another bug. The attach method is used not only for manually attaching but also in the init dialog process. That's why the boot protocol was always set to the default values ("dhcp" for management and "none" for the others) and never showed the real values. The boot protocol should be reseted to the default values just if the current boot protocol is null. Change-Id: I40fe51b46f94bdfa27270c9e5dcd94074b881c03 Bug-Url:https://bugzilla.redhat.com/875724 Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java 1 file changed, 12 insertions(+), 9 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/52/9752/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java index 07bea25..c23a406 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java @@ -54,12 +54,13 @@ targetNic.getEntity().setSubnet(netParams.getSubnet()); targetNic.getEntity().setGateway(netParams.getGateway()); } else { - if (!isManagement()) { - targetNic.getEntity().setBootProtocol(NetworkBootProtocol.None); - } else { - targetNic.getEntity().setBootProtocol(NetworkBootProtocol.Dhcp); + if (targetNic.getEntity().getBootProtocol() == null) { + if (!isManagement()) { + targetNic.getEntity().setBootProtocol(NetworkBootProtocol.None); + } else { + targetNic.getEntity().setBootProtocol(NetworkBootProtocol.Dhcp); + } } - } } @@ -88,10 +89,12 @@ bridge.setSubnet(netParams.getSubnet()); bridge.setGateway(netParams.getGateway()); } else { - if (!isManagement()) { - bridge.setBootProtocol(NetworkBootProtocol.None); - } else { - bridge.setBootProtocol(NetworkBootProtocol.Dhcp); + if (bridge.getBootProtocol() == null) { + if (!isManagement()) { + bridge.setBootProtocol(NetworkBootProtocol.None); + } else { + bridge.setBootProtocol(NetworkBootProtocol.Dhcp); + } } } return bridge; -- To view, visit http://gerrit.ovirt.org/9752 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I40fe51b46f94bdfa27270c9e5dcd94074b881c03 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches