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
1=== modified file 'src/maasserver/management/commands/get_named_conf.py'
2--- src/maasserver/management/commands/get_named_conf.py 2012-07-16 13:22:56 +0000
3+++ src/maasserver/management/commands/get_named_conf.py 2012-12-03 05:59:26 +0000
4@@ -23,8 +23,8 @@
5 from provisioningserver.dns.config import DNSConfig
6
7
8-INCLUDE_SNIPPET_COMMENT = """
9-# Append the following content to your local BIND configuration
10+INCLUDE_SNIPPET_COMMENT = """\
11+# Append the following content to your local BIND configuration
12 # file (usually /etc/bind/named.conf.local) in order to allow
13 # MAAS to manage its DNS zones.
14 """
15
16=== modified file 'src/provisioningserver/dns/config.py'
17--- src/provisioningserver/dns/config.py 2012-10-17 05:21:12 +0000
18+++ src/provisioningserver/dns/config.py 2012-12-03 05:59:26 +0000
19@@ -234,7 +234,8 @@
20 }
21
22 def get_include_snippet(self):
23- return '\ninclude "%s";\n' % self.target_path
24+ assert '"' not in self.target_path, self.target_path
25+ return 'include "%s";\n' % self.target_path
26
27
28 def shortened_reversed_ip(ip, byte_num):
29
30=== modified file 'src/provisioningserver/dns/tests/test_config.py'
31--- src/provisioningserver/dns/tests/test_config.py 2012-10-17 05:21:12 +0000
32+++ src/provisioningserver/dns/tests/test_config.py 2012-12-03 05:59:26 +0000
33@@ -221,7 +221,7 @@
34 self.assertThat(
35 snippet,
36 MatchesAll(
37- StartsWith('\n'),
38+ Not(StartsWith('\n')),
39 EndsWith('\n'),
40 Contains(target_dir),
41 Contains('include "%s"' % dnsconfig.target_path)))

Subscribers

People subscribed via source and target branches

to status/vote changes: