Merge ~lloydwaltersj/maas:informative-cli-404-error into maas:master
- Git
- lp:~lloydwaltersj/maas
- informative-cli-404-error
- Merge into master
Proposed by
Jack Lloyd-Walters
Status: | Merged |
---|---|
Approved by: | Jack Lloyd-Walters |
Approved revision: | fde1018d48c8464b8815a52057d460a57c1d145d |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~lloydwaltersj/maas:informative-cli-404-error |
Merge into: | maas:master |
Diff against target: |
2023 lines (+212/-206) 41 files modified
src/maasserver/api/bcache.py (+5/-5) src/maasserver/api/bcache_cacheset.py (+5/-5) src/maasserver/api/blockdevices.py (+13/-12) src/maasserver/api/boot_resources.py (+2/-2) src/maasserver/api/boot_source_selections.py (+7/-5) src/maasserver/api/boot_sources.py (+4/-3) src/maasserver/api/devices.py (+5/-4) src/maasserver/api/dhcpsnippets.py (+4/-4) src/maasserver/api/discoveries.py (+1/-1) src/maasserver/api/dnsresourcerecords.py (+3/-3) src/maasserver/api/dnsresources.py (+4/-4) src/maasserver/api/domains.py (+4/-4) src/maasserver/api/fabrics.py (+3/-3) src/maasserver/api/files.py (+4/-4) src/maasserver/api/interfaces.py (+15/-14) src/maasserver/api/ipranges.py (+3/-3) src/maasserver/api/machines.py (+19/-19) src/maasserver/api/nodedevices.py (+3/-3) src/maasserver/api/nodes.py (+10/-10) src/maasserver/api/notification.py (+4/-4) src/maasserver/api/packagerepositories.py (+3/-3) src/maasserver/api/partitions.py (+10/-10) src/maasserver/api/pods.py (+7/-7) src/maasserver/api/rackcontrollers.py (+5/-5) src/maasserver/api/raid.py (+5/-5) src/maasserver/api/regioncontrollers.py (+2/-2) src/maasserver/api/resourcepools.py (+2/-2) src/maasserver/api/scriptresults.py (+5/-5) src/maasserver/api/scripts.py (+7/-7) src/maasserver/api/spaces.py (+3/-3) src/maasserver/api/ssh_keys.py (+2/-2) src/maasserver/api/ssl_keys.py (+2/-2) src/maasserver/api/staticroutes.py (+3/-3) src/maasserver/api/subnets.py (+7/-7) src/maasserver/api/tags.py (+10/-10) src/maasserver/api/users.py (+1/-1) src/maasserver/api/vlans.py (+5/-5) src/maasserver/api/vmcluster.py (+1/-1) src/maasserver/api/vmfs_datastores.py (+5/-5) src/maasserver/api/volume_groups.py (+7/-7) src/maasserver/api/zones.py (+2/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexsander de Souza | Approve | ||
MAAS Lander | Approve | ||
Review via email: mp+427151@code.launchpad.net |
Commit message
Bring all doc strings containing `not-found` error up to parity with recent code changes.
Description of the change
To post a comment you must log in.
- fde1018... by Jack Lloyd-Walters
-
don't forget to lint. again
Revision history for this message
MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b informative-
STATUS: SUCCESS
COMMIT: fde1018d48c8464
review:
Approve
Revision history for this message
Alexsander de Souza (alexsander-souza) wrote : | # |
+1
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/src/maasserver/api/bcache.py b/src/maasserver/api/bcache.py |
2 | index e7e87c4..3280494 100644 |
3 | --- a/src/maasserver/api/bcache.py |
4 | +++ b/src/maasserver/api/bcache.py |
5 | @@ -57,7 +57,7 @@ class BcachesHandler(OperationsHandler): |
6 | @error (http-status-code) "404" 404 |
7 | @error (content) "not-found" The requested system_id is not found. |
8 | @error-example "not-found" |
9 | - Not Found |
10 | + No Bcache matches the given query. |
11 | """ |
12 | machine = Machine.objects.get_node_or_404( |
13 | system_id, request.user, NodePermission.view |
14 | @@ -95,7 +95,7 @@ class BcachesHandler(OperationsHandler): |
15 | @error (http-status-code) "404" 404 |
16 | @error (content) "not-found" The requested system_id is not found. |
17 | @error-example "not-found" |
18 | - Not Found |
19 | + No Bcache matches the given query. |
20 | |
21 | @error (http-status-code) "409" 409 |
22 | @error (content) "not-ready" The requested machine is not ready. |
23 | @@ -181,7 +181,7 @@ class BcacheHandler(OperationsHandler): |
24 | @error (content) "not-found" The requested machine or bcache id is not |
25 | found. |
26 | @error-example "not-found" |
27 | - Not Found |
28 | + No Bcache matches the given query. |
29 | """ |
30 | return Bcache.objects.get_object_or_404( |
31 | system_id, id, request.user, NodePermission.view |
32 | @@ -200,7 +200,7 @@ class BcacheHandler(OperationsHandler): |
33 | @error (content) "not-found" The requested id or system_id is not |
34 | found. |
35 | @error-example "not-found" |
36 | - Not Found |
37 | + No Bcache matches the given query. |
38 | |
39 | @error (http-status-code) "409" 409 |
40 | @error (content) "not-ready" The requested machine is not ready. |
41 | @@ -259,7 +259,7 @@ class BcacheHandler(OperationsHandler): |
42 | @error (content) "not-found" The requested id or system_id is not |
43 | found. |
44 | @error-example "not-found" |
45 | - Not Found |
46 | + No Bcache matches the given query. |
47 | |
48 | @error (http-status-code) "409" 409 |
49 | @error (content) "not-ready" The requested machine is not ready. |
50 | diff --git a/src/maasserver/api/bcache_cacheset.py b/src/maasserver/api/bcache_cacheset.py |
51 | index d2e66f2..df26d39 100644 |
52 | --- a/src/maasserver/api/bcache_cacheset.py |
53 | +++ b/src/maasserver/api/bcache_cacheset.py |
54 | @@ -48,7 +48,7 @@ class BcacheCacheSetsHandler(OperationsHandler): |
55 | @error (http-status-code) "404" 404 |
56 | @error (content) "not-found" The requested machine is not found. |
57 | @error-example "not-found" |
58 | - Not Found |
59 | + No Machine matches the given query |
60 | """ |
61 | machine = Machine.objects.get_node_or_404( |
62 | system_id, request.user, NodePermission.view |
63 | @@ -77,7 +77,7 @@ class BcacheCacheSetsHandler(OperationsHandler): |
64 | @error (http-status-code) "404" 404 |
65 | @error (content) "not-found" The requested machine is not found. |
66 | @error-example "not-found" |
67 | - Not Found |
68 | + No Machine matches the given query |
69 | |
70 | @error (http-status-code) "409" 409 |
71 | @error (content) "not-ready" The requested machine is not ready. |
72 | @@ -148,7 +148,7 @@ class BcacheCacheSetHandler(OperationsHandler): |
73 | @error (http-status-code) "404" 404 |
74 | @error (content) "not-found" The requested machine is not found. |
75 | @error-example "not-found" |
76 | - Not Found |
77 | + No Machine matches the given query |
78 | """ |
79 | return CacheSet.objects.get_cache_set_or_404( |
80 | system_id, id, request.user, NodePermission.view |
81 | @@ -169,7 +169,7 @@ class BcacheCacheSetHandler(OperationsHandler): |
82 | @error (http-status-code) "404" 404 |
83 | @error (content) "not-found" The requested machine is not found. |
84 | @error-example "not-found" |
85 | - Not Found |
86 | + No Machine matches the given query |
87 | |
88 | @error (http-status-code) "409" 409 |
89 | @error (content) "not-ready" The requested machine is not ready. |
90 | @@ -221,7 +221,7 @@ class BcacheCacheSetHandler(OperationsHandler): |
91 | @error (http-status-code) "404" 404 |
92 | @error (content) "not-found" The requested machine is not found. |
93 | @error-example "not-found" |
94 | - Not Found |
95 | + No Machine matches the given query |
96 | |
97 | @error (http-status-code) "409" 409 |
98 | @error (content) "not-ready" The requested machine is not ready. |
99 | diff --git a/src/maasserver/api/blockdevices.py b/src/maasserver/api/blockdevices.py |
100 | index 8241739..dfc9705 100644 |
101 | --- a/src/maasserver/api/blockdevices.py |
102 | +++ b/src/maasserver/api/blockdevices.py |
103 | @@ -96,7 +96,7 @@ class BlockDevicesHandler(OperationsHandler): |
104 | @error (http-status-code) "404" 404 |
105 | @error (content) "not-found" The requested machine is not found. |
106 | @error-example "not-found" |
107 | - Not Found |
108 | + No BlockDevice matches the given query. |
109 | """ |
110 | machine = Machine.objects.get_node_or_404( |
111 | system_id, request.user, NodePermission.view |
112 | @@ -135,7 +135,7 @@ class BlockDevicesHandler(OperationsHandler): |
113 | @error (http-status-code) "404" 404 |
114 | @error (content) "not-found" The requested machine is not found. |
115 | @error-example "not-found" |
116 | - Not Found |
117 | + No BlockDevice matches the given query. |
118 | """ |
119 | machine = Machine.objects.get_node_or_404( |
120 | system_id, request.user, NodePermission.admin |
121 | @@ -269,7 +269,7 @@ class BlockDeviceHandler(OperationsHandler): |
122 | @error (content) "not-found" The requested machine or block device is |
123 | not found. |
124 | @error-example "not-found" |
125 | - Not Found |
126 | + No BlockDevice matches the given query. |
127 | """ |
128 | return BlockDevice.objects.get_block_device_or_404( |
129 | system_id, id, request.user, NodePermission.view |
130 | @@ -292,7 +292,8 @@ class BlockDeviceHandler(OperationsHandler): |
131 | @error (content) "not-found" The requested machine or block device is |
132 | not found. |
133 | @error-example "not-found" |
134 | - Not Found |
135 | + No BlockDevice matches the given query. |
136 | + |
137 | |
138 | @error (http-status-code) "409" 409 |
139 | @error (content) "not-ready" The requested machine is not ready. |
140 | @@ -362,7 +363,7 @@ class BlockDeviceHandler(OperationsHandler): |
141 | @error (content) "not-found" The requested machine or block device is |
142 | not found. |
143 | @error-example "not-found" |
144 | - Not Found |
145 | + No BlockDevice matches the given query. |
146 | |
147 | @error (http-status-code) "409" 409 |
148 | @error (content) "not-ready" The requested machine is not ready. |
149 | @@ -427,7 +428,7 @@ class BlockDeviceHandler(OperationsHandler): |
150 | @error (content) "not-found" The requested machine or block device is |
151 | not found. |
152 | @error-example "not-found" |
153 | - Not Found |
154 | + No BlockDevice matches the given query. |
155 | |
156 | @error (http-status-code) "409" 409 |
157 | @error (content) "not-ready" The requested machine is not ready. |
158 | @@ -468,7 +469,7 @@ class BlockDeviceHandler(OperationsHandler): |
159 | @error (content) "not-found" The requested machine or block device is |
160 | not found. |
161 | @error-example "not-found" |
162 | - Not Found |
163 | + No BlockDevice matches the given query. |
164 | |
165 | @error (http-status-code) "409" 409 |
166 | @error (content) "not-ready" The requested machine is not ready. |
167 | @@ -511,7 +512,7 @@ class BlockDeviceHandler(OperationsHandler): |
168 | @error (content) "not-found" The requested machine or block device is |
169 | not found. |
170 | @error-example "not-found" |
171 | - Not Found |
172 | + No BlockDevice matches the given query. |
173 | |
174 | @error (http-status-code) "409" 409 |
175 | @error (content) "not-ready" The requested machine is not ready. |
176 | @@ -555,7 +556,7 @@ class BlockDeviceHandler(OperationsHandler): |
177 | @error (content) "not-found" The requested machine or block device is |
178 | not found. |
179 | @error-example "not-found" |
180 | - Not Found |
181 | + No BlockDevice matches the given query. |
182 | |
183 | @error (http-status-code) "409" 409 |
184 | @error (content) "not-ready" The requested machine is not ready. |
185 | @@ -614,7 +615,7 @@ class BlockDeviceHandler(OperationsHandler): |
186 | @error (content) "not-found" The requested machine or block device is |
187 | not found. |
188 | @error-example "not-found" |
189 | - Not Found |
190 | + No BlockDevice matches the given query. |
191 | |
192 | @error (http-status-code) "409" 409 |
193 | @error (content) "not-ready" The requested machine is not ready. |
194 | @@ -659,7 +660,7 @@ class BlockDeviceHandler(OperationsHandler): |
195 | @error (content) "not-found" The requested machine or block device is |
196 | not found. |
197 | @error-example "not-found" |
198 | - Not Found |
199 | + No BlockDevice matches the given query. |
200 | |
201 | @error (http-status-code) "409" 409 |
202 | @error (content) "not-ready" The requested machine is not ready. |
203 | @@ -705,7 +706,7 @@ class BlockDeviceHandler(OperationsHandler): |
204 | @error (content) "not-found" The requested machine or block device is |
205 | not found. |
206 | @error-example "not-found" |
207 | - Not Found |
208 | + No BlockDevice matches the given query. |
209 | |
210 | @error (http-status-code) "409" 409 |
211 | @error (content) "not-ready" The requested machine is not ready. |
212 | diff --git a/src/maasserver/api/boot_resources.py b/src/maasserver/api/boot_resources.py |
213 | index f7cdf1f..bf2caee 100644 |
214 | --- a/src/maasserver/api/boot_resources.py |
215 | +++ b/src/maasserver/api/boot_resources.py |
216 | @@ -323,7 +323,7 @@ class BootResourceHandler(OperationsHandler): |
217 | @error (http-status-code) "404" 404 |
218 | @error (content) "not-found" The requested boot resource is not found. |
219 | @error-example "not-found" |
220 | - Not Found |
221 | + No BootResource matches the given query. |
222 | """ |
223 | resource = get_object_or_404(BootResource, id=id) |
224 | stream = json_object( |
225 | @@ -347,7 +347,7 @@ class BootResourceHandler(OperationsHandler): |
226 | @error (http-status-code) "404" 404 |
227 | @error (content) "not-found" The requested boot resource is not found. |
228 | @error-example "not-found" |
229 | - Not Found |
230 | + No BootResource matches the given query. |
231 | """ |
232 | resource = BootResource.objects.get(id=id) |
233 | if resource is not None: |
234 | diff --git a/src/maasserver/api/boot_source_selections.py b/src/maasserver/api/boot_source_selections.py |
235 | index 8cd66c0..b2a163c 100644 |
236 | --- a/src/maasserver/api/boot_source_selections.py |
237 | +++ b/src/maasserver/api/boot_source_selections.py |
238 | @@ -49,7 +49,7 @@ class BootSourceSelectionHandler(OperationsHandler): |
239 | @error (content) "not-found" The requested boot-source or boot-source |
240 | selection is not found. |
241 | @error-example "not-found" |
242 | - Not Found |
243 | + No BootSource matches the given query. |
244 | """ |
245 | boot_source = get_object_or_404(BootSource, id=boot_source_id) |
246 | return get_object_or_404( |
247 | @@ -88,7 +88,7 @@ class BootSourceSelectionHandler(OperationsHandler): |
248 | @error (content) "not-found" The requested boot-source or boot-source |
249 | selection is not found. |
250 | @error-example "not-found" |
251 | - Not Found |
252 | + No BootSource matches the given query. |
253 | """ |
254 | boot_source = get_object_or_404(BootSource, id=boot_source_id) |
255 | boot_source_selection = get_object_or_404( |
256 | @@ -115,7 +115,8 @@ class BootSourceSelectionHandler(OperationsHandler): |
257 | @error (content) "not-found" The requested boot-source or boot-source |
258 | selection is not found. |
259 | @error-example "not-found" |
260 | - Not Found |
261 | + No BootSource matches the given query. |
262 | + |
263 | """ |
264 | boot_source = get_object_or_404(BootSource, id=boot_source_id) |
265 | boot_source_selection = get_object_or_404( |
266 | @@ -166,7 +167,7 @@ class BootSourceSelectionsHandler(OperationsHandler): |
267 | @error (http-status-code) "404" 404 |
268 | @error (content) "not-found" The requested boot-source is not found. |
269 | @error-example "not-found" |
270 | - Not Found |
271 | + No BootSource matches the given query. |
272 | """ |
273 | boot_source = get_object_or_404(BootSource, id=boot_source_id) |
274 | return BootSourceSelection.objects.filter(boot_source=boot_source) |
275 | @@ -201,7 +202,8 @@ class BootSourceSelectionsHandler(OperationsHandler): |
276 | @error (http-status-code) "404" 404 |
277 | @error (content) "not-found" The requested boot-source is not found. |
278 | @error-example "not-found" |
279 | - Not Found |
280 | + No BootSource matches the given query. |
281 | + |
282 | """ |
283 | boot_source = get_object_or_404(BootSource, id=boot_source_id) |
284 | form = BootSourceSelectionForm( |
285 | diff --git a/src/maasserver/api/boot_sources.py b/src/maasserver/api/boot_sources.py |
286 | index caf87d0..2591d63 100644 |
287 | --- a/src/maasserver/api/boot_sources.py |
288 | +++ b/src/maasserver/api/boot_sources.py |
289 | @@ -52,7 +52,7 @@ class BootSourceHandler(OperationsHandler): |
290 | @error (http-status-code) "404" 404 |
291 | @error (content) "not-found" The requested boot-source is not found. |
292 | @error-example "not-found" |
293 | - Not Found |
294 | + No BootSource matches the given query. |
295 | """ |
296 | return get_object_or_404(BootSource, id=id) |
297 | |
298 | @@ -79,7 +79,8 @@ class BootSourceHandler(OperationsHandler): |
299 | @error (http-status-code) "404" 404 |
300 | @error (content) "not-found" The requested boot-source is not found. |
301 | @error-example "not-found" |
302 | - Not Found |
303 | + No BootSource matches the given query. |
304 | + |
305 | """ |
306 | boot_source = get_object_or_404(BootSource, id=id) |
307 | form = BootSourceForm( |
308 | @@ -101,7 +102,7 @@ class BootSourceHandler(OperationsHandler): |
309 | @error (http-status-code) "404" 404 |
310 | @error (content) "not-found" The requested boot-source is not found. |
311 | @error-example "not-found" |
312 | - Not Found |
313 | + No BootSource matches the given query. |
314 | """ |
315 | boot_source = get_object_or_404(BootSource, id=id) |
316 | boot_source.delete() |
317 | diff --git a/src/maasserver/api/devices.py b/src/maasserver/api/devices.py |
318 | index 07f5189..fb20082 100644 |
319 | --- a/src/maasserver/api/devices.py |
320 | +++ b/src/maasserver/api/devices.py |
321 | @@ -93,7 +93,7 @@ class DeviceHandler(NodeHandler, WorkloadAnnotationsMixin): |
322 | @error (http-status-code) "404" 404 |
323 | @error (content) "not-found" The requested device is not found. |
324 | @error-example "not-found" |
325 | - Not Found |
326 | + No Device matches the given query. |
327 | """ |
328 | device = self.model.objects.get_node_or_404( |
329 | system_id=system_id, user=request.user, perm=NodePermission.edit |
330 | @@ -120,7 +120,7 @@ class DeviceHandler(NodeHandler, WorkloadAnnotationsMixin): |
331 | @error (http-status-code) "404" 404 |
332 | @error (content) "not-found" The requested device is not found. |
333 | @error-example "not-found" |
334 | - Not Found |
335 | + No Device matches the given query. |
336 | """ |
337 | device = self.model.objects.get_node_or_404( |
338 | system_id=system_id, user=request.user, perm=NodePermission.edit |
339 | @@ -149,7 +149,7 @@ class DeviceHandler(NodeHandler, WorkloadAnnotationsMixin): |
340 | @error (http-status-code) "404" 404 |
341 | @error (content) "not-found" The requested device is not found. |
342 | @error-example "not-found" |
343 | - Not Found |
344 | + No Device matches the given query. |
345 | """ |
346 | device = self.model.objects.get_node_or_404( |
347 | system_id=system_id, user=request.user, perm=NodePermission.admin |
348 | @@ -178,7 +178,8 @@ class DeviceHandler(NodeHandler, WorkloadAnnotationsMixin): |
349 | @error (http-status-code) "404" 404 |
350 | @error (content) "not-found" The requested device is not found. |
351 | @error-example "not-found" |
352 | - Not Found |
353 | + No Device matches the given query. |
354 | + |
355 | """ |
356 | device = self.model.objects.get_node_or_404( |
357 | system_id=system_id, user=request.user, perm=NodePermission.admin |
358 | diff --git a/src/maasserver/api/dhcpsnippets.py b/src/maasserver/api/dhcpsnippets.py |
359 | index ed4fcb9..d08967f 100644 |
360 | --- a/src/maasserver/api/dhcpsnippets.py |
361 | +++ b/src/maasserver/api/dhcpsnippets.py |
362 | @@ -84,7 +84,7 @@ class DHCPSnippetHandler(OperationsHandler): |
363 | @error (http-status-code) "404" 404 |
364 | @error (content) "not-found" The requested DHCP snippet is not found. |
365 | @error-example "not-found" |
366 | - Not Found |
367 | + No DHCPSnippet matches the given query. |
368 | """ |
369 | return DHCPSnippet.objects.get_dhcp_snippet_or_404(id) |
370 | |
371 | @@ -125,7 +125,7 @@ class DHCPSnippetHandler(OperationsHandler): |
372 | @error (http-status-code) "404" 404 |
373 | @error (content) "not-found" The requested DHCP snippet is not found. |
374 | @error-example "not-found" |
375 | - Not Found |
376 | + No DHCPSnippet matches the given query. |
377 | """ |
378 | dhcp_snippet = DHCPSnippet.objects.get_dhcp_snippet_or_404(id) |
379 | form = DHCPSnippetForm(instance=dhcp_snippet, data=request.data) |
380 | @@ -146,7 +146,7 @@ class DHCPSnippetHandler(OperationsHandler): |
381 | @error (http-status-code) "404" 404 |
382 | @error (content) "not-found" The requested DHCP snippet is not found. |
383 | @error-example "not-found" |
384 | - Not Found |
385 | + No DHCPSnippet matches the given query. |
386 | """ |
387 | dhcp_snippet = DHCPSnippet.objects.get_dhcp_snippet_or_404(id) |
388 | dhcp_snippet.delete() |
389 | @@ -181,7 +181,7 @@ class DHCPSnippetHandler(OperationsHandler): |
390 | @error (http-status-code) "404" 404 |
391 | @error (content) "not-found" The requested DHCP snippet is not found. |
392 | @error-example "not-found" |
393 | - Not Found |
394 | + No DHCPSnippet matches the given query. |
395 | """ |
396 | revert_to = request.data.get("to") |
397 | if revert_to is None: |
398 | diff --git a/src/maasserver/api/discoveries.py b/src/maasserver/api/discoveries.py |
399 | index 0b58369..215959c 100644 |
400 | --- a/src/maasserver/api/discoveries.py |
401 | +++ b/src/maasserver/api/discoveries.py |
402 | @@ -68,7 +68,7 @@ class DiscoveryHandler(OperationsHandler): |
403 | @error (http-status-code) "404" 404 |
404 | @error (content) "not-found" The requested discovery is not found. |
405 | @error-example "not-found" |
406 | - Not Found |
407 | + No Discovery matches the given query. |
408 | """ |
409 | discovery_id = kwargs.get("discovery_id", None) |
410 | discovery = Discovery.objects.get_discovery_or_404(discovery_id) |
411 | diff --git a/src/maasserver/api/dnsresourcerecords.py b/src/maasserver/api/dnsresourcerecords.py |
412 | index 4e25798..bd131f7 100644 |
413 | --- a/src/maasserver/api/dnsresourcerecords.py |
414 | +++ b/src/maasserver/api/dnsresourcerecords.py |
415 | @@ -201,7 +201,7 @@ class DNSResourceRecordHandler(OperationsHandler): |
416 | @error (content) "not-found" The requested DNS resource record was not |
417 | found. |
418 | @error-example "not-found" |
419 | - Not Found |
420 | + No DNSData matches the given query. |
421 | """ |
422 | return DNSData.objects.get_dnsdata_or_404( |
423 | id, request.user, NodePermission.view |
424 | @@ -232,7 +232,7 @@ class DNSResourceRecordHandler(OperationsHandler): |
425 | @error (content) "not-found" The requested DNS resource record is not |
426 | found. |
427 | @error-example "not-found" |
428 | - Not Found |
429 | + No DNSData matches the given query. |
430 | """ |
431 | dnsdata = DNSData.objects.get_dnsdata_or_404( |
432 | id, request.user, NodePermission.admin |
433 | @@ -261,7 +261,7 @@ class DNSResourceRecordHandler(OperationsHandler): |
434 | @error (content) "not-found" The requested DNS resource record is not |
435 | found. |
436 | @error-example "not-found" |
437 | - Not Found |
438 | + No DNSData matches the given query. |
439 | """ |
440 | dnsdata = DNSData.objects.get_dnsdata_or_404( |
441 | id, request.user, NodePermission.admin |
442 | diff --git a/src/maasserver/api/dnsresources.py b/src/maasserver/api/dnsresources.py |
443 | index 630c07d..5afe279 100644 |
444 | --- a/src/maasserver/api/dnsresources.py |
445 | +++ b/src/maasserver/api/dnsresources.py |
446 | @@ -149,7 +149,7 @@ class DNSResourcesHandler(OperationsHandler): |
447 | @error (http-status-code) "404" 404 |
448 | @error (content) "not-found" The requested DNS resources are not found. |
449 | @error-example "not-found" |
450 | - Not Found |
451 | + No DNSResource matches the given query. |
452 | """ |
453 | data = request.GET |
454 | fqdn = data.get("fqdn", None) |
455 | @@ -283,7 +283,7 @@ class DNSResourceHandler(OperationsHandler): |
456 | @error (http-status-code) "404" 404 |
457 | @error (content) "not-found" The requested DNS resource is not found. |
458 | @error-example "not-found" |
459 | - Not Found |
460 | + No DNSResource matches the given query. |
461 | """ |
462 | return DNSResource.objects.get_dnsresource_or_404( |
463 | id, request.user, NodePermission.view |
464 | @@ -324,7 +324,7 @@ class DNSResourceHandler(OperationsHandler): |
465 | @error (http-status-code) "404" 404 |
466 | @error (content) "not-found" The requested DNS resource is not found. |
467 | @error-example "not-found" |
468 | - Not Found |
469 | + No DNSResource matches the given query. |
470 | """ |
471 | data = request.data.copy() |
472 | fqdn = data.get("fqdn", None) |
473 | @@ -377,7 +377,7 @@ class DNSResourceHandler(OperationsHandler): |
474 | @error (http-status-code) "404" 404 |
475 | @error (content) "not-found" The requested DNS resource is not found. |
476 | @error-example "not-found" |
477 | - Not Found |
478 | + No DNSResource matches the given query. |
479 | """ |
480 | dnsresource = DNSResource.objects.get_dnsresource_or_404( |
481 | id, request.user, NodePermission.admin |
482 | diff --git a/src/maasserver/api/domains.py b/src/maasserver/api/domains.py |
483 | index a88fe88..4f509cf 100644 |
484 | --- a/src/maasserver/api/domains.py |
485 | +++ b/src/maasserver/api/domains.py |
486 | @@ -159,7 +159,7 @@ class DomainHandler(OperationsHandler): |
487 | @error (http-status-code) "404" 404 |
488 | @error (content) "not-found" The requested domain is not found. |
489 | @error-example "not-found" |
490 | - Not Found |
491 | + No Domain matches the given query. |
492 | """ |
493 | return Domain.objects.get_domain_or_404( |
494 | id, request.user, NodePermission.view |
495 | @@ -193,7 +193,7 @@ class DomainHandler(OperationsHandler): |
496 | @error (http-status-code) "404" 404 |
497 | @error (content) "not-found" The requested domain name is not found. |
498 | @error-example "not-found" |
499 | - Not Found |
500 | + No Domain matches the given query. |
501 | """ |
502 | domain = Domain.objects.get_domain_or_404( |
503 | id, request.user, NodePermission.admin |
504 | @@ -227,7 +227,7 @@ class DomainHandler(OperationsHandler): |
505 | @error (http-status-code) "404" 404 |
506 | @error (content) "not-found" The requested domain name is not found. |
507 | @error-example "not-found" |
508 | - Not Found |
509 | + No Domain matches the given query. |
510 | """ |
511 | domain = Domain.objects.get_domain_or_404( |
512 | id, request.user, NodePermission.admin |
513 | @@ -252,7 +252,7 @@ class DomainHandler(OperationsHandler): |
514 | @error (http-status-code) "404" 404 |
515 | @error (content) "not-found" The requested domain name is not found. |
516 | @error-example "not-found" |
517 | - Not Found |
518 | + No Domain matches the given query. |
519 | """ |
520 | domain = Domain.objects.get_domain_or_404( |
521 | id, request.user, NodePermission.admin |
522 | diff --git a/src/maasserver/api/fabrics.py b/src/maasserver/api/fabrics.py |
523 | index d4fd8cd..599bf4f 100644 |
524 | --- a/src/maasserver/api/fabrics.py |
525 | +++ b/src/maasserver/api/fabrics.py |
526 | @@ -114,7 +114,7 @@ class FabricHandler(OperationsHandler): |
527 | @error (http-status-code) "404" 404 |
528 | @error (content) "not-found" The requested fabric is not found. |
529 | @error-example "not-found" |
530 | - Not Found |
531 | + No Fabric matches the given query. |
532 | """ |
533 | return Fabric.objects.get_fabric_or_404( |
534 | id, request.user, NodePermission.view |
535 | @@ -142,7 +142,7 @@ class FabricHandler(OperationsHandler): |
536 | @error (http-status-code) "404" 404 |
537 | @error (content) "not-found" The requested fabric is not found. |
538 | @error-example "not-found" |
539 | - Not Found |
540 | + No Fabric matches the given query. |
541 | """ |
542 | fabric = Fabric.objects.get_fabric_or_404( |
543 | id, request.user, NodePermission.admin |
544 | @@ -164,7 +164,7 @@ class FabricHandler(OperationsHandler): |
545 | @error (http-status-code) "404" 404 |
546 | @error (content) "not-found" The requested fabric is not found. |
547 | @error-example "not-found" |
548 | - Not Found |
549 | + No Fabric matches the given query. |
550 | """ |
551 | fabric = Fabric.objects.get_fabric_or_404( |
552 | id, request.user, NodePermission.admin |
553 | diff --git a/src/maasserver/api/files.py b/src/maasserver/api/files.py |
554 | index 88c8aa1..c086260 100644 |
555 | --- a/src/maasserver/api/files.py |
556 | +++ b/src/maasserver/api/files.py |
557 | @@ -37,7 +37,7 @@ def get_file_by_name(handler, request): |
558 | @error (http-status-code) "404" 404 |
559 | @error (content) "not-found" The requested file is not found. |
560 | @error-example "not-found" |
561 | - Not Found |
562 | + File not found |
563 | """ |
564 | filename = get_mandatory_param(request.GET, "filename") |
565 | try: |
566 | @@ -62,7 +62,7 @@ def get_file_by_key(handler, request): |
567 | @error (http-status-code) "404" 404 |
568 | @error (content) "not-found" The requested file is not found. |
569 | @error-example "not-found" |
570 | - Not Found |
571 | + No FileStorage matches the given query. |
572 | """ |
573 | key = get_mandatory_param(request.GET, "key") |
574 | db_file = get_object_or_404(FileStorage, key=key) |
575 | @@ -180,7 +180,7 @@ class FileHandler(OperationsHandler): |
576 | @error (http-status-code) "404" 404 |
577 | @error (content) "not-found" The requested file is not found. |
578 | @error-example "not-found" |
579 | - Not Found |
580 | + No FileStorage matches the given query. |
581 | """ |
582 | stored_file = get_object_or_404( |
583 | FileStorage, filename=filename, owner=request.user |
584 | @@ -280,7 +280,7 @@ class FilesHandler(OperationsHandler): |
585 | @error (http-status-code) "404" 404 |
586 | @error (content) "not-found" The requested file is not found. |
587 | @error-example "not-found" |
588 | - Not Found |
589 | + No FileStorage matches the given query. |
590 | """ |
591 | # It is valid for a path in a POST, PUT, or DELETE (or any other HTTP |
592 | # method) to contain a query string. However, Django only makes |
593 | diff --git a/src/maasserver/api/interfaces.py b/src/maasserver/api/interfaces.py |
594 | index 99d0b94..e91f976 100644 |
595 | --- a/src/maasserver/api/interfaces.py |
596 | +++ b/src/maasserver/api/interfaces.py |
597 | @@ -159,7 +159,7 @@ class InterfacesHandler(OperationsHandler): |
598 | @error (http-status-code) "404" 404 |
599 | @error (content) "not-found" The requested machine is not found. |
600 | @error-example "not-found" |
601 | - Not Found |
602 | + No Node matches the given query. |
603 | """ |
604 | node = Node.objects.get_node_or_404( |
605 | system_id, request.user, NodePermission.view |
606 | @@ -203,7 +203,8 @@ class InterfacesHandler(OperationsHandler): |
607 | @error (http-status-code) "404" 404 |
608 | @error (content) "not-found" The requested machine is not found. |
609 | @error-example "not-found" |
610 | - Not Found |
611 | + No Node matches the given query. |
612 | + |
613 | """ |
614 | node = Node.objects.get_node_or_404( |
615 | system_id, request.user, NodePermission.edit |
616 | @@ -335,7 +336,7 @@ class InterfacesHandler(OperationsHandler): |
617 | @error (http-status-code) "404" 404 |
618 | @error (content) "not-found" The requested machine is not found. |
619 | @error-example "not-found" |
620 | - Not Found |
621 | + No Machine matches the given query. |
622 | """ |
623 | machine = Machine.objects.get_node_or_404( |
624 | system_id, request.user, NodePermission.admin |
625 | @@ -381,7 +382,7 @@ class InterfacesHandler(OperationsHandler): |
626 | @error (http-status-code) "404" 404 |
627 | @error (content) "not-found" The requested machine is not found. |
628 | @error-example "not-found" |
629 | - Not Found |
630 | + No Machine matches the given query. |
631 | """ |
632 | machine = Machine.objects.get_node_or_404( |
633 | system_id, request.user, NodePermission.admin |
634 | @@ -449,7 +450,7 @@ class InterfacesHandler(OperationsHandler): |
635 | @error (http-status-code) "404" 404 |
636 | @error (content) "not-found" The requested machine is not found. |
637 | @error-example "not-found" |
638 | - Not Found |
639 | + No Machine matches the given query. |
640 | """ |
641 | machine = Machine.objects.get_node_or_404( |
642 | system_id, request.user, NodePermission.admin |
643 | @@ -553,7 +554,7 @@ class InterfaceHandler(OperationsHandler): |
644 | @error (content) "not-found" The requested machine or interface is not |
645 | found. |
646 | @error-example "not-found" |
647 | - Not Found |
648 | + No Interface matches the given query. |
649 | """ |
650 | return Interface.objects.get_interface_or_404( |
651 | system_id, id, request.user, NodePermission.view |
652 | @@ -718,7 +719,7 @@ class InterfaceHandler(OperationsHandler): |
653 | @error (content) "not-found" The requested machine or interface is not |
654 | found. |
655 | @error-example "not-found" |
656 | - Not Found |
657 | + No Interface matches the given query. |
658 | """ |
659 | interface = Interface.objects.get_interface_or_404( |
660 | system_id, |
661 | @@ -781,7 +782,7 @@ class InterfaceHandler(OperationsHandler): |
662 | @error (content) "not-found" The requested machine or interface is not |
663 | found. |
664 | @error-example "not-found" |
665 | - Not Found |
666 | + No Interface matches the given query. |
667 | """ |
668 | interface = Interface.objects.get_interface_or_404( |
669 | system_id, |
670 | @@ -858,7 +859,7 @@ class InterfaceHandler(OperationsHandler): |
671 | @error (content) "not-found" The requested machine or interface is not |
672 | found. |
673 | @error-example "not-found" |
674 | - Not Found |
675 | + No Interface matches the given query. |
676 | """ |
677 | force = get_optional_param( |
678 | request.POST, "force", default=False, validator=StringBool |
679 | @@ -917,7 +918,7 @@ class InterfaceHandler(OperationsHandler): |
680 | @error (content) "not-found" The requested machine or interface is not |
681 | found. |
682 | @error-example "not-found" |
683 | - Not Found |
684 | + No Interface matches the given query. |
685 | """ |
686 | interface = Interface.objects.get_interface_or_404( |
687 | system_id, |
688 | @@ -962,7 +963,7 @@ class InterfaceHandler(OperationsHandler): |
689 | @error (content) "not-found" The requested machine or interface is not |
690 | found. |
691 | @error-example "not-found" |
692 | - Not Found |
693 | + No Interface matches the given query. |
694 | """ |
695 | interface = Interface.objects.get_interface_or_404( |
696 | system_id, |
697 | @@ -1016,7 +1017,7 @@ class InterfaceHandler(OperationsHandler): |
698 | @error (content) "not-found" The requested machine or interface is not |
699 | found. |
700 | @error-example "not-found" |
701 | - Not Found |
702 | + No Interface matches the given query. |
703 | """ |
704 | interface = Interface.objects.get_interface_or_404( |
705 | system_id, |
706 | @@ -1067,7 +1068,7 @@ class InterfaceHandler(OperationsHandler): |
707 | @error (content) "not-found" The requested machine or interface is not |
708 | found. |
709 | @error-example "not-found" |
710 | - Not Found |
711 | + No Interface matches the given query. |
712 | """ |
713 | interface = Interface.objects.get_interface_or_404( |
714 | system_id, |
715 | @@ -1106,7 +1107,7 @@ class InterfaceHandler(OperationsHandler): |
716 | @error (content) "not-found" The requested machine or interface is not |
717 | found. |
718 | @error-example "not-found" |
719 | - Not Found |
720 | + No Interface matches the given query. |
721 | """ |
722 | interface = Interface.objects.get_interface_or_404( |
723 | system_id, |
724 | diff --git a/src/maasserver/api/ipranges.py b/src/maasserver/api/ipranges.py |
725 | index 06060dc..01ce319 100644 |
726 | --- a/src/maasserver/api/ipranges.py |
727 | +++ b/src/maasserver/api/ipranges.py |
728 | @@ -128,7 +128,7 @@ class IPRangeHandler(OperationsHandler): |
729 | @error (http-status-code) "404" 404 |
730 | @error (content) "not-found" The requested IP range is not found. |
731 | @error-example "not-found" |
732 | - Not Found |
733 | + No IPRange matches the given query. |
734 | """ |
735 | iprange = IPRange.objects.get_iprange_or_404(id) |
736 | return iprange |
737 | @@ -161,7 +161,7 @@ class IPRangeHandler(OperationsHandler): |
738 | @error (http-status-code) "404" 404 |
739 | @error (content) "not-found" The requested IP range is not found. |
740 | @error-example "not-found" |
741 | - Not Found |
742 | + No IPRange matches the given query. |
743 | """ |
744 | iprange = IPRange.objects.get_iprange_or_404(id) |
745 | raise_error_if_not_owner(iprange, request.user) |
746 | @@ -186,7 +186,7 @@ class IPRangeHandler(OperationsHandler): |
747 | @error (http-status-code) "404" 404 |
748 | @error (content) "not-found" The requested IP range is not found. |
749 | @error-example "not-found" |
750 | - Not Found |
751 | + No IPRange matches the given query. |
752 | """ |
753 | iprange = IPRange.objects.get_iprange_or_404(id) |
754 | raise_error_if_not_owner(iprange, request.user) |
755 | diff --git a/src/maasserver/api/machines.py b/src/maasserver/api/machines.py |
756 | index feda648..ac05639 100644 |
757 | --- a/src/maasserver/api/machines.py |
758 | +++ b/src/maasserver/api/machines.py |
759 | @@ -400,7 +400,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
760 | @error (http-status-code) "404" 404 |
761 | @error (content) "not-found" The requested static-route is not found. |
762 | @error-example "not-found" |
763 | - Not Found |
764 | + No Machine matches the given query. |
765 | """ |
766 | node = self.model.objects.get_node_or_404( |
767 | system_id=system_id, user=request.user, perm=NodePermission.admin |
768 | @@ -635,7 +635,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
769 | @error (http-status-code) "404" 404 |
770 | @error (content) "not-found" The requested machine is not found. |
771 | @error-example "not-found" |
772 | - Not Found |
773 | + No Machine matches the given query. |
774 | |
775 | @error (http-status-code) "403" 403 |
776 | @error (content) "no-perms" The user does not have permission to update |
777 | @@ -756,7 +756,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
778 | @error (http-status-code) "404" 404 |
779 | @error (content) "not-found" The requested machine is not found. |
780 | @error-example "not-found" |
781 | - Not Found |
782 | + No Machine matches the given query. |
783 | |
784 | @error (http-status-code) "403" 403 |
785 | @error (content) "no-perms" The user does not have permission to deploy |
786 | @@ -919,7 +919,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
787 | @error (http-status-code) "404" 404 |
788 | @error (content) "not-found" The requested machine is not found. |
789 | @error-example "not-found" |
790 | - Not Found |
791 | + No Machine matches the given query. |
792 | |
793 | @error (http-status-code) "403" 403 |
794 | @error (content) "no-perms" The user does not have permission to |
795 | @@ -1022,7 +1022,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
796 | @error (http-status-code) "404" 404 |
797 | @error (content) "not-found" The requested machine is not found. |
798 | @error-example "not-found" |
799 | - Not Found |
800 | + No Machine matches the given query. |
801 | """ |
802 | machine = self.model.objects.get_node_or_404( |
803 | system_id=system_id, user=request.user, perm=NodePermission.admin |
804 | @@ -1096,7 +1096,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
805 | @error (http-status-code) "404" 404 |
806 | @error (content) "not-found" The requested machine is not found. |
807 | @error-example "not-found" |
808 | - Not Found |
809 | + No Machine matches the given query. |
810 | |
811 | @error (http-status-code) "403" 403 |
812 | @error (content) "no-perms" The user does not have permission to set |
813 | @@ -1171,7 +1171,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
814 | @error (http-status-code) "404" 404 |
815 | @error (content) "not-found" The requested machine is not found. |
816 | @error-example "not-found" |
817 | - Not Found |
818 | + No Machine matches the given query. |
819 | """ |
820 | machine = self.model.objects.get_node_or_404( |
821 | system_id=system_id, user=request.user, perm=NodePermission.edit |
822 | @@ -1214,7 +1214,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
823 | @error (http-status-code) "404" 404 |
824 | @error (content) "not-found" The requested machine is not found. |
825 | @error-example "not-found" |
826 | - Not Found |
827 | + No Machine matches the given query. |
828 | """ |
829 | machine = self.model.objects.get_node_or_404( |
830 | system_id=system_id, user=request.user, perm=NodePermission.edit |
831 | @@ -1267,7 +1267,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
832 | @error (http-status-code) "404" 404 |
833 | @error (content) "not-found" The requested machine is not found. |
834 | @error-example "not-found" |
835 | - Not Found |
836 | + No Machine matches the given query. |
837 | """ |
838 | machine = self.model.objects.get_node_or_404( |
839 | system_id=system_id, user=request.user, perm=NodePermission.admin |
840 | @@ -1297,7 +1297,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
841 | @error (http-status-code) "404" 404 |
842 | @error (content) "not-found" The requested machine is not found. |
843 | @error-example "not-found" |
844 | - Not Found |
845 | + No Machine matches the given query. |
846 | """ |
847 | machine = self.model.objects.get_node_or_404( |
848 | system_id=system_id, user=request.user, perm=NodePermission.view |
849 | @@ -1339,7 +1339,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
850 | @error (http-status-code) "404" 404 |
851 | @error (content) "not-found" The requested machine is not found. |
852 | @error-example "not-found" |
853 | - Not Found |
854 | + No Machine matches the given query. |
855 | """ |
856 | machine = self.model.objects.get_node_or_404( |
857 | system_id=system_id, user=request.user, perm=NodePermission.admin |
858 | @@ -1377,7 +1377,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
859 | @error (http-status-code) "404" 404 |
860 | @error (content) "not-found" The requested machine is not found. |
861 | @error-example "not-found" |
862 | - Not Found |
863 | + No Machine matches the given query. |
864 | """ |
865 | machine = self.model.objects.get_node_or_404( |
866 | system_id=system_id, user=request.user, perm=NodePermission.admin |
867 | @@ -1414,7 +1414,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
868 | @error (http-status-code) "404" 404 |
869 | @error (content) "not-found" The requested machine is not found. |
870 | @error-example "not-found" |
871 | - Not Found |
872 | + No Machine matches the given query. |
873 | """ |
874 | machine = self.model.objects.get_node_or_404( |
875 | system_id=system_id, user=request.user, perm=NodePermission.admin |
876 | @@ -1458,7 +1458,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
877 | @error (http-status-code) "404" 404 |
878 | @error (content) "not-found" The requested machine is not found. |
879 | @error-example "not-found" |
880 | - Not Found |
881 | + No Machine matches the given query. |
882 | """ |
883 | node = self.model.objects.get_node_or_404( |
884 | user=request.user, system_id=system_id, perm=NodePermission.edit |
885 | @@ -1495,7 +1495,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
886 | @error (http-status-code) "404" 404 |
887 | @error (content) "not-found" The requested machine is not found. |
888 | @error-example "not-found" |
889 | - Not Found |
890 | + No Machine matches the given query. |
891 | """ |
892 | comment = get_optional_param(request.POST, "comment") |
893 | node = self.model.objects.get_node_or_404( |
894 | @@ -1533,7 +1533,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
895 | @error (http-status-code) "404" 404 |
896 | @error (content) "not-found" The requested machine is not found. |
897 | @error-example "not-found" |
898 | - Not Found |
899 | + No Machine matches the given query. |
900 | """ |
901 | machine = self.model.objects.get_node_or_404( |
902 | system_id=system_id, user=request.user, perm=NodePermission.admin |
903 | @@ -1570,7 +1570,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
904 | @error (http-status-code) "404" 404 |
905 | @error (content) "not-found" The requested machine is not found. |
906 | @error-example "not-found" |
907 | - Not Found |
908 | + No Machine matches the given query. |
909 | """ |
910 | machine = self.model.objects.get_node_or_404( |
911 | system_id=system_id, user=request.user, perm=NodePermission.admin |
912 | @@ -1607,7 +1607,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
913 | @error (http-status-code) "404" 404 |
914 | @error (content) "not-found" The requested machine is not found. |
915 | @error-example "not-found" |
916 | - Not Found |
917 | + No Machine matches the given query. |
918 | """ |
919 | machine = self.model.objects.get_node_or_404( |
920 | system_id=system_id, user=request.user, perm=NodePermission.lock |
921 | @@ -1642,7 +1642,7 @@ class MachineHandler(NodeHandler, WorkloadAnnotationsMixin, PowerMixin): |
922 | @error (http-status-code) "404" 404 |
923 | @error (content) "not-found" The requested machine is not found. |
924 | @error-example "not-found" |
925 | - Not Found |
926 | + No Machine matches the given query. |
927 | """ |
928 | machine = self.model.objects.get_node_or_404( |
929 | system_id=system_id, user=request.user, perm=NodePermission.lock |
930 | diff --git a/src/maasserver/api/nodedevices.py b/src/maasserver/api/nodedevices.py |
931 | index 19db6f0..354150a 100644 |
932 | --- a/src/maasserver/api/nodedevices.py |
933 | +++ b/src/maasserver/api/nodedevices.py |
934 | @@ -65,7 +65,7 @@ class NodeDevicesHandler(OperationsHandler): |
935 | @error (http-status-code) "404" 404 |
936 | @error (content) "not-found" The requested machine is not found. |
937 | @error-example "not-found" |
938 | - Not Found |
939 | + No Node matches the given query. |
940 | """ |
941 | node = Node.objects.get_node_or_404( |
942 | system_id=system_id, user=request.user, perm=NodePermission.view |
943 | @@ -222,7 +222,7 @@ class NodeDeviceHandler(OperationsHandler): |
944 | @error (content) "not-found" The requested node or node device is |
945 | not found. |
946 | @error-example "not-found" |
947 | - Not Found |
948 | + No Node matches the given query. |
949 | """ |
950 | return self._get_node_device(request, system_id, id) |
951 | |
952 | @@ -243,7 +243,7 @@ class NodeDeviceHandler(OperationsHandler): |
953 | @error (content) "not-found" The requested node or node device is |
954 | not found. |
955 | @error-example "not-found" |
956 | - Not Found |
957 | + No Node matches the given query. |
958 | """ |
959 | node_device = self._get_node_device(request, system_id, id) |
960 | node_device.delete() |
961 | diff --git a/src/maasserver/api/nodes.py b/src/maasserver/api/nodes.py |
962 | index de2a496..6896e07 100644 |
963 | --- a/src/maasserver/api/nodes.py |
964 | +++ b/src/maasserver/api/nodes.py |
965 | @@ -453,7 +453,7 @@ class NodeHandler(OperationsHandler): |
966 | @error (http-status-code) "404" 404 |
967 | @error (content) "not-found" The requested node is not found. |
968 | @error-example "not-found" |
969 | - Not Found |
970 | + No Node matches the given query. |
971 | """ |
972 | node = self.model.objects.get_node_or_404( |
973 | system_id=system_id, user=request.user, perm=NodePermission.view |
974 | @@ -476,7 +476,7 @@ class NodeHandler(OperationsHandler): |
975 | @error (http-status-code) "404" 404 |
976 | @error (content) "not-found" The requested node is not found. |
977 | @error-example "not-found" |
978 | - Not Found |
979 | + No Node matches the given query. |
980 | |
981 | @error (http-status-code) "403" 403 |
982 | @error (content) "no-perms" The user is not authorized to delete the |
983 | @@ -542,7 +542,7 @@ class NodeHandler(OperationsHandler): |
984 | @error (http-status-code) "404" 404 |
985 | @error (content) "not-found" The requested node is not found. |
986 | @error-example "not-found" |
987 | - Not Found |
988 | + No Node matches the given query. |
989 | """ |
990 | node = get_object_or_404(self.model, system_id=system_id) |
991 | probe_details = get_single_probed_details(node) |
992 | @@ -577,7 +577,7 @@ class NodeHandler(OperationsHandler): |
993 | @error (http-status-code) "404" 404 |
994 | @error (content) "not-found" The requested node is not found. |
995 | @error-example "not-found" |
996 | - Not Found |
997 | + No Node matches the given query. |
998 | """ |
999 | node = Node.objects.get_node_or_404( |
1000 | system_id, request.user, NodePermission.admin_read |
1001 | @@ -943,7 +943,7 @@ class PowerMixin: |
1002 | @error (http-status-code) "404" 404 |
1003 | @error (content) "not-found" The requested node is not found. |
1004 | @error-example "not-found" |
1005 | - Not Found |
1006 | + No Node matches the given query. |
1007 | """ |
1008 | node = self.model.objects.get_node_or_404( |
1009 | system_id=system_id, user=request.user, perm=NodePermission.view |
1010 | @@ -969,7 +969,7 @@ class PowerMixin: |
1011 | @error (http-status-code) "404" 404 |
1012 | @error (content) "not-found" The requested node is not found. |
1013 | @error-example "not-found" |
1014 | - Not Found |
1015 | + No Node matches the given query. |
1016 | |
1017 | @error (http-status-code) "403" 403 |
1018 | @error (content) "no-perms" The user is not authorized to power on the |
1019 | @@ -1070,7 +1070,7 @@ class PowerMixin: |
1020 | @error (http-status-code) "404" 404 |
1021 | @error (content) "not-found" The requested node is not found. |
1022 | @error-example "not-found" |
1023 | - Not Found |
1024 | + No Node matches the given query. |
1025 | |
1026 | @error (http-status-code) "403" 403 |
1027 | @error (content) "no-perms" The user is not authorized to power off the |
1028 | @@ -1121,7 +1121,7 @@ class PowerMixin: |
1029 | @error (http-status-code) "404" 404 |
1030 | @error (content) "not-found" The requested node is not found. |
1031 | @error-example "not-found" |
1032 | - Not Found |
1033 | + No Node matches the given query. |
1034 | """ |
1035 | node = self.model.objects.get_node_or_404( |
1036 | system_id=system_id, user=request.user, perm=NodePermission.admin |
1037 | @@ -1147,7 +1147,7 @@ class PowerMixin: |
1038 | @error (http-status-code) "404" 404 |
1039 | @error (content) "not-found" The requested node is not found. |
1040 | @error-example "not-found" |
1041 | - Not Found |
1042 | + No Node matches the given query. |
1043 | |
1044 | @error (http-status-code) "403" 403 |
1045 | @error (content) "no-perms" The user is not authorized to override |
1046 | @@ -1172,7 +1172,7 @@ class PowerMixin: |
1047 | @error (http-status-code) "404" 404 |
1048 | @error (content) "not-found" The requested node is not found. |
1049 | @error-example "not-found" |
1050 | - Not Found |
1051 | + No Node matches the given query. |
1052 | |
1053 | @error (http-status-code) "403" 403 |
1054 | @error (content) "no-perms" The user is not authorized to abort the |
1055 | diff --git a/src/maasserver/api/notification.py b/src/maasserver/api/notification.py |
1056 | index f8c98ca..0ce6e28 100644 |
1057 | --- a/src/maasserver/api/notification.py |
1058 | +++ b/src/maasserver/api/notification.py |
1059 | @@ -121,7 +121,7 @@ class NotificationHandler(OperationsHandler): |
1060 | @error (http-status-code) "404" 404 |
1061 | @error (content) "not-found" The requested notification is not found. |
1062 | @error-example "not-found" |
1063 | - Not Found |
1064 | + No Notification matches the given query. |
1065 | """ |
1066 | notification = get_object_or_404(Notification, id=id) |
1067 | if notification.is_relevant_to(request.user): |
1068 | @@ -179,7 +179,7 @@ class NotificationHandler(OperationsHandler): |
1069 | @error (http-status-code) "404" 404 |
1070 | @error (content) "not-found" The requested notification is not found. |
1071 | @error-example "not-found" |
1072 | - Not Found |
1073 | + No Notification matches the given query. |
1074 | """ |
1075 | notification = get_object_or_404(Notification, id=id) |
1076 | form = NotificationForm(data=request.data, instance=notification) |
1077 | @@ -200,7 +200,7 @@ class NotificationHandler(OperationsHandler): |
1078 | @error (http-status-code) "404" 404 |
1079 | @error (content) "not-found" The requested notification is not found. |
1080 | @error-example "not-found" |
1081 | - Not Found |
1082 | + No Notification matches the given query. |
1083 | """ |
1084 | notification = get_object_or_404(Notification, id=id) |
1085 | notification.delete() |
1086 | @@ -224,7 +224,7 @@ class NotificationHandler(OperationsHandler): |
1087 | @error (http-status-code) "404" 404 |
1088 | @error (content) "not-found" The requested notification is not found. |
1089 | @error-example "not-found" |
1090 | - Not Found |
1091 | + No Notification matches the given query. |
1092 | """ |
1093 | notification = get_object_or_404(Notification, id=id) |
1094 | if notification.is_relevant_to(request.user): |
1095 | diff --git a/src/maasserver/api/packagerepositories.py b/src/maasserver/api/packagerepositories.py |
1096 | index ade7205..ab2755e 100644 |
1097 | --- a/src/maasserver/api/packagerepositories.py |
1098 | +++ b/src/maasserver/api/packagerepositories.py |
1099 | @@ -64,7 +64,7 @@ class PackageRepositoryHandler(OperationsHandler): |
1100 | @error (content) "not-found" The requested package repository is not |
1101 | found. |
1102 | @error-example "not-found" |
1103 | - Not Found |
1104 | + No PackageRepository matches the given query. |
1105 | """ |
1106 | return PackageRepository.objects.get_object_or_404(id) |
1107 | |
1108 | @@ -116,7 +116,7 @@ class PackageRepositoryHandler(OperationsHandler): |
1109 | @error (content) "not-found" The requested package repository is not |
1110 | found. |
1111 | @error-example "not-found" |
1112 | - Not Found |
1113 | + No PackageRepository matches the given query. |
1114 | """ |
1115 | package_repository = PackageRepository.objects.get_object_or_404(id) |
1116 | form = PackageRepositoryForm( |
1117 | @@ -140,7 +140,7 @@ class PackageRepositoryHandler(OperationsHandler): |
1118 | @error (content) "not-found" The requested package repository is not |
1119 | found. |
1120 | @error-example "not-found" |
1121 | - Not Found |
1122 | + No PackageRepository matches the given query. |
1123 | """ |
1124 | package_repository = PackageRepository.objects.get_object_or_404(id) |
1125 | package_repository.delete() |
1126 | diff --git a/src/maasserver/api/partitions.py b/src/maasserver/api/partitions.py |
1127 | index dd1b431..4302d8d 100644 |
1128 | --- a/src/maasserver/api/partitions.py |
1129 | +++ b/src/maasserver/api/partitions.py |
1130 | @@ -94,7 +94,7 @@ class PartitionsHandler(OperationsHandler): |
1131 | @error (content) "not-found" The requested machine or device is not |
1132 | found. |
1133 | @error-example "not-found" |
1134 | - Not Found |
1135 | + No BlockDevice matches the given query. |
1136 | """ |
1137 | device = BlockDevice.objects.get_block_device_or_404( |
1138 | system_id, device_id, request.user, NodePermission.view |
1139 | @@ -131,7 +131,7 @@ class PartitionsHandler(OperationsHandler): |
1140 | @error (content) "not-found" The requested machine or device is not |
1141 | found. |
1142 | @error-example "not-found" |
1143 | - Not Found |
1144 | + No BlockDevice matches the given query. |
1145 | """ |
1146 | device = BlockDevice.objects.get_block_device_or_404( |
1147 | system_id, device_id, request.user, NodePermission.admin |
1148 | @@ -213,7 +213,7 @@ class PartitionHandler(OperationsHandler): |
1149 | @error (content) "not-found" The requested machine, device or partition |
1150 | is not found. |
1151 | @error-example "not-found" |
1152 | - Not Found |
1153 | + No BlockDevice matches the given query. |
1154 | """ |
1155 | device = BlockDevice.objects.get_block_device_or_404( |
1156 | system_id, device_id, request.user, NodePermission.view |
1157 | @@ -235,7 +235,7 @@ class PartitionHandler(OperationsHandler): |
1158 | @error (content) "not-found" The requested machine, device or partition |
1159 | is not found. |
1160 | @error-example "not-found" |
1161 | - Not Found |
1162 | + No BlockDevice matches the given query. |
1163 | """ |
1164 | device = BlockDevice.objects.get_block_device_or_404( |
1165 | system_id, device_id, request.user, NodePermission.admin |
1166 | @@ -282,7 +282,7 @@ class PartitionHandler(OperationsHandler): |
1167 | @error (content) "not-found" The requested machine, device or partition |
1168 | is not found. |
1169 | @error-example "not-found" |
1170 | - Not Found |
1171 | + No BlockDevice matches the given query. |
1172 | """ |
1173 | device = BlockDevice.objects.get_block_device_or_404( |
1174 | system_id, device_id, request.user, NodePermission.edit |
1175 | @@ -318,7 +318,7 @@ class PartitionHandler(OperationsHandler): |
1176 | @error (content) "not-found" The requested machine, device or partition |
1177 | is not found. |
1178 | @error-example "not-found" |
1179 | - Not Found |
1180 | + No BlockDevice matches the given query. |
1181 | """ |
1182 | device = BlockDevice.objects.get_block_device_or_404( |
1183 | system_id, device_id, request.user, NodePermission.edit |
1184 | @@ -376,7 +376,7 @@ class PartitionHandler(OperationsHandler): |
1185 | @error (content) "not-found" The requested machine, device or partition |
1186 | is not found. |
1187 | @error-example "not-found" |
1188 | - Not Found |
1189 | + No BlockDevice matches the given query. |
1190 | """ |
1191 | device = BlockDevice.objects.get_block_device_or_404( |
1192 | system_id, device_id, request.user, NodePermission.edit |
1193 | @@ -422,7 +422,7 @@ class PartitionHandler(OperationsHandler): |
1194 | @error (content) "not-found" The requested machine, device or partition |
1195 | is not found. |
1196 | @error-example "not-found" |
1197 | - Not Found |
1198 | + No BlockDevice matches the given query. |
1199 | """ |
1200 | device = BlockDevice.objects.get_block_device_or_404( |
1201 | system_id, device_id, request.user, NodePermission.edit |
1202 | @@ -468,7 +468,7 @@ class PartitionHandler(OperationsHandler): |
1203 | @error (content) "not-found" The requested machine, device or partition |
1204 | is not found. |
1205 | @error-example "not-found" |
1206 | - Not Found |
1207 | + No BlockDevice matches the given query. |
1208 | """ |
1209 | device = BlockDevice.objects.get_block_device_or_404( |
1210 | system_id, device_id, request.user, NodePermission.admin |
1211 | @@ -504,7 +504,7 @@ class PartitionHandler(OperationsHandler): |
1212 | @error (content) "not-found" The requested machine, device or partition |
1213 | is not found. |
1214 | @error-example "not-found" |
1215 | - Not Found |
1216 | + No BlockDevice matches the given query. |
1217 | """ |
1218 | device = BlockDevice.objects.get_block_device_or_404( |
1219 | system_id, device_id, request.user, NodePermission.admin |
1220 | diff --git a/src/maasserver/api/pods.py b/src/maasserver/api/pods.py |
1221 | index 85f1d59..f4bfbea 100644 |
1222 | --- a/src/maasserver/api/pods.py |
1223 | +++ b/src/maasserver/api/pods.py |
1224 | @@ -177,7 +177,7 @@ class VmHostHandler(OperationsHandler): |
1225 | @error (http-status-code) "404" 404 |
1226 | @error (content) "not-found" No VM host with that ID can be found. |
1227 | @error-example "not-found" |
1228 | - Not Found |
1229 | + No Pod matches the given query. |
1230 | |
1231 | @error (http-status-code) "403" 403 |
1232 | @error (content) "no-perms" The user does not have the permissions |
1233 | @@ -208,7 +208,7 @@ class VmHostHandler(OperationsHandler): |
1234 | @error (http-status-code) "404" 404 |
1235 | @error (content) "not-found" No VM host with that ID can be found. |
1236 | @error-example "not-found" |
1237 | - Not Found |
1238 | + No Pod matches the given query. |
1239 | |
1240 | @error (http-status-code) "403" 403 |
1241 | @error (content) "no-perms" The user does not have the permissions |
1242 | @@ -239,7 +239,7 @@ class VmHostHandler(OperationsHandler): |
1243 | @error (http-status-code) "404" 404 |
1244 | @error (content) "not-found" No VM host with that ID can be found. |
1245 | @error-example "not-found" |
1246 | - Not Found |
1247 | + No Pod matches the given query. |
1248 | |
1249 | @error (http-status-code) "403" 403 |
1250 | @error (content) "no-perms" The user does not have the permissions |
1251 | @@ -321,7 +321,7 @@ class VmHostHandler(OperationsHandler): |
1252 | @error (http-status-code) "404" 404 |
1253 | @error (content) "not-found" No VM host with that ID can be found. |
1254 | @error-example "not-found" |
1255 | - Not Found |
1256 | + No Pod matches the given query. |
1257 | |
1258 | @error (http-status-code) "403" 403 |
1259 | @error (content) "no-perms" The user does not have the permissions |
1260 | @@ -365,7 +365,7 @@ class VmHostHandler(OperationsHandler): |
1261 | @error (http-status-code) "404" 404 |
1262 | @error (content) "not-found" No VM host with that ID can be found. |
1263 | @error-example "not-found" |
1264 | - Not Found |
1265 | + No Pod matches the given query. |
1266 | |
1267 | @error (http-status-code) "403" 403 |
1268 | @error (content) "no-perms" The user does not have the permissions |
1269 | @@ -400,7 +400,7 @@ class VmHostHandler(OperationsHandler): |
1270 | @error (http-status-code) "404" 404 |
1271 | @error (content) "not-found" No VM host with that ID can be found. |
1272 | @error-example "not-found" |
1273 | - Not Found |
1274 | + No Pod matches the given query. |
1275 | |
1276 | @error (http-status-code) "403" 403 |
1277 | @error (content) "no-perms" The user does not have the permissions |
1278 | @@ -502,7 +502,7 @@ class VmHostsHandler(OperationsHandler): |
1279 | @error (http-status-code) "404" 404 |
1280 | @error (content) "not-found" No VM host with that ID can be found. |
1281 | @error-example "not-found" |
1282 | - Not Found |
1283 | + No Pod matches the given query. |
1284 | |
1285 | @error (http-status-code) "403" 403 |
1286 | @error (content) "no-perms" The user does not have the permissions |
1287 | diff --git a/src/maasserver/api/rackcontrollers.py b/src/maasserver/api/rackcontrollers.py |
1288 | index b489f81..71710fb 100644 |
1289 | --- a/src/maasserver/api/rackcontrollers.py |
1290 | +++ b/src/maasserver/api/rackcontrollers.py |
1291 | @@ -106,7 +106,7 @@ class RackControllerHandler(NodeHandler, PowerMixin): |
1292 | @error (content) "not-found" The requested rack controller system_id |
1293 | is not found. |
1294 | @error-example "not-found" |
1295 | - Not Found |
1296 | + No RackController matches the given query. |
1297 | |
1298 | @error (http-status-code) "403" 403 |
1299 | @error (content) "no-perms" The user does not have permssions to |
1300 | @@ -165,7 +165,7 @@ class RackControllerHandler(NodeHandler, PowerMixin): |
1301 | @error (content) "not-found" The requested rack controller system_id |
1302 | is not found. |
1303 | @error-example "not-found" |
1304 | - Not Found |
1305 | + No RackController matches the given query. |
1306 | |
1307 | @error (http-status-code) "403" 403 |
1308 | @error (content) "no-perms" This method is reserved for admin users. |
1309 | @@ -198,7 +198,7 @@ class RackControllerHandler(NodeHandler, PowerMixin): |
1310 | @error (content) "not-found" The requested rack controller system_id |
1311 | is not found. |
1312 | @error-example "not-found" |
1313 | - Not Found |
1314 | + No RackController matches the given query. |
1315 | """ |
1316 | # Avoid circular import. |
1317 | from maasserver.clusterrpc.boot_images import RackControllersImporter |
1318 | @@ -227,7 +227,7 @@ class RackControllerHandler(NodeHandler, PowerMixin): |
1319 | @error (content) "not-found" The requested rack controller system_id |
1320 | is not found. |
1321 | @error-example "not-found" |
1322 | - Not Found |
1323 | + No RackController matches the given query. |
1324 | """ |
1325 | rack = self.model.objects.get_node_or_404( |
1326 | system_id=system_id, user=request.user, perm=NodePermission.view |
1327 | @@ -262,7 +262,7 @@ class RackControllersHandler(NodesHandler, PowersMixin): |
1328 | @error (content) "not-found" The requested rack controller system_id |
1329 | is not found. |
1330 | @error-example "not-found" |
1331 | - Not Found |
1332 | + No RackController matches the given query. |
1333 | """ |
1334 | # Avoid circular import. |
1335 | from maasserver.clusterrpc.boot_images import RackControllersImporter |
1336 | diff --git a/src/maasserver/api/raid.py b/src/maasserver/api/raid.py |
1337 | index 0fc4916..7a44165 100644 |
1338 | --- a/src/maasserver/api/raid.py |
1339 | +++ b/src/maasserver/api/raid.py |
1340 | @@ -73,7 +73,7 @@ class RaidsHandler(OperationsHandler): |
1341 | @error (http-status-code) "404" 404 |
1342 | @error (content) "not-found" The requested machine is not found. |
1343 | @error-example "not-found" |
1344 | - Not Found |
1345 | + No Machine matches the given query. |
1346 | |
1347 | @error (http-status-code) "409" 409 |
1348 | @error (content) "not-ready" The requested machine is not ready. |
1349 | @@ -110,7 +110,7 @@ class RaidsHandler(OperationsHandler): |
1350 | @error (http-status-code) "404" 404 |
1351 | @error (content) "not-found" The requested machine is not found. |
1352 | @error-example "not-found" |
1353 | - Not Found |
1354 | + No Machine matches the given query. |
1355 | """ |
1356 | machine = Machine.objects.get_node_or_404( |
1357 | system_id, request.user, NodePermission.view |
1358 | @@ -205,7 +205,7 @@ class RaidHandler(OperationsHandler): |
1359 | @error (content) "not-found" The requested machine or RAID is not |
1360 | found. |
1361 | @error-example "not-found" |
1362 | - Not Found |
1363 | + No RAID matches the given query. |
1364 | """ |
1365 | return RAID.objects.get_object_or_404( |
1366 | system_id, id, request.user, NodePermission.view |
1367 | @@ -258,7 +258,7 @@ class RaidHandler(OperationsHandler): |
1368 | @error (content) "not-found" The requested machine or RAID id is not |
1369 | found. |
1370 | @error-example "not-found" |
1371 | - Not Found |
1372 | + No RAID matches the given query. |
1373 | |
1374 | @error (http-status-code) "409" 409 |
1375 | @error (content) "not-ready" The requested machine is not ready. |
1376 | @@ -292,7 +292,7 @@ class RaidHandler(OperationsHandler): |
1377 | @error (content) "not-found" The requested machine or RAID is not |
1378 | found. |
1379 | @error-example "not-found" |
1380 | - Not Found |
1381 | + No RAID matches the given query. |
1382 | |
1383 | @error (http-status-code) "409" 409 |
1384 | @error (content) "not-ready" The requested machine is not ready. |
1385 | diff --git a/src/maasserver/api/regioncontrollers.py b/src/maasserver/api/regioncontrollers.py |
1386 | index 229de5f..cf0bafe 100644 |
1387 | --- a/src/maasserver/api/regioncontrollers.py |
1388 | +++ b/src/maasserver/api/regioncontrollers.py |
1389 | @@ -93,7 +93,7 @@ class RegionControllerHandler(NodeHandler): |
1390 | @error (content) "not-found" The requested rack controller system_id |
1391 | is not found. |
1392 | @error-example "not-found" |
1393 | - Not Found |
1394 | + No RegionController matches the given query. |
1395 | |
1396 | @error (http-status-code) "403" 403 |
1397 | @error (content) "no-perms" The user does not have permission to |
1398 | @@ -151,7 +151,7 @@ class RegionControllerHandler(NodeHandler): |
1399 | @error (content) "not-found" The requested region controller system_id |
1400 | is not found. |
1401 | @error-example "not-found" |
1402 | - Not Found |
1403 | + No RegionController matches the given query. |
1404 | |
1405 | @error (http-status-code) "403" 403 |
1406 | @error (content) "no-perms" The user does not have permission to |
1407 | diff --git a/src/maasserver/api/resourcepools.py b/src/maasserver/api/resourcepools.py |
1408 | index bb0e25a..a28c6fd 100644 |
1409 | --- a/src/maasserver/api/resourcepools.py |
1410 | +++ b/src/maasserver/api/resourcepools.py |
1411 | @@ -58,7 +58,7 @@ class ResourcePoolHandler(ModelOperationsHandler): |
1412 | @error (http-status-code) "404" 404 |
1413 | @error (content) "notfound" The resource pool name is not found. |
1414 | @error-example "notfound" |
1415 | - Not Found |
1416 | + No ResourcePool matches the given query. |
1417 | """ |
1418 | return ResourcePool.objects.get_resource_pool_or_404( |
1419 | id, request.user, self.permission_read |
1420 | @@ -93,7 +93,7 @@ class ResourcePoolHandler(ModelOperationsHandler): |
1421 | @error (http-status-code) "404" 404 |
1422 | @error (content) "notfound" Zone not found |
1423 | @error-example "notfound" |
1424 | - Not Found |
1425 | + No ResourcePool matches the given query. |
1426 | """ |
1427 | pool = ResourcePool.objects.get_resource_pool_or_404( |
1428 | id, request.user, self.permission_edit |
1429 | diff --git a/src/maasserver/api/scriptresults.py b/src/maasserver/api/scriptresults.py |
1430 | index 8640cfc..8ca1855 100644 |
1431 | --- a/src/maasserver/api/scriptresults.py |
1432 | +++ b/src/maasserver/api/scriptresults.py |
1433 | @@ -116,7 +116,7 @@ class NodeScriptResultsHandler(OperationsHandler): |
1434 | @error (http-status-code) "404" 404 |
1435 | @error (content) "not-found" The requested machine is not found. |
1436 | @error-example "not-found" |
1437 | - Not Found |
1438 | + No Node matches the given query. |
1439 | """ |
1440 | node = Node.objects.get_node_or_404( |
1441 | system_id=system_id, user=request.user, perm=NodePermission.view |
1442 | @@ -308,7 +308,7 @@ class NodeScriptResultHandler(OperationsHandler): |
1443 | @error (content) "not-found" The requested machine or script result is |
1444 | not found. |
1445 | @error-example "not-found" |
1446 | - Not Found |
1447 | + No Node matches the given query. |
1448 | """ |
1449 | script_set = self._get_script_set(request, system_id, id) |
1450 | include_output = get_optional_param( |
1451 | @@ -346,7 +346,7 @@ class NodeScriptResultHandler(OperationsHandler): |
1452 | @error (content) "not-found" The requested machine or script result is |
1453 | not found. |
1454 | @error-example "not-found" |
1455 | - Not Found |
1456 | + No Node matches the given query. |
1457 | """ |
1458 | script_set = self._get_script_set(request, system_id, id) |
1459 | script_set.delete() |
1460 | @@ -413,7 +413,7 @@ class NodeScriptResultHandler(OperationsHandler): |
1461 | @error (content) "not-found" The requested machine or script result is |
1462 | not found. |
1463 | @error-example "not-found" |
1464 | - Not Found |
1465 | + No Node matches the given query. |
1466 | """ |
1467 | script_set = self._get_script_set(request, system_id, id) |
1468 | filters = get_optional_param(request.GET, "filters", None, String) |
1469 | @@ -547,7 +547,7 @@ class NodeScriptResultHandler(OperationsHandler): |
1470 | @error (content) "not-found" The requested machine or script result is |
1471 | not found. |
1472 | @error-example "not-found" |
1473 | - Not Found |
1474 | + No Node matches the given query. |
1475 | """ |
1476 | script_set = self._get_script_set(request, system_id, id) |
1477 | include_output = get_optional_param( |
1478 | diff --git a/src/maasserver/api/scripts.py b/src/maasserver/api/scripts.py |
1479 | index 50d6ab4..40b2221 100644 |
1480 | --- a/src/maasserver/api/scripts.py |
1481 | +++ b/src/maasserver/api/scripts.py |
1482 | @@ -265,7 +265,7 @@ class NodeScriptHandler(OperationsHandler): |
1483 | @error (http-status-code) "404" 404 |
1484 | @error (content) "not-found" The requested script is not found. |
1485 | @error-example "not-found" |
1486 | - Not Found |
1487 | + No Script matches the given query. |
1488 | """ |
1489 | if name.isdigit(): |
1490 | script = get_object_or_404(Script, id=int(name)) |
1491 | @@ -288,7 +288,7 @@ class NodeScriptHandler(OperationsHandler): |
1492 | @error (http-status-code) "404" 404 |
1493 | @error (content) "not-found" The requested script is not found. |
1494 | @error-example "not-found" |
1495 | - Not Found |
1496 | + No Script matches the given query. |
1497 | """ |
1498 | if name.isdigit(): |
1499 | script = get_object_or_404(Script, id=int(name)) |
1500 | @@ -374,7 +374,7 @@ class NodeScriptHandler(OperationsHandler): |
1501 | @error (http-status-code) "404" 404 |
1502 | @error (content) "not-found" The requested script is not found. |
1503 | @error-example "not-found" |
1504 | - Not Found |
1505 | + No Script matches the given query. |
1506 | """ |
1507 | if name.isdigit(): |
1508 | script = get_object_or_404(Script, id=int(name)) |
1509 | @@ -414,7 +414,7 @@ class NodeScriptHandler(OperationsHandler): |
1510 | @error (http-status-code) "404" 404 |
1511 | @error (content) "not-found" The requested script is not found. |
1512 | @error-example "not-found" |
1513 | - Not Found |
1514 | + No Script matches the given query. |
1515 | """ |
1516 | if name.isdigit(): |
1517 | script = get_object_or_404(Script, id=int(name)) |
1518 | @@ -455,7 +455,7 @@ class NodeScriptHandler(OperationsHandler): |
1519 | @error (http-status-code) "404" 404 |
1520 | @error (content) "not-found" The requested script is not found. |
1521 | @error-example "not-found" |
1522 | - Not Found |
1523 | + No Script matches the given query. |
1524 | """ |
1525 | revert_to = get_mandatory_param(request.data, "to", Int) |
1526 | |
1527 | @@ -505,7 +505,7 @@ class NodeScriptHandler(OperationsHandler): |
1528 | @error (http-status-code) "404" 404 |
1529 | @error (content) "not-found" The requested script is not found. |
1530 | @error-example "not-found" |
1531 | - Not Found |
1532 | + No Script matches the given query. |
1533 | """ |
1534 | tag = get_mandatory_param(request.data, "tag", String) |
1535 | |
1536 | @@ -547,7 +547,7 @@ class NodeScriptHandler(OperationsHandler): |
1537 | @error (http-status-code) "404" 404 |
1538 | @error (content) "not-found" The requested script is not found. |
1539 | @error-example "not-found" |
1540 | - Not Found |
1541 | + No Script matches the given query. |
1542 | """ |
1543 | tag = get_mandatory_param(request.data, "tag", String) |
1544 | |
1545 | diff --git a/src/maasserver/api/spaces.py b/src/maasserver/api/spaces.py |
1546 | index ca4a0b6..ee31c71 100644 |
1547 | --- a/src/maasserver/api/spaces.py |
1548 | +++ b/src/maasserver/api/spaces.py |
1549 | @@ -147,7 +147,7 @@ class SpaceHandler(OperationsHandler): |
1550 | @error (http-status-code) "404" 404 |
1551 | @error (content) "not-found" The requested space is not found. |
1552 | @error-example "not-found" |
1553 | - Not Found |
1554 | + No Space matches the given query. |
1555 | """ |
1556 | # Backward compatibility for Juju 2.0. This is a special case to check |
1557 | # if the user requested to read the undefined space. |
1558 | @@ -174,7 +174,7 @@ class SpaceHandler(OperationsHandler): |
1559 | @error (http-status-code) "404" 404 |
1560 | @error (content) "not-found" The requested space is not found. |
1561 | @error-example "not-found" |
1562 | - Not Found |
1563 | + No Space matches the given query. |
1564 | """ |
1565 | if id == "-1" or id == Space.UNDEFINED: |
1566 | raise MAASAPIBadRequest( |
1567 | @@ -200,7 +200,7 @@ class SpaceHandler(OperationsHandler): |
1568 | @error (http-status-code) "404" 404 |
1569 | @error (content) "not-found" The requested space is not found. |
1570 | @error-example "not-found" |
1571 | - Not Found |
1572 | + No Space matches the given query. |
1573 | """ |
1574 | if id == "-1" or id == Space.UNDEFINED: |
1575 | raise MAASAPIBadRequest( |
1576 | diff --git a/src/maasserver/api/ssh_keys.py b/src/maasserver/api/ssh_keys.py |
1577 | index 4692f82..ea6fed7 100644 |
1578 | --- a/src/maasserver/api/ssh_keys.py |
1579 | +++ b/src/maasserver/api/ssh_keys.py |
1580 | @@ -183,7 +183,7 @@ class SSHKeyHandler(OperationsHandler): |
1581 | @error (http-status-code) "404" 404 |
1582 | @error (content) "not-found" The requested SSH key is not found. |
1583 | @error-example "not-found" |
1584 | - Not Found |
1585 | + No SSHKey matches the given query. |
1586 | """ |
1587 | key = get_object_or_404(SSHKey, id=id) |
1588 | return key |
1589 | @@ -199,7 +199,7 @@ class SSHKeyHandler(OperationsHandler): |
1590 | @error (http-status-code) "404" 404 |
1591 | @error (content) "not-found" The requested SSH key is not found. |
1592 | @error-example "not-found" |
1593 | - Not Found |
1594 | + No SSHKey matches the given query. |
1595 | |
1596 | @error (http-status-code) "403" 403 |
1597 | @error (content) "no-perms" The requesting user does not own the key. |
1598 | diff --git a/src/maasserver/api/ssl_keys.py b/src/maasserver/api/ssl_keys.py |
1599 | index da19023..a6edcbd 100644 |
1600 | --- a/src/maasserver/api/ssl_keys.py |
1601 | +++ b/src/maasserver/api/ssl_keys.py |
1602 | @@ -107,7 +107,7 @@ class SSLKeyHandler(OperationsHandler): |
1603 | @error (http-status-code) "404" 404 |
1604 | @error (content) "not-found" The requested SSH key is not found. |
1605 | @error-example "not-found" |
1606 | - Not Found |
1607 | + No SSLKey matches the given query. |
1608 | |
1609 | @error (http-status-code) "403" 403 |
1610 | @error (content) "no-perms" The requesting user does not own the key. |
1611 | @@ -130,7 +130,7 @@ class SSLKeyHandler(OperationsHandler): |
1612 | @error (http-status-code) "404" 404 |
1613 | @error (content) "not-found" The requested SSH key is not found. |
1614 | @error-example "not-found" |
1615 | - Not Found |
1616 | + No SSLKey matches the given query. |
1617 | |
1618 | @error (http-status-code) "403" 403 |
1619 | @error (content) "no-perms" The requesting user does not own the key. |
1620 | diff --git a/src/maasserver/api/staticroutes.py b/src/maasserver/api/staticroutes.py |
1621 | index 5aee239..9eb0833 100644 |
1622 | --- a/src/maasserver/api/staticroutes.py |
1623 | +++ b/src/maasserver/api/staticroutes.py |
1624 | @@ -105,7 +105,7 @@ class StaticRouteHandler(OperationsHandler): |
1625 | @error (http-status-code) "404" 404 |
1626 | @error (content) "not-found" The requested static-route is not found. |
1627 | @error-example "not-found" |
1628 | - Not Found |
1629 | + No StaticRoute matches the given query. |
1630 | """ |
1631 | return StaticRoute.objects.get_staticroute_or_404( |
1632 | id, request.user, NodePermission.view |
1633 | @@ -138,7 +138,7 @@ class StaticRouteHandler(OperationsHandler): |
1634 | @error (http-status-code) "404" 404 |
1635 | @error (content) "not-found" The requested static-route is not found. |
1636 | @error-example "not-found" |
1637 | - Not Found |
1638 | + No StaticRoute matches the given query. |
1639 | """ |
1640 | staticroute = StaticRoute.objects.get_staticroute_or_404( |
1641 | id, request.user, NodePermission.admin |
1642 | @@ -160,7 +160,7 @@ class StaticRouteHandler(OperationsHandler): |
1643 | @error (http-status-code) "404" 404 |
1644 | @error (content) "not-found" The requested static-route is not found. |
1645 | @error-example "not-found" |
1646 | - Not Found |
1647 | + No StaticRoute matches the given query. |
1648 | """ |
1649 | staticroute = StaticRoute.objects.get_staticroute_or_404( |
1650 | id, request.user, NodePermission.admin |
1651 | diff --git a/src/maasserver/api/subnets.py b/src/maasserver/api/subnets.py |
1652 | index 178e5c2..5aebd12 100644 |
1653 | --- a/src/maasserver/api/subnets.py |
1654 | +++ b/src/maasserver/api/subnets.py |
1655 | @@ -175,7 +175,7 @@ class SubnetHandler(OperationsHandler): |
1656 | @error (http-status-code) "404" 404 |
1657 | @error (content) "not-found" The requested subnet is not found. |
1658 | @error-example "not-found" |
1659 | - Not Found |
1660 | + No Subnet matches the given query. |
1661 | """ |
1662 | return Subnet.objects.get_subnet_or_404( |
1663 | id, request.user, NodePermission.view |
1664 | @@ -260,7 +260,7 @@ class SubnetHandler(OperationsHandler): |
1665 | @error (http-status-code) "404" 404 |
1666 | @error (content) "not-found" The requested subnet is not found. |
1667 | @error-example "not-found" |
1668 | - Not Found |
1669 | + No Subnet matches the given query. |
1670 | """ |
1671 | subnet = Subnet.objects.get_subnet_or_404( |
1672 | id, request.user, NodePermission.admin |
1673 | @@ -282,7 +282,7 @@ class SubnetHandler(OperationsHandler): |
1674 | @error (http-status-code) "404" 404 |
1675 | @error (content) "not-found" The requested subnet is not found. |
1676 | @error-example "not-found" |
1677 | - Not Found |
1678 | + No Subnet matches the given query. |
1679 | """ |
1680 | subnet = Subnet.objects.get_subnet_or_404( |
1681 | id, request.user, NodePermission.admin |
1682 | @@ -306,7 +306,7 @@ class SubnetHandler(OperationsHandler): |
1683 | @error (http-status-code) "404" 404 |
1684 | @error (content) "not-found" The requested subnet is not found. |
1685 | @error-example "not-found" |
1686 | - Not Found |
1687 | + No Subnet matches the given query. |
1688 | """ |
1689 | subnet = Subnet.objects.get_subnet_or_404( |
1690 | id, request.user, NodePermission.view |
1691 | @@ -329,7 +329,7 @@ class SubnetHandler(OperationsHandler): |
1692 | @error (http-status-code) "404" 404 |
1693 | @error (content) "not-found" The requested subnet is not found. |
1694 | @error-example "not-found" |
1695 | - Not Found |
1696 | + No Subnet matches the given query. |
1697 | """ |
1698 | subnet = Subnet.objects.get_subnet_or_404( |
1699 | id, request.user, NodePermission.view |
1700 | @@ -377,7 +377,7 @@ class SubnetHandler(OperationsHandler): |
1701 | @error (http-status-code) "404" 404 |
1702 | @error (content) "not-found" The requested subnet is not found. |
1703 | @error-example "not-found" |
1704 | - Not Found |
1705 | + No Subnet matches the given query. |
1706 | """ |
1707 | subnet = Subnet.objects.get_subnet_or_404( |
1708 | id, request.user, NodePermission.view |
1709 | @@ -425,7 +425,7 @@ class SubnetHandler(OperationsHandler): |
1710 | @error (http-status-code) "404" 404 |
1711 | @error (content) "not-found" The requested subnet is not found. |
1712 | @error-example "not-found" |
1713 | - Not Found |
1714 | + No Subnet matches the given query. |
1715 | """ |
1716 | subnet = Subnet.objects.get_subnet_or_404( |
1717 | id, request.user, NodePermission.view |
1718 | diff --git a/src/maasserver/api/tags.py b/src/maasserver/api/tags.py |
1719 | index f33eab2..0b90743 100644 |
1720 | --- a/src/maasserver/api/tags.py |
1721 | +++ b/src/maasserver/api/tags.py |
1722 | @@ -87,7 +87,7 @@ class TagHandler(OperationsHandler): |
1723 | @error (http-status-code) "404" 404 |
1724 | @error (content) "not-found" The requested tag name is not found. |
1725 | @error-example "not-found" |
1726 | - Not Found |
1727 | + No Tag matches the given query. |
1728 | """ |
1729 | return Tag.objects.get_tag_or_404(name=name, user=request.user) |
1730 | |
1731 | @@ -117,7 +117,7 @@ class TagHandler(OperationsHandler): |
1732 | @error (http-status-code) "404" 404 |
1733 | @error (content) "not-found" The requested tag name is not found. |
1734 | @error-example "not-found" |
1735 | - Not Found |
1736 | + No Tag matches the given query. |
1737 | """ |
1738 | tag = Tag.objects.get_tag_or_404( |
1739 | name=name, user=request.user, to_edit=True |
1740 | @@ -157,7 +157,7 @@ class TagHandler(OperationsHandler): |
1741 | @error (http-status-code) "404" 404 |
1742 | @error (content) "not-found" The requested tag name is not found. |
1743 | @error-example "not-found" |
1744 | - Not Found |
1745 | + No Tag matches the given query. |
1746 | """ |
1747 | tag = Tag.objects.get_tag_or_404( |
1748 | name=name, user=request.user, to_edit=True |
1749 | @@ -206,7 +206,7 @@ class TagHandler(OperationsHandler): |
1750 | @error (http-status-code) "404" 404 |
1751 | @error (content) "not-found" The requested tag name is not found. |
1752 | @error-example "not-found" |
1753 | - Not Found |
1754 | + No Tag matches the given query. |
1755 | """ |
1756 | return self._get_node_type(Node, request, name) |
1757 | |
1758 | @@ -226,7 +226,7 @@ class TagHandler(OperationsHandler): |
1759 | @error (http-status-code) "404" 404 |
1760 | @error (content) "not-found" The requested tag name is not found. |
1761 | @error-example "not-found" |
1762 | - Not Found |
1763 | + No Tag matches the given query. |
1764 | """ |
1765 | return self._get_node_type(Machine, request, name) |
1766 | |
1767 | @@ -246,7 +246,7 @@ class TagHandler(OperationsHandler): |
1768 | @error (http-status-code) "404" 404 |
1769 | @error (content) "not-found" The requested tag name is not found. |
1770 | @error-example "not-found" |
1771 | - Not Found |
1772 | + No Tag matches the given query. |
1773 | """ |
1774 | return self._get_node_type(Device, request, name) |
1775 | |
1776 | @@ -266,7 +266,7 @@ class TagHandler(OperationsHandler): |
1777 | @error (http-status-code) "404" 404 |
1778 | @error (content) "not-found" The requested tag name is not found. |
1779 | @error-example "not-found" |
1780 | - Not Found |
1781 | + No Tag matches the given query. |
1782 | """ |
1783 | return self._get_node_type(RackController, request, name) |
1784 | |
1785 | @@ -286,7 +286,7 @@ class TagHandler(OperationsHandler): |
1786 | @error (http-status-code) "404" 404 |
1787 | @error (content) "not-found" The requested tag name is not found. |
1788 | @error-example "not-found" |
1789 | - Not Found |
1790 | + No Tag matches the given query. |
1791 | """ |
1792 | return self._get_node_type(RegionController, request, name) |
1793 | |
1794 | @@ -316,7 +316,7 @@ class TagHandler(OperationsHandler): |
1795 | @error (http-status-code) "404" 404 |
1796 | @error (content) "not-found" The requested tag name is not found. |
1797 | @error-example "not-found" |
1798 | - Not Found |
1799 | + No Tag matches the given query. |
1800 | """ |
1801 | tag = Tag.objects.get_tag_or_404( |
1802 | name=name, user=request.user, to_edit=True |
1803 | @@ -371,7 +371,7 @@ class TagHandler(OperationsHandler): |
1804 | @error (http-status-code) "404" 404 |
1805 | @error (content) "not-found" The requested tag name is not found. |
1806 | @error-example "not-found" |
1807 | - Not Found |
1808 | + No Tag matches the given query. |
1809 | """ |
1810 | tag = Tag.objects.get_tag_or_404(name=name, user=request.user) |
1811 | rack_controller = None |
1812 | diff --git a/src/maasserver/api/users.py b/src/maasserver/api/users.py |
1813 | index 6df2ab4..8578510 100644 |
1814 | --- a/src/maasserver/api/users.py |
1815 | +++ b/src/maasserver/api/users.py |
1816 | @@ -146,7 +146,7 @@ class UserHandler(OperationsHandler): |
1817 | @error (http-status-code) "404" 404 |
1818 | @error (content) "not-found" The given user was not found. |
1819 | @error-example "not-found" |
1820 | - Not Found |
1821 | + No User matches the given query. |
1822 | """ |
1823 | return get_object_or_404(User, username=username) |
1824 | |
1825 | diff --git a/src/maasserver/api/vlans.py b/src/maasserver/api/vlans.py |
1826 | index 3e2a49a..9154e22 100644 |
1827 | --- a/src/maasserver/api/vlans.py |
1828 | +++ b/src/maasserver/api/vlans.py |
1829 | @@ -56,7 +56,7 @@ class VlansHandler(OperationsHandler): |
1830 | @error (http-status-code) "404" 404 |
1831 | @error (content) "not-found" The requested fabric_id is not found. |
1832 | @error-example "not-found" |
1833 | - Not Found |
1834 | + No Fabric matches the given query. |
1835 | """ |
1836 | fabric = Fabric.objects.get_fabric_or_404( |
1837 | fabric_id, request.user, NodePermission.view |
1838 | @@ -91,7 +91,7 @@ class VlansHandler(OperationsHandler): |
1839 | @error (http-status-code) "404" 404 |
1840 | @error (content) "not-found" The requested fabric_id is not found. |
1841 | @error-example "not-found" |
1842 | - Not Found |
1843 | + No Fabric matches the given query. |
1844 | """ |
1845 | fabric = Fabric.objects.get_fabric_or_404( |
1846 | fabric_id, request.user, NodePermission.admin |
1847 | @@ -197,7 +197,7 @@ class VlanHandler(OperationsHandler): |
1848 | @error (content) "not-found" The requested fabric_id or vid is not |
1849 | found. |
1850 | @error-example "not-found" |
1851 | - Not Found |
1852 | + No Fabric matches the given query. |
1853 | """ |
1854 | vlan = self._get_vlan(request.user, NodePermission.view, **kwargs) |
1855 | return vlan |
1856 | @@ -246,7 +246,7 @@ class VlanHandler(OperationsHandler): |
1857 | @error (content) "not-found" The requested fabric_id or vid is not |
1858 | found. |
1859 | @error-example "not-found" |
1860 | - Not Found |
1861 | + No Fabric matches the given query. |
1862 | """ |
1863 | vlan = self._get_vlan(request.user, NodePermission.admin, **kwargs) |
1864 | data = {} |
1865 | @@ -278,7 +278,7 @@ class VlanHandler(OperationsHandler): |
1866 | @error (content) "not-found" The requested fabric_id or vid is not |
1867 | found. |
1868 | @error-example "not-found" |
1869 | - Not Found |
1870 | + No Fabric matches the given query. |
1871 | """ |
1872 | vlan = self._get_vlan(request.user, NodePermission.admin, **kwargs) |
1873 | vlan.delete() |
1874 | diff --git a/src/maasserver/api/vmcluster.py b/src/maasserver/api/vmcluster.py |
1875 | index 9e61410..dbc1ead 100644 |
1876 | --- a/src/maasserver/api/vmcluster.py |
1877 | +++ b/src/maasserver/api/vmcluster.py |
1878 | @@ -147,7 +147,7 @@ class VmClusterHandler(OperationsHandler): |
1879 | @error (http-status-code) "404" 404 |
1880 | @error (content) "not-found" No VM cluster with that ID can be found. |
1881 | @error-example "not-found" |
1882 | - Not Found |
1883 | + No VMCluster matches the given query. |
1884 | |
1885 | @error (http-status-code) "403" 403 |
1886 | @error (content) "no-perms" The user does not have the permissions |
1887 | diff --git a/src/maasserver/api/vmfs_datastores.py b/src/maasserver/api/vmfs_datastores.py |
1888 | index 4406037..df68f51 100644 |
1889 | --- a/src/maasserver/api/vmfs_datastores.py |
1890 | +++ b/src/maasserver/api/vmfs_datastores.py |
1891 | @@ -55,7 +55,7 @@ class VmfsDatastoresHandler(OperationsHandler): |
1892 | @error (http-status-code) "404" 404 |
1893 | @error (content) "not-found" The requested machine is not found. |
1894 | @error-example "not-found" |
1895 | - Not Found |
1896 | + No Machine matches the given query. |
1897 | """ |
1898 | machine = Machine.objects.get_node_or_404( |
1899 | system_id, request.user, NodePermission.view |
1900 | @@ -92,7 +92,7 @@ class VmfsDatastoresHandler(OperationsHandler): |
1901 | @error (http-status-code) "404" 404 |
1902 | @error (content) "not-found" The requested machine is not found. |
1903 | @error-example "not-found" |
1904 | - Not Found |
1905 | + No Machine matches the given query. |
1906 | |
1907 | @error (http-status-code) "409" 409 |
1908 | @error (content) "not-ready" The requested machine is not ready. |
1909 | @@ -184,7 +184,7 @@ class VmfsDatastoreHandler(OperationsHandler): |
1910 | @error (http-status-code) "404" 404 |
1911 | @error (content) "not-found" The requested machine is not found. |
1912 | @error-example "not-found" |
1913 | - Not Found |
1914 | + No VMFS matches the given query. |
1915 | """ |
1916 | return VMFS.objects.get_object_or_404( |
1917 | system_id, id, request.user, NodePermission.view |
1918 | @@ -221,7 +221,7 @@ class VmfsDatastoreHandler(OperationsHandler): |
1919 | @error (http-status-code) "404" 404 |
1920 | @error (content) "not-found" The requested machine is not found. |
1921 | @error-example "not-found" |
1922 | - Not Found |
1923 | + No VMFS matches the given query. |
1924 | |
1925 | @error (http-status-code) "409" 409 |
1926 | @error (content) "not-ready" The requested machine is not ready. |
1927 | @@ -255,7 +255,7 @@ class VmfsDatastoreHandler(OperationsHandler): |
1928 | @error (http-status-code) "404" 404 |
1929 | @error (content) "not-found" The requested machine is not found. |
1930 | @error-example "not-found" |
1931 | - Not Found |
1932 | + No VMFS matches the given query. |
1933 | |
1934 | @error (http-status-code) "409" 409 |
1935 | @error (content) "not-ready" The requested machine is not ready. |
1936 | diff --git a/src/maasserver/api/volume_groups.py b/src/maasserver/api/volume_groups.py |
1937 | index e795527..553e7c7 100644 |
1938 | --- a/src/maasserver/api/volume_groups.py |
1939 | +++ b/src/maasserver/api/volume_groups.py |
1940 | @@ -63,7 +63,7 @@ class VolumeGroupsHandler(OperationsHandler): |
1941 | @error (http-status-code) "404" 404 |
1942 | @error (content) "not-found" The requested machine is not found. |
1943 | @error-example "not-found" |
1944 | - Not Found |
1945 | + No Machine matches the given query. |
1946 | """ |
1947 | machine = Machine.objects.get_node_or_404( |
1948 | system_id, request.user, NodePermission.view |
1949 | @@ -100,7 +100,7 @@ class VolumeGroupsHandler(OperationsHandler): |
1950 | @error (http-status-code) "404" 404 |
1951 | @error (content) "not-found" The requested machine is not found. |
1952 | @error-example "not-found" |
1953 | - Not Found |
1954 | + No Machine matches the given query. |
1955 | |
1956 | @error (http-status-code) "409" 409 |
1957 | @error (content) "not-ready" The requested machine is not ready. |
1958 | @@ -200,7 +200,7 @@ class VolumeGroupHandler(OperationsHandler): |
1959 | @error (http-status-code) "404" 404 |
1960 | @error (content) "not-found" The requested machine is not found. |
1961 | @error-example "not-found" |
1962 | - Not Found |
1963 | + No VolumeGroup matches the given query. |
1964 | """ |
1965 | return VolumeGroup.objects.get_object_or_404( |
1966 | system_id, id, request.user, NodePermission.view |
1967 | @@ -240,7 +240,7 @@ class VolumeGroupHandler(OperationsHandler): |
1968 | @error (http-status-code) "404" 404 |
1969 | @error (content) "not-found" The requested machine is not found. |
1970 | @error-example "not-found" |
1971 | - Not Found |
1972 | + No VolumeGroup matches the given query. |
1973 | |
1974 | @error (http-status-code) "409" 409 |
1975 | @error (content) "not-ready" The requested machine is not ready. |
1976 | @@ -273,7 +273,7 @@ class VolumeGroupHandler(OperationsHandler): |
1977 | @error (http-status-code) "404" 404 |
1978 | @error (content) "not-found" The requested machine is not found. |
1979 | @error-example "not-found" |
1980 | - Not Found |
1981 | + No VolumeGroup matches the given query. |
1982 | |
1983 | @error (http-status-code) "409" 409 |
1984 | @error (content) "not-ready" The requested machine is not ready. |
1985 | @@ -316,7 +316,7 @@ class VolumeGroupHandler(OperationsHandler): |
1986 | @error (http-status-code) "404" 404 |
1987 | @error (content) "not-found" The requested machine is not found. |
1988 | @error-example "not-found" |
1989 | - Not Found |
1990 | + No VolumeGroup matches the given query. |
1991 | |
1992 | @error (http-status-code) "409" 409 |
1993 | @error (content) "not-ready" The requested machine is not ready. |
1994 | @@ -356,7 +356,7 @@ class VolumeGroupHandler(OperationsHandler): |
1995 | @error (http-status-code) "404" 404 |
1996 | @error (content) "not-found" The requested machine is not found. |
1997 | @error-example "not-found" |
1998 | - Not Found |
1999 | + No VolumeGroup matches the given query. |
2000 | |
2001 | @error (http-status-code) "409" 409 |
2002 | @error (content) "not-ready" The requested machine is not ready. |
2003 | diff --git a/src/maasserver/api/zones.py b/src/maasserver/api/zones.py |
2004 | index 229bf6e..698caab 100644 |
2005 | --- a/src/maasserver/api/zones.py |
2006 | +++ b/src/maasserver/api/zones.py |
2007 | @@ -63,7 +63,7 @@ class ZoneHandler(ModelOperationsHandler): |
2008 | @error (http-status-code) "404" 404 |
2009 | @error (content) "notfound" The zone name is not found. |
2010 | @error-example "notfound" |
2011 | - Not Found |
2012 | + No Zone matches the given query. |
2013 | """ |
2014 | return super().read(request, name=name) |
2015 | |
2016 | @@ -95,7 +95,7 @@ class ZoneHandler(ModelOperationsHandler): |
2017 | @error (http-status-code) "404" 404 |
2018 | @error (content) "notfound" Zone not found |
2019 | @error-example "notfound" |
2020 | - Not Found |
2021 | + No Zone matches the given query. |
2022 | """ |
2023 | return super().update(request, name=name) |
2024 |
UNIT TESTS cli-404- error lp:~lloydwaltersj/maas/+git/maas into -b master lp:~maas-committers/maas
-b informative-
STATUS: FAILED maas-ci. internal: 8080/job/ maas-tester/ 125/consoleText dbf5a589a4e7426 c691350432
LOG: http://
COMMIT: fc0706216ef9da9