Merge lp:~rvb/maas/fixture-error into lp:maas/trunk

Proposed by Raphaël Badin on 2012-10-17
Status: Merged
Approved by: Raphaël Badin on 2012-10-17
Approved revision: 1282
Merged at revision: 1282
Proposed branch: lp:~rvb/maas/fixture-error
Merge into: lp:maas/trunk
Diff against target: 47 lines (+5/-5)
1 file modified
src/maasserver/fixtures/dev_fixture.yaml (+5/-5)
To merge this branch: bzr merge lp:~rvb/maas/fixture-error
Reviewer Review Type Date Requested Status
Martin Packman (community) 2012-10-17 Approve on 2012-10-17
Review via email: mp+130120@code.launchpad.net

Commit Message

Fix the dev fixture so that nodes have a null value for nodegroup.

Description of the Change

This branch fixes the dev fixture: we can no longer rely on the fact that the master nodegroup exists when the dev fixture is loaded (we removed the call to the [now gone] command config_dhcp_master recently because right now, all the DHCP config is done via the API/CLI/UI). This change sets the nodegroup of the nodes to null so that when the application is started, the call to start_up will in turn call ensure_master which will: create a master nodegroup and attache the existing nodes to that nodegroup (that behavior is part of the upgrade story).

To post a comment you must log in.
Martin Packman (gz) wrote :

Tested here and this fixes `make sampledata`. One minor difference from the old way, as discussed on IRC, is that the nodegroup relationship is not populated until maasserver gets run. As the sampledata is for live testing, this seems fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/fixtures/dev_fixture.yaml'
2--- src/maasserver/fixtures/dev_fixture.yaml 2012-10-08 10:40:20 +0000
3+++ src/maasserver/fixtures/dev_fixture.yaml 2012-10-17 13:54:38 +0000
4@@ -1,6 +1,6 @@
5 - fields: {
6 created: 2012-01-24, hostname: sun, architecture: 'i386/generic',
7- owner: null, status: 0, nodegroup: 1, tags: [30],
8+ owner: null, status: 0, nodegroup: null, tags: [30],
9 cpu_count: 16, memory: 16384,
10 system_id: node-2666dd64-4671-11e1-93b8-00225f89f211,
11 updated: !!timestamp '2012-01-24 10:52:38.735954'}
12@@ -8,7 +8,7 @@
13 pk: 15
14 - fields: {
15 created: 2012-01-24, hostname: moon, architecture: 'i386/generic',
16- owner: null, status: 2, nodegroup: 1, tags: [],
17+ owner: null, status: 2, nodegroup: null, tags: [],
18 cpu_count: 1, memory: 512,
19 system_id: node-29d7ad70-4671-11e1-93b8-00225f89f211,
20 updated: !!timestamp '2012-01-24 10:52:44.507777'}
21@@ -16,7 +16,7 @@
22 pk: 16
23 - fields: {
24 created: 2012-01-24, hostname: mars, architecture: 'i386/generic',
25- owner: 106, status: 3, nodegroup: 1, tags: [31],
26+ owner: 106, status: 3, nodegroup: null, tags: [31],
27 cpu_count: 2, memory: 2096,
28 system_id: node-2d424b28-4671-11e1-93b8-00225f89f211,
29 updated: !!timestamp '2012-01-24 10:52:50.239704'}
30@@ -24,7 +24,7 @@
31 pk: 17
32 - fields: {
33 created: 2012-01-24, hostname: jupiter, architecture: 'i386/generic',
34- owner: null, status: 0, nodegroup: 1, tags: [30, 31],
35+ owner: null, status: 0, nodegroup: null, tags: [30, 31],
36 cpu_count: 4, memory: 8192,
37 system_id: node-2fb4fec8-4671-11e1-93b8-00225f89f211,
38 updated: !!timestamp '2012-01-24 10:52:54.346832'}
39@@ -32,7 +32,7 @@
40 pk: 18
41 - fields: {
42 created: 2012-01-24, hostname: saturn, architecture: 'i386/generic',
43- owner: 101, status: 3, nodegroup: 1, tags: [30, 31, 32],
44+ owner: 101, status: 3, nodegroup: null, tags: [30, 31, 32],
45 cpu_count: 4, memory: 4096,
46 system_id: node-33b55e28-4671-11e1-93b8-00225f89f211,
47 updated: !!timestamp '2012-01-24 10:53:01.060176'}