Merge lp:~julian-edwards/maas/node_group_model into lp:maas/trunk
Proposed by
Julian Edwards
on 2012-06-05
| Status: | Merged |
|---|---|
| Approved by: | Julian Edwards on 2012-06-05 |
| Approved revision: | 610 |
| Merged at revision: | 607 |
| Proposed branch: | lp:~julian-edwards/maas/node_group_model |
| Merge into: | lp:maas/trunk |
| Diff against target: |
338 lines (+282/-0) 5 files modified
src/maasserver/migrations/0009_add_nodegroup.py (+166/-0) src/maasserver/models/__init__.py (+3/-0) src/maasserver/models/nodegroup.py (+63/-0) src/maasserver/testing/factory.py (+11/-0) src/maasserver/tests/test_nodegroup.py (+39/-0) |
| To merge this branch: | bzr merge lp:~julian-edwards/maas/node_group_model |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Jeroen T. Vermeulen (community) | 2012-06-05 | Approve on 2012-06-05 | |
|
Review via email:
|
|||
Commit Message
Add NodeGroup model, which stores DHCP parameters and the worker API key.
Description of the Change
This is a basic implementation of a NodeGroup schema. It is required now because we need to store DHCP parameters on a per-nodegroup basis, so it makes sense to define the schema now.
To post a comment you must log in.
| Raphaël Badin (rvb) wrote : | # |
| Jeroen T. Vermeulen (jtv) wrote : | # |
As discussed: better not export the manager class from the model module — it's nice to have a single canonical way to address the manager, as <model>.objects.
review:
Approve
| Julian Edwards (julian-edwards) wrote : | # |
Raphers, I left the Manager in because it is defined in the template. I expect we'll need one at some stage so it seems strange to delete it and re-add it later.
Thank you for reviewing to both.
lp:~julian-edwards/maas/node_group_model
updated
on 2012-06-05
- 610. By Julian Edwards on 2012-06-05
-
NodeGroupManager not needed in __all__


Not a proper review, just a drive-by comment:
229 +class NodeGroupManage r(Manager) :
230 + """Manager for the NodeGroup class.
231 +
232 + Don't import or instantiate this directly; access as `<Class>.objects` on
233 + the model class it manages.
234 + """
235 +
236 +
[...]
241 +
242 + objects = NodeGroupManager()
Unless you've got a followup branch that introduces methods in NodeGroupManager, I suggest you get rid of this custom (and empty) manager for now. Django will create one for us.