Change in vdsm[master]: Extend setupNetworks API to accept defaultRoute
danken at redhat.com
danken at redhat.com
Wed Jan 8 12:46:59 UTC 2014
Dan Kenigsberg has posted comments on this change.
Change subject: Extend setupNetworks API to accept defaultRoute
......................................................................
Patch Set 1: Code-Review-1
(4 comments)
....................................................
File lib/vdsm/tool/unified_persistence.py
Line 71
Line 72
Line 73
Line 74
Line 75
assigning bootproto the string value "None" just because BOOTPROTO was missing is a bug waiting to pop up: with it, bootproto is one of "dhcp", "none", and "None". Please drop the str().
Line 36: UPGRADE_NAME, networks, bondings)
Line 37: _persist(networks, bondings)
Line 38:
Line 39:
Line 40: def _ifcfgFilter(filter, value):
"filter" is an old Python builtin. This function does not do filtering, but rather conversion of values.
Line 41: """
Line 42: If value is in the dict and hashable - Get its filtered value.
Line 43: Otherwise: Return the original value
Line 44: :param filter: Dictionary of 'from' -> 'to'
Line 54: def _toIfcfgFormat(value):
Line 55: return _ifcfgFilter({'on': 'yes', 'off': 'no'}, value)
Line 56:
Line 57:
Line 58: def _fromIfcfgFormat(value):
I'd prefer a simpler function, named yesnoToBool - here there's certainly no reason for allowing unexpected values through.
Line 59: return _ifcfgFilter({'yes': True, 'no': False}, value)
Line 60:
Line 61:
Line 62: def _getNetInfo():
....................................................
File vdsm/configNetwork.py
Line 253
Line 254
Line 255
Line 256
Line 257
We have to maintain this code until ovirt-3.3 is extinct.
--
To view, visit http://gerrit.ovirt.org/22720
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9b2ff711155eb0bd79ab84e979eb82c846362374
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list