Merge lp:~andreserl/maas/maas_lp1553791 into lp:maas/trunk

Proposed by Andres Rodriguez on 2016-03-07
Status: Merged
Approved by: Andres Rodriguez on 2016-03-07
Approved revision: 4737
Merged at revision: 4737
Proposed branch: lp:~andreserl/maas/maas_lp1553791
Merge into: lp:maas/trunk
Diff against target: 232 lines (+24/-24)
11 files modified
HACKING.txt (+3/-3)
INSTALL.txt (+1/-1)
Makefile (+3/-3)
buildout.cfg (+2/-2)
docs/development/cluster-registration.rst (+1/-1)
etc/maas/templates/dhcp/dhcpd.conf.template (+3/-3)
services/rackd/run (+2/-2)
src/provisioningserver/dhcp/tests/test_notifier.py (+2/-2)
src/provisioningserver/utils/fs.py (+4/-4)
src/provisioningserver/utils/tests/test_fs.py (+2/-2)
src/provisioningserver/utils/tests/test_script.py (+1/-1)
To merge this branch: bzr merge lp:~andreserl/maas/maas_lp1553791
Reviewer Review Type Date Requested Status
Blake Rouse (community) 2016-03-07 Approve on 2016-03-07
Review via email: mp+288300@code.launchpad.net

Commit message

Change maas-provision to maas-rack

To post a comment you must log in.
Blake Rouse (blake-rouse) wrote :

Just mentioned this in my other review, lol. Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'HACKING.txt'
2--- HACKING.txt 2016-02-04 10:00:05 +0000
3+++ HACKING.txt 2016-03-07 14:36:44 +0000
4@@ -226,7 +226,7 @@
5 you want to boot some real hardware. By default, it's set to start up on
6 port 5244 for testing purposes. Make these changes::
7
8- * Use ``bin/maas-provision`` to change the tftp-port setting to 69
9+ * Use ``bin/maas-rack`` to change the tftp-port setting to 69
10 * Install the ``authbind``package:
11
12 $ sudo apt-get install authbind
13@@ -285,9 +285,9 @@
14 configuration to do. First, run this tool to generate a configuration that
15 will work with MAAS::
16
17- $ maas-provision generate-dhcp-config [options]
18+ $ maas-rack generate-dhcp-config [options]
19
20-Run ``maas-provision generate-dhcp-config -h`` to see the options. You will
21+Run ``maas-rack generate-dhcp-config -h`` to see the options. You will
22 need to provide various IP details such as the range of IP addresses to assign
23 to clients. You can use the generated output to configure your system's ISC
24 DHCP server, by inserting the configuration in the ``/var/lib/maas/dhcpd.conf``
25
26=== modified file 'INSTALL.txt'
27--- INSTALL.txt 2016-03-01 19:02:08 +0000
28+++ INSTALL.txt 2016-03-07 14:36:44 +0000
29@@ -131,7 +131,7 @@
30 Once you have copied the secret, you can install it in the Cluster
31 Controller. At the command line, type::
32
33- $ sudo maas-provision
34+ $ sudo maas-rack
35
36 Once installed, you will need to reconfigure the Cluster Controller
37 to correctly point to the API hostname or IP address of the Region
38
39=== modified file 'Makefile'
40--- Makefile 2016-03-04 18:09:49 +0000
41+++ Makefile 2016-03-07 14:36:44 +0000
42@@ -52,7 +52,7 @@
43 bin/database \
44 bin/maas \
45 bin/maas-probe-dhcp \
46- bin/maas-provision \
47+ bin/maas-rack \
48 bin/maas-region-admin \
49 bin/twistd.rack \
50 bin/twistd.region \
51@@ -129,13 +129,13 @@
52 $(buildout) install testing-test
53 @touch --no-create $@
54
55-bin/maas-probe-dhcp bin/maas-provision bin/twistd.rack: \
56+bin/maas-probe-dhcp bin/maas-rack bin/twistd.rack: \
57 bin/buildout buildout.cfg versions.cfg setup.py
58 $(buildout) install rack
59 @touch --no-create $@
60
61 bin/test.rack: \
62- bin/buildout buildout.cfg versions.cfg setup.py bin/maas-provision
63+ bin/buildout buildout.cfg versions.cfg setup.py bin/maas-rack
64 $(buildout) install rack-test
65 @touch --no-create $@
66
67
68=== modified file 'buildout.cfg'
69--- buildout.cfg 2016-02-04 10:34:29 +0000
70+++ buildout.cfg 2016-03-07 14:36:44 +0000
71@@ -190,13 +190,13 @@
72 eggs =
73 entry-points =
74 maas-probe-dhcp=provisioningserver.dhcp.probe:main
75- maas-provision=provisioningserver.__main__:main
76+ maas-rack=provisioningserver.__main__:main
77 twistd.rack=twisted.scripts.twistd:run
78 extra-paths =
79 ${common:extra-paths}
80 scripts =
81 maas-probe-dhcp
82- maas-provision
83+ maas-rack
84 twistd.rack
85 initialization =
86 ${common:initialization}
87
88=== modified file 'docs/development/cluster-registration.rst'
89--- docs/development/cluster-registration.rst 2016-02-04 10:00:05 +0000
90+++ docs/development/cluster-registration.rst 2016-03-07 14:36:44 +0000
91@@ -23,7 +23,7 @@
92
93 The cluster obviously needs to know where the region controller is, and
94 this is configured in a file ``/etc/maas/rackd.conf``. This should
95-only ever be modified via the ``maas-provision`` command.
96+only ever be modified via the ``maas-rack`` command.
97
98 .. _first-cluster:
99
100
101=== modified file 'etc/maas/templates/dhcp/dhcpd.conf.template'
102--- etc/maas/templates/dhcp/dhcpd.conf.template 2016-03-02 05:03:06 +0000
103+++ etc/maas/templates/dhcp/dhcpd.conf.template 2016-03-07 14:36:44 +0000
104@@ -89,7 +89,7 @@
105 set cllt = binary-to-ascii(10, 32, "", encode-int(lease-time, 32));
106 set clht = pick-first-value(option host-name, "(none)");
107 execute(
108- "sudo", "maas-provision", "dhcp-notify",
109+ "sudo", "maas-rack", "dhcp-notify",
110 "--action", "commit", "--mac", clhw,
111 "--ip-family", "ipv4", "--ip", clip,
112 "--lease-time", cllt, "--hostname", clht);
113@@ -98,7 +98,7 @@
114 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
115 set clip = binary-to-ascii(10, 8, ".", leased-address);
116 execute(
117- "sudo", "maas-provision", "dhcp-notify",
118+ "sudo", "maas-rack", "dhcp-notify",
119 "--action", "expiry", "--mac", clhw,
120 "--ip-family", "ipv4", "--ip", clip);
121 }
122@@ -106,7 +106,7 @@
123 set clhw = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
124 set clip = binary-to-ascii(10, 8, ".", leased-address);
125 execute(
126- "sudo", "maas-provision", "dhcp-notify",
127+ "sudo", "maas-rack", "dhcp-notify",
128 "--action", "release", "--mac", clhw,
129 "--ip-family", "ipv4", "--ip", clip);
130 }
131
132=== modified file 'services/rackd/run'
133--- services/rackd/run 2016-02-10 20:24:35 +0000
134+++ services/rackd/run 2016-03-07 14:36:44 +0000
135@@ -19,12 +19,12 @@
136
137 # Configure the rack's UUID to match sampledata, and also use a high
138 # port for TFTP to match this branch's etc/services.
139-bin/maas-provision config \
140+bin/maas-rack config \
141 --uuid adfd3977-f251-4f2c-8d61-745dbd690bf2 \
142 --tftp-port 5244
143
144 # Wait for the installation of the shared-secret.
145-until bin/maas-provision check-for-shared-secret; do sleep 2; done
146+until bin/maas-rack check-for-shared-secret; do sleep 2; done
147
148 # Exec the Provisioning Server.
149 script="$(readlink -f bin/twistd.rack)"
150
151=== modified file 'src/provisioningserver/dhcp/tests/test_notifier.py'
152--- src/provisioningserver/dhcp/tests/test_notifier.py 2016-02-17 20:26:00 +0000
153+++ src/provisioningserver/dhcp/tests/test_notifier.py 2016-03-07 14:36:44 +0000
154@@ -1,7 +1,7 @@
155 # Copyright 2014-2015 Canonical Ltd. This software is licensed under the
156 # GNU Affero General Public License version 3 (see the file LICENSE).
157
158-"""Tests for maas-provision dhcp-notify command."""
159+"""Tests for maas-rack dhcp-notify command."""
160
161 __all__ = []
162
163@@ -67,7 +67,7 @@
164 self.addCleanup(service.stopService)
165
166 call_and_check([
167- "%s/bin/maas-provision" % root,
168+ "%s/bin/maas-rack" % root,
169 "dhcp-notify",
170 '--action', action,
171 '--mac', mac,
172
173=== modified file 'src/provisioningserver/utils/fs.py'
174--- src/provisioningserver/utils/fs.py 2016-02-26 00:03:29 +0000
175+++ src/provisioningserver/utils/fs.py 2016-03-07 14:36:44 +0000
176@@ -56,9 +56,9 @@
177
178
179 def get_maas_provision_command():
180- """Return path to the maas-provision command.
181+ """Return path to the maas-rack command.
182
183- In production mode this will just return 'maas-provision', but in
184+ In production mode this will just return 'maas-rack', but in
185 development mode it will return the path for the current development
186 environment.
187 """
188@@ -66,9 +66,9 @@
189 from provisioningserver.config import is_dev_environment
190 if is_dev_environment():
191 from maastesting import root
192- return os.path.join(root, "bin", "maas-provision")
193+ return os.path.join(root, "bin", "maas-rack")
194 else:
195- return "maas-provision"
196+ return "maas-rack"
197
198
199 def _write_temp_file(content, filename):
200
201=== modified file 'src/provisioningserver/utils/tests/test_fs.py'
202--- src/provisioningserver/utils/tests/test_fs.py 2016-02-26 00:38:54 +0000
203+++ src/provisioningserver/utils/tests/test_fs.py 2016-03-07 14:36:44 +0000
204@@ -313,13 +313,13 @@
205 def test__returns_just_command_for_production(self):
206 self.patch(provisioningserver.config, "is_dev_environment")
207 provisioningserver.config.is_dev_environment.return_value = False
208- self.assertEqual("maas-provision", get_maas_provision_command())
209+ self.assertEqual("maas-rack", get_maas_provision_command())
210
211 def test__returns_full_path_for_development(self):
212 self.patch(provisioningserver.config, "is_dev_environment")
213 provisioningserver.config.is_dev_environment.return_value = True
214 self.assertEqual(
215- root.rstrip("/") + "/bin/maas-provision",
216+ root.rstrip("/") + "/bin/maas-rack",
217 get_maas_provision_command())
218
219
220
221=== modified file 'src/provisioningserver/utils/tests/test_script.py'
222--- src/provisioningserver/utils/tests/test_script.py 2015-12-03 23:28:19 +0000
223+++ src/provisioningserver/utils/tests/test_script.py 2016-03-07 14:36:44 +0000
224@@ -194,7 +194,7 @@
225
226 def test_script_executable(self):
227 content = factory.make_string()
228- script = [os.path.join(bindir, "maas-provision"), 'atomic-write']
229+ script = [os.path.join(bindir, "maas-rack"), 'atomic-write']
230 target_file = self.make_file()
231 script.extend(('--filename', target_file, '--mode', '615'))
232 cmd = Popen(script, stdin=PIPE, env=select_c_utf8_locale())