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.
I've now changed this a bit to use a link table between MACAddress and ip_addresses as a ManyToMany field. It
IPAddress and put MACAddress.
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 ip_addresses field. Referring to macaddress_ set will always only give one result, though.
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.
IPAddress.
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.