Merge lp:~julian-edwards/maas/backport-r1280 into lp:maas/1.2

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 1321
Proposed branch: lp:~julian-edwards/maas/backport-r1280
Merge into: lp:maas/1.2
Diff against target: 41 lines (+5/-4)
3 files modified
src/maasserver/management/commands/get_named_conf.py (+2/-2)
src/provisioningserver/dns/config.py (+2/-1)
src/provisioningserver/dns/tests/test_config.py (+1/-1)
To merge this branch: bzr merge lp:~julian-edwards/maas/backport-r1280
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+137481@code.launchpad.net

Commit message

Don't start the BIND config include snippet from `maas get_named_conf` with a newline. (backport r1280 from trunk)

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/maasserver/management/commands/get_named_conf.py'
--- src/maasserver/management/commands/get_named_conf.py 2012-07-16 13:22:56 +0000
+++ src/maasserver/management/commands/get_named_conf.py 2012-12-03 05:59:26 +0000
@@ -23,8 +23,8 @@
23from provisioningserver.dns.config import DNSConfig23from provisioningserver.dns.config import DNSConfig
2424
2525
26INCLUDE_SNIPPET_COMMENT = """26INCLUDE_SNIPPET_COMMENT = """\
27# Append the following content to your local BIND configuration27# Append the following content to your local BIND configuration
28# file (usually /etc/bind/named.conf.local) in order to allow28# file (usually /etc/bind/named.conf.local) in order to allow
29# MAAS to manage its DNS zones.29# MAAS to manage its DNS zones.
30"""30"""
3131
=== modified file 'src/provisioningserver/dns/config.py'
--- src/provisioningserver/dns/config.py 2012-10-17 05:21:12 +0000
+++ src/provisioningserver/dns/config.py 2012-12-03 05:59:26 +0000
@@ -234,7 +234,8 @@
234 }234 }
235235
236 def get_include_snippet(self):236 def get_include_snippet(self):
237 return '\ninclude "%s";\n' % self.target_path237 assert '"' not in self.target_path, self.target_path
238 return 'include "%s";\n' % self.target_path
238239
239240
240def shortened_reversed_ip(ip, byte_num):241def shortened_reversed_ip(ip, byte_num):
241242
=== modified file 'src/provisioningserver/dns/tests/test_config.py'
--- src/provisioningserver/dns/tests/test_config.py 2012-10-17 05:21:12 +0000
+++ src/provisioningserver/dns/tests/test_config.py 2012-12-03 05:59:26 +0000
@@ -221,7 +221,7 @@
221 self.assertThat(221 self.assertThat(
222 snippet,222 snippet,
223 MatchesAll(223 MatchesAll(
224 StartsWith('\n'),224 Not(StartsWith('\n')),
225 EndsWith('\n'),225 EndsWith('\n'),
226 Contains(target_dir),226 Contains(target_dir),
227 Contains('include "%s"' % dnsconfig.target_path)))227 Contains('include "%s"' % dnsconfig.target_path)))

Subscribers

People subscribed via source and target branches

to status/vote changes: