Giuseppe Vallarelli has uploaded a new change for review.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param.
A TypeError is raised when using configNetwork.addNetwork by providing bootproto as a keyword argument, this patch solve this issue without altering addNetwork and objectivizeNetwork interfaces.
Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Signed-off-by: Giuseppe Vallarelli gvallare@redhat.com --- M vdsm/configNetwork.py 1 file changed, 8 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/15423/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index 22d3699..0d085b0 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -192,10 +192,16 @@ configWriter = ConfigWriter() configurator = Ifcfg(configWriter)
+ bootproto = None + try: + bootproto = options.pop('bootproto') + except KeyError: + pass + netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding, bondingOptions, nics, mtu, ipaddr, netmask, - gateway, options.get('bootproto'), _netinfo, - configurator, **options) + gateway, bootproto, _netinfo, configurator, + **options) netEnt.configure(**options) configurator.configureLibvirtNetwork(network, netEnt)
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2640/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1828/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2713/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 1: I would prefer that you didn't submit this
(1 inline comment)
Thanks for the quick fix. One little comment, though.
.................................................... File vdsm/configNetwork.py Line 193: configurator = Ifcfg(configWriter) Line 194: Line 195: bootproto = None Line 196: try: Line 197: bootproto = options.pop('bootproto') a simpler line with the same sematincs is
bootproto = options.pop('bootproto', None) Line 198: except KeyError: Line 199: pass Line 200: Line 201: netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding,
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 2: Looks good to me, approved
heh, that was quick. Thanks!
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2642/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1830/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2715/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Antoni Segura Puimedon has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 2: Looks good to me, but someone else must approve
Thanks a lot for the fix Giuseppe, No dessert tomorrow for the original author of the refactored addNetwork.
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Sandro Bonazzola has posted comments on this change.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Patch Set 2: Verified; Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Sandro Bonazzola sbonazzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Dan Kenigsberg has submitted this change and it was merged.
Change subject: Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param. ......................................................................
Bugfix: TypeError when using configNetwork.addNetwork with bootproto as kw param.
A TypeError is raised when using configNetwork.addNetwork by providing bootproto as a keyword argument, this patch solve this issue without altering addNetwork and objectivizeNetwork interfaces.
Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Signed-off-by: Giuseppe Vallarelli gvallare@redhat.com --- M vdsm/configNetwork.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Sandro Bonazzola: Verified; Looks good to me, but someone else must approve Antoni Segura Puimedon: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/15423 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged Gerrit-Change-Id: I990286a8d834df7de1198e4f71057aa6e3bc2bcd Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegurap@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Giuseppe Vallarelli gvallare@redhat.com Gerrit-Reviewer: Mark Wu wudxw@linux.vnet.ibm.com Gerrit-Reviewer: Sandro Bonazzola sbonazzo@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org