Antoni Segura Puimedon has uploaded a new change for review. Change subject: fix setupNets 'remove' of non-existent net ......................................................................
fix setupNets 'remove' of non-existent net setupNetworks was assuming that if a net was not in vdsm nets nor in libvirt nets it was a net that we were trying to add when, in fact, it could very well be a non-existent network that was incorrectly marked for removal. The fix checks the case specified above and raises the same configNetworkError that delNetwork does on similar circumstances. Change-Id: If79c46cbc21c5bb451d69c2acd73f6e1ecf330bf Bug-url: https://bugzilla.redhat.com/977843 Signed-off-by: Antoni S. Puimedon <[email protected]> --- M vdsm/configNetwork.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/17254/1 diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index c0d31f2..f0c9f2c 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -506,6 +506,10 @@ if 'remove' in networkAttrs: del networks[network] del libvirt_nets[network] + elif 'remove' in networkAttrs: + raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, "Cannot delete " + "network %r: It doesn't exist in the " + "system" % network) else: networksAdded.add(network) -- To view, visit http://gerrit.ovirt.org/17254 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If79c46cbc21c5bb451d69c2acd73f6e1ecf330bf Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Antoni Segura Puimedon <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
