Merge lp:~rvb/maas/bulk-load into lp:maas/trunk
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Raphaël Badin on 2012-10-19 | ||||
| Approved revision: | 1295 | ||||
| Merged at revision: | 1289 | ||||
| Proposed branch: | lp:~rvb/maas/bulk-load | ||||
| Merge into: | lp:maas/trunk | ||||
| Diff against target: |
199 lines (+117/-1) 7 files modified
src/maasserver/api.py (+3/-0) src/maasserver/models/macaddress.py (+3/-0) src/maasserver/models/managers.py (+30/-0) src/maasserver/models/node.py (+3/-1) src/maasserver/tests/models.py (+12/-0) src/maasserver/tests/test_api.py (+24/-0) src/maasserver/tests/test_managers.py (+42/-0) |
||||
| To merge this branch: | bzr merge lp:~rvb/maas/bulk-load | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2012-10-19 | Approve on 2012-10-19 | |
|
Review via email:
|
|||
Commit Message
Load the mac addresses related to a node from the cache even if .iterator() is used. Preload the macaddresses and the tags related to a list of nodes when fetching the list of nodes via the api.
Description of the Change
Load the related mac addresses in bulk. Preload the macaddresses and the tags related to a list of nodes when fetching the list of nodes via the api.
= Notes =
This took some time to figure out a clean way to fix that problem but I think this solution is quite all right and does not interfere too much with the rest of the code.
I tried using [tag.name for tag in self.tags.
With that change in, a request to http://
- 1292. By Raphaël Badin on 2012-10-19
-
Merge trunk.
- 1293. By Raphaël Badin on 2012-10-19
-
Fix lint.
- 1294. By Raphaël Badin on 2012-10-19
-
Refactor code to do the prefetching in get_nodes().
- 1295. By Raphaël Badin on 2012-10-19
-
Revert last change.

