The max_length for Node's osystem field (20) doesn't match the max
length for BootImage's osystem field (255). If they're holding the
same set of values they should have the same types.
Also, Is there a set of osystem values a Node's osystem value should be
constrained to? Should a node always have an osystem that some BootImage
has, or is there some set they should both be constrained to?
[4]
There should be at least some basic test involving the osystem field.
Looks good, just a few comments.
[1]
Be sure to run 'make format', migrations/ 0077_add_ osystem_ to_node. py gets cleaned up a
src/maasserver/
bit by it.
[2]
=== added file 'src/maasserver /migrations/ 0077_add_ osystem_ to_node. py' migrations/ 0077_add_ osystem_ to_node. py 1970-01-01 00:00:00 +0000 migrations/ 0077_add_ osystem_ to_node. py 2014-05-14 12:45:06 +0000
--- src/maasserver/
+++ src/maasserver/
There is already another 0077 migration, so you'll have to merge and
regenerate this.
[3]
+ def forwards(self, orm): column( u'maasserver_ node', 'osystem', 'django. db.models. fields. CharField' )(default= u'', max_length=20, null=True, blank=True),
+ # Adding field 'Node.osystem'
+ db.add_
+ self.gf(
+ keep_default=False)
The max_length for Node's osystem field (20) doesn't match the max
length for BootImage's osystem field (255). If they're holding the
same set of values they should have the same types.
Also, Is there a set of osystem values a Node's osystem value should be
constrained to? Should a node always have an osystem that some BootImage
has, or is there some set they should both be constrained to?
[4]
There should be at least some basic test involving the osystem field.