Code review comment for ~rmccabe/cloud-init:bug1693251

Revision history for this message
Ryan McCabe (rmccabe) wrote :

Regarding the first question, I tested for network_state.dns_nameservers instead of self.dns_path because the test will always evaluate to true if it were testing only self.dns_path, since 'etc/resolv.conf' is provided as a default, and we don't want to drop the additional config for NM when no dns servers are provided.

Regarding the second question, I did the rendering the way I did in the patch to be consistent with how the rest of the files are being rendered, since the _make_header() function that writes out the "Created cloud-init..." lines is defined at the top of that sysconfig.py file. I could move it elsewhere so it can be reused, though, if you'd prefer that.

« Back to merge proposal