Lior Vernia has uploaded a new change for review. Change subject: webadmin: Reset properties when detaching network ......................................................................
webadmin: Reset properties when detaching network Previously the underlying network interface entity's properties were not properly reset when a network was detached, regarding recently-added properties (QoS, custom properties). This is now fixed for custom properties. Change-Id: I37f3f1bc0cc3d5353c43d628fa3b24420728236c Bug-Url: https://bugzilla.redhat.com/1119019 Signed-off-by: Lior Vernia <lver...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NetworkParameters.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java 2 files changed, 8 insertions(+), 13 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/00/30500/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NetworkParameters.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NetworkParameters.java index be576e7..f938e89 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NetworkParameters.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NetworkParameters.java @@ -54,7 +54,7 @@ return customProperties; } - private void setCustomProperties(Map<String, String> customProperties) { + public void setCustomProperties(Map<String, String> customProperties) { this.customProperties = customProperties; } 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 6af4a54..42d8fa0 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 @@ -126,18 +126,12 @@ VdsNetworkInterface nicEntity = attachingNic.getEntity(); NetworkParameters netParams = new NetworkParameters(); - if (!hasVlan()) { - netParams.setBootProtocol(nicEntity.getBootProtocol()); - netParams.setAddress(nicEntity.getAddress()); - netParams.setSubnet(nicEntity.getSubnet()); - netParams.setGateway(nicEntity.getGateway()); - } else { - netParams.setBootProtocol(vlanNicModel.getEntity().getBootProtocol()); - netParams.setAddress(vlanNicModel.getEntity().getAddress()); - netParams.setSubnet(vlanNicModel.getEntity().getSubnet()); - netParams.setGateway(vlanNicModel.getEntity().getGateway()); - } - + VdsNetworkInterface detachedDevice = hasVlan() ? vlanNicModel.getEntity() : nicEntity; + netParams.setBootProtocol(detachedDevice.getBootProtocol()); + netParams.setAddress(detachedDevice.getAddress()); + netParams.setSubnet(detachedDevice.getSubnet()); + netParams.setGateway(detachedDevice.getGateway()); + netParams.setCustomProperties(detachedDevice.getCustomProperties()); getSetupModel().getNetworkToLastDetachParams().put(getName(), netParams); if (!hasVlan()) { @@ -146,6 +140,7 @@ nicEntity.setAddress(null); nicEntity.setSubnet(null); nicEntity.setGateway(null); + nicEntity.setCustomProperties(null); nicEntity.setNetworkImplementationDetails(null); } setVlanNicModel(null); -- To view, visit http://gerrit.ovirt.org/30500 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I37f3f1bc0cc3d5353c43d628fa3b24420728236c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Lior Vernia <lver...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches