Code review comment for lp:~julian-edwards/maas/models-for-static-dhcp

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I've now changed this a bit to use a link table between MACAddress and
IPAddress and put MACAddress.ip_addresses as a ManyToMany field. It
will still be one-to-many rather than many-to-many because I made
IPAddress on the link table unique.

This brings some benefits:

 A) no more nullable FK on IPAddress
 B) we can put metadata on the link table (which I have done, I've added
nic_alias. See the discussion on maas-devel)
 C) we get a more natural MACAddress.ip_addresses field. Referring to
IPAddress.macaddress_set will always only give one result, though.

I'm going to land this because I don't want to be blocked and it's only
slightly different really. We can revisit if necessary of course.

« Back to merge proposal