Ido Barkan has uploaded a new change for review.
Change subject: do not delete networks from parameters ......................................................................
do not delete networks from parameters
Change-Id: I546c7f196f4b6bdace528a0cbbe6cfe5a212bfe1 Signed-off-by: ibarkan ibarkan@redhat.com --- M vdsm/network/api.py 1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/35690/1
diff --git a/vdsm/network/api.py b/vdsm/network/api.py index 434ce3d..6843789 100755 --- a/vdsm/network/api.py +++ b/vdsm/network/api.py @@ -668,6 +668,10 @@
logger.debug("Applying...") with ConfiguratorClass(options.get('_inRollback', False)) as configurator: + networks_to_add = dict( + (net, attributes) + for net, attributes in networks.iteritems() + if 'remove' not in attributes) # Remove edited networks and networks with 'remove' attribute for network, attrs in networks.items(): if network in _netinfo.networks: @@ -675,7 +679,6 @@ delNetwork(network, configurator=configurator, force=force, implicitBonding=False, _netinfo=_netinfo) if 'remove' in attrs: - del networks[network] del libvirt_nets[network] _netinfo.updateDevices() del _netinfo.networks[network] @@ -687,7 +690,6 @@ _delBrokenNetwork(network, libvirt_nets[network], configurator=configurator) if 'remove' in attrs: - del networks[network] del libvirt_nets[network] _netinfo.updateDevices() elif 'remove' in attrs: @@ -701,7 +703,7 @@
# We need to use the newest host info _netinfo.updateDevices() - for network, attrs in networks.iteritems(): + for network, attrs in networks_to_add.iteritems(): d = dict(attrs) if 'bonding' in d: d.update(_buildBondOptions(d['bonding'], bondings, _netinfo))
Dan Kenigsberg has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 1:
(1 comment)
http://gerrit.ovirt.org/#/c/35690/1/vdsm/network/api.py File vdsm/network/api.py:
Line 669: logger.debug("Applying...") Line 670: with ConfiguratorClass(options.get('_inRollback', False)) as configurator: Line 671: networks_to_add = dict( Line 672: (net, attributes) Line 673: for net, attributes in networks.iteritems() attributes->attrs (for consistency)
But if we do not modify the networks dict, why define this temp variable, and why have it so far from its usage? Line 674: if 'remove' not in attributes) Line 675: # Remove edited networks and networks with 'remove' attribute Line 676: for network, attrs in networks.items(): Line 677: if network in _netinfo.networks:
oVirt Jenkins CI Server has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/231... : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13741/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12952/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13904/ : FAILURE
Ido Barkan has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 1: Verified+1
Dan Kenigsberg has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 1: Code-Review-1
oVirt Jenkins CI Server has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/13823/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13034/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13986/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_network_functional_tests_gerrit/233... : There was an infra issue, please contact infra@ovirt.org
Ido Barkan has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 2: Verified+1
Dan Kenigsberg has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 2: Code-Review+2
Dan Kenigsberg has submitted this change and it was merged.
Change subject: do not delete networks from parameters ......................................................................
do not delete networks from parameters
Change-Id: I546c7f196f4b6bdace528a0cbbe6cfe5a212bfe1 Signed-off-by: ibarkan ibarkan@redhat.com Reviewed-on: http://gerrit.ovirt.org/35690 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/network/api.py 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: Ido Barkan: Verified Dan Kenigsberg: Looks good to me, approved
oVirt Jenkins CI Server has posted comments on this change.
Change subject: do not delete networks from parameters ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el6-x86_64_merg... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc21-x86_64_merged/259/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc20-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/476/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-el7-x86_64_merg... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/274/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/4268/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el6-x86_64_merged/281/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/283/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libfapi_create-rpms-fc21-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/6106/ : SUCCESS
vdsm-patches@lists.fedorahosted.org