Lior Vernia has uploaded a new change for review. Change subject: webadmin: Improved boot protocol behavior in host network dialog ......................................................................
webadmin: Improved boot protocol behavior in host network dialog It used to be that if the address/subnet/gateway fields were edited, they would be committed to the VdsNetworkInterface upon pressing OK even if the chosen boot protocol was for example NONE, in which case it would be expected that these fields wouldn't be committed. So now changes are committed only if the chosen boot protocol is IP_STATIC. Change-Id: I76f3f8d5c3f214927761effa571ca23f2e6c239c Bug-Url: https://bugzilla.redhat.com/989360 Signed-off-by: Lior Vernia <lver...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostSetupNetworksModel.java 1 file changed, 10 insertions(+), 6 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/20346/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 055bf7c..71b2f2b 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 @@ -293,9 +293,11 @@ return; } entity.setBootProtocol(mgmntDialogModel.getBootProtocol()); - entity.setAddress((String) mgmntDialogModel.getAddress().getEntity()); - entity.setSubnet((String) mgmntDialogModel.getSubnet().getEntity()); - entity.setGateway((String) mgmntDialogModel.getGateway().getEntity()); + if (mgmntDialogModel.getIsStaticAddress()) { + entity.setAddress((String) mgmntDialogModel.getAddress().getEntity()); + entity.setSubnet((String) mgmntDialogModel.getSubnet().getEntity()); + entity.setGateway((String) mgmntDialogModel.getGateway().getEntity()); + } if ((Boolean) mgmntDialogModel.getIsToSync().getEntity()) { HostSetupNetworksModel.this.networksToSync.add(logicalNetwork.getName()); @@ -344,9 +346,11 @@ return; } entity.setBootProtocol(networkDialogModel.getBootProtocol()); - entity.setAddress((String) networkDialogModel.getAddress().getEntity()); - entity.setSubnet((String) networkDialogModel.getSubnet().getEntity()); - entity.setGateway((String) networkDialogModel.getGateway().getEntity()); + if (networkDialogModel.getIsStaticAddress()) { + entity.setAddress((String) networkDialogModel.getAddress().getEntity()); + entity.setSubnet((String) networkDialogModel.getSubnet().getEntity()); + entity.setGateway((String) networkDialogModel.getGateway().getEntity()); + } if ((Boolean) networkDialogModel.getIsToSync().getEntity()) { HostSetupNetworksModel.this.networksToSync.add(logicalNetwork.getName()); -- To view, visit http://gerrit.ovirt.org/20346 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I76f3f8d5c3f214927761effa571ca23f2e6c239c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Lior Vernia <lver...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches