Alona Kaplan has uploaded a new change for review. Change subject: webadmin: [SetupNetworks] detach unmanaged net causes NPE (#848354) ......................................................................
webadmin: [SetupNetworks] detach unmanaged net causes NPE (#848354) https://bugzilla.redhat.com/848354 Fixing bug 848354- caused NPE when detching unmanaged network. The fix was- that when detaching unsync network the is_vm, vlan-id, and mtu parameters should be set to the values defined in the dc logical network level. The problem is that unmanaged network also marked as unsync. And on detach it just have to be deleted, no need to set the dc parameters. Change-Id: Ic63105d7e352845d795fd99f4099c812723bca6e Signed-off-by: Alona Kaplan <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/network/LogicalNetworkModel.java 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/69/7669/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 4fbad3c..10c33e8 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 @@ -91,7 +91,7 @@ } public void detach() { - if (!isInSync()){ + if (!isInSync() && isManaged()){ getSetupModel().getNetworksToSync().add(getName()); setNetworkToDcValues(); } @@ -139,9 +139,12 @@ private void setNetworkToDcValues() { DcNetworkParams dcNetParams = getSetupModel().getNetDcParams(getName()); - getEntity().setvlan_id(dcNetParams.getVlanId()); - getEntity().setMtu(dcNetParams.getMtu()); - getEntity().setVmNetwork(dcNetParams.isVmNetwork()); + + if (dcNetParams != null){ + getEntity().setvlan_id(dcNetParams.getVlanId()); + getEntity().setMtu(dcNetParams.getMtu()); + getEntity().setVmNetwork(dcNetParams.isVmNetwork()); + } } -- To view, visit http://gerrit.ovirt.org/7669 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic63105d7e352845d795fd99f4099c812723bca6e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
