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