Merge lp:~jameinel/maas/sampledata-nodegroup into lp:maas/trunk

Proposed by John A Meinel on 2012-10-04
Status: Merged
Approved by: John A Meinel on 2012-10-04
Approved revision: 1158
Merged at revision: 1160
Proposed branch: lp:~jameinel/maas/sampledata-nodegroup
Merge into: lp:maas/trunk
Diff against target: 43 lines (+5/-5)
1 file modified
src/maasserver/fixtures/dev_fixture.yaml (+5/-5)
To merge this branch: bzr merge lp:~jameinel/maas/sampledata-nodegroup
Reviewer Review Type Date Requested Status
Raphaël Badin (community) 2012-10-04 Approve on 2012-10-04
Review via email: mp+127936@code.launchpad.net

Commit Message

Fix 'make sampledata'. Nodegroups are now naturally keyed on UUID, but that isn't as convenient in the sample data vs just using the id primary key.
(1 vs 'adfd3977-f251-4f2c-8d61-745dbd690bfc')

Description of the Change

'make sample

To post a comment you must log in.
Raphaël Badin (rvb) wrote :

Looks good. Note that this is a bit dangerous: you're relying on the fact that the master nodegroup (created by ensure_master) has id=1. This is the case in practice but a fit fragile.

Sill, with this branch, the situation is better than the one we have now where the sampledata cannot be loaded once the cluster controller has been connected to the region and thus has changed its uuid from 'master' to a proper uuid.

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-02 17:25:03 +0000
3+++ src/maasserver/fixtures/dev_fixture.yaml 2012-10-04 06:23:38 +0000
4@@ -1,34 +1,34 @@
5 - fields: {
6 created: 2012-01-24, hostname: sun, architecture: i386,
7- owner: null, status: 0, nodegroup: [master], tags: [30],
8+ owner: null, status: 0, nodegroup: 1, tags: [30],
9 system_id: node-2666dd64-4671-11e1-93b8-00225f89f211,
10 updated: !!timestamp '2012-01-24 10:52:38.735954'}
11 model: maasserver.node
12 pk: 15
13 - fields: {
14 created: 2012-01-24, hostname: moon, architecture: i386,
15- owner: null, status: 2, nodegroup: [master], tags: [],
16+ owner: null, status: 2, nodegroup: 1, tags: [],
17 system_id: node-29d7ad70-4671-11e1-93b8-00225f89f211,
18 updated: !!timestamp '2012-01-24 10:52:44.507777'}
19 model: maasserver.node
20 pk: 16
21 - fields: {
22 created: 2012-01-24, hostname: mars, architecture: i386,
23- owner: 106, status: 3, nodegroup: [master], tags: [31],
24+ owner: 106, status: 3, nodegroup: 1, tags: [31],
25 system_id: node-2d424b28-4671-11e1-93b8-00225f89f211,
26 updated: !!timestamp '2012-01-24 10:52:50.239704'}
27 model: maasserver.node
28 pk: 17
29 - fields: {
30 created: 2012-01-24, hostname: jupiter, architecture: i386,
31- owner: null, status: 0, nodegroup: [master], tags: [30, 31],
32+ owner: null, status: 0, nodegroup: 1, tags: [30, 31],
33 system_id: node-2fb4fec8-4671-11e1-93b8-00225f89f211,
34 updated: !!timestamp '2012-01-24 10:52:54.346832'}
35 model: maasserver.node
36 pk: 18
37 - fields: {
38 created: 2012-01-24, hostname: saturn, architecture: i386,
39- owner: 101, status: 3, nodegroup: [master], tags: [30, 31, 32],
40+ owner: 101, status: 3, nodegroup: 1, tags: [30, 31, 32],
41 system_id: node-33b55e28-4671-11e1-93b8-00225f89f211,
42 updated: !!timestamp '2012-01-24 10:53:01.060176'}
43 model: maasserver.node