Ondřej Svoboda has posted comments on this change. Change subject: net: add a resolv.conf writer ......................................................................
Patch Set 1: (2 comments) https://gerrit.ovirt.org/#/c/62705/1/lib/vdsm/network/ip/resolv.py File lib/vdsm/network/ip/resolv.py: Line 50: if len(words) >= 2: Line 51: yield words Line 52: Line 53: Line 54: def update(nameservers): > can you add a unit test for this function? Yes, but please note I will remove complex handling of "old_nameservers" first. It needs rethinking or to be moved to canonicalize. Line 55: file_text = _read_resolv_conf() Line 56: old_nameservers = _parse_nameservers(file_text) Line 57: nameservers = list(nameservers) Line 58: _extend_with_unique(nameservers, old_nameservers) PS1, Line 60: Generated by VDSM version > can this be turned into a constant, importable from ifcfg configurator? Let us discuss where to put such a constant. This literal is in ifcfg.py, unified_persistence(_test).py and vdsm-restore-net-config. So far, it is found only in network-related code. Is network/__init__.py a good location, then? -- To view, visit https://gerrit.ovirt.org/62705 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41b81b04fbe3e3e2398f28cb16fb0dbbc0382249 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Edward Haas <edwa...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org