← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/node-nodegroup-fixture-by-name into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/node-nodegroup-fixture-by-name into lp:maas.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/maas/node-nodegroup-fixture-by-name/+merge/117248

This requires two of the other branches I currently have in review, although I didn't bother making them prerequisites. As far as bzr is concerned, each of the branches I currently have in review should be able to land independently.  And I believe tests will still pass.

The syntax you see in the dev fixture makes use of django's “natural keys.”  In one of my other branches I make a nodegroup's name its natural key, so that items in the fixture can refer to a nodegroup by name.  And in another branch I add a database migration to ensure that the master nodegroup is created, and any existing Node.nodegroup fields updated, before the Node.nodegroup column is made NOT NULL.


Jeroen
-- 
https://code.launchpad.net/~jtv/maas/node-nodegroup-fixture-by-name/+merge/117248
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/node-nodegroup-fixture-by-name into lp:maas.
=== modified file 'src/maasserver/fixtures/dev_fixture.yaml'
--- src/maasserver/fixtures/dev_fixture.yaml	2012-04-25 07:07:42 +0000
+++ src/maasserver/fixtures/dev_fixture.yaml	2012-07-30 12:15:23 +0000
@@ -1,34 +1,34 @@
 - fields: {
     created: 2012-01-24, hostname: sun, architecture: i386,
-    owner: null, status: 0,
+    owner: null, status: 0, nodegroup: [master],
     system_id: node-2666dd64-4671-11e1-93b8-00225f89f211,
     updated: !!timestamp '2012-01-24 10:52:38.735954'}
   model: maasserver.node
   pk: 15
 - fields: {
     created: 2012-01-24, hostname: moon, architecture: i386,
-    owner: null, status: 2,
+    owner: null, status: 2, nodegroup: [master],
     system_id: node-29d7ad70-4671-11e1-93b8-00225f89f211,
     updated: !!timestamp '2012-01-24 10:52:44.507777'}
   model: maasserver.node
   pk: 16
 - fields: {
     created: 2012-01-24, hostname: mars, architecture: i386,
-    owner: 106, status: 3,
+    owner: 106, status: 3, nodegroup: [master],
     system_id: node-2d424b28-4671-11e1-93b8-00225f89f211,
     updated: !!timestamp '2012-01-24 10:52:50.239704'}
   model: maasserver.node
   pk: 17
 - fields: {
     created: 2012-01-24, hostname: jupiter, architecture: i386,
-    owner: null, status: 0,
+    owner: null, status: 0, nodegroup: [master],
     system_id: node-2fb4fec8-4671-11e1-93b8-00225f89f211,
     updated: !!timestamp '2012-01-24 10:52:54.346832'}
   model: maasserver.node
   pk: 18
 - fields: {
     created: 2012-01-24, hostname: saturn, architecture: i386,
-    owner: 101, status: 3,
+    owner: 101, status: 3, nodegroup: [master],
     system_id: node-33b55e28-4671-11e1-93b8-00225f89f211,
     updated: !!timestamp '2012-01-24 10:53:01.060176'}
   model: maasserver.node