Ondřej Svoboda has posted comments on this change. Change subject: ifcfg: only determine and write HWADDR in removeNic if enabled ......................................................................
Patch Set 3: Verified+1 (1 comment) Tested with https://gerrit.ovirt.org/46197 HWADDR is not written when hwaddr_in_ifcfg = never is in effect. However, if HWADDR is not in the original ifcfg file (which was written, for instance, by VDSM during hwaddr_in_ifcfg = never) it is not written either. To adhere to "hwaddr_in_ifcfg = always" I guess I'll beef up the function with with open(ifcfg) as ifcfg_file: hwlines = [line for line in ifcfg_file if line.startswith( 'HWADDR=')] if not hwlines: hwlines = ['HWADDR=%s\n' % netinfo.gethwaddr(nic)] return hwlines https://gerrit.ovirt.org/#/c/45983/3/vdsm/network/configurators/ifcfg.py File vdsm/network/configurators/ifcfg.py: Line 680: self._hwaddr_from_ifcfg_or_system(nic, cf) Factored out: for future removal but also because the block became too long. -- To view, visit https://gerrit.ovirt.org/45983 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb4e7cdae83998b4102e79b7cb548ed95f672433 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
