Merge lp:~mpontillo/maas/fix-discovered-ip-uniqueness--bug-1686736 into lp:~maas-committers/maas/trunk
Proposed by
Mike Pontillo
Status: | Merged |
---|---|
Approved by: | Mike Pontillo |
Approved revision: | no longer in the source branch. |
Merged at revision: | 6028 |
Proposed branch: | lp:~mpontillo/maas/fix-discovered-ip-uniqueness--bug-1686736 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
106 lines (+77/-1) 3 files modified
src/maasserver/migrations/builtin/maasserver/0121_relax_staticipaddress_unique_constraint.py (+36/-0) src/maasserver/models/staticipaddress.py (+2/-1) src/maasserver/models/tests/test_staticipaddress.py (+39/-0) |
To merge this branch: | bzr merge lp:~mpontillo/maas/fix-discovered-ip-uniqueness--bug-1686736 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Review via email: mp+323343@code.launchpad.net |
Commit message
Relax unique constraint on StaticIPAddress model to allow DISCOVERED IP addresses to coexist with other types.
* Switches from unique=True on the 'ip' field to Django's unique_together.
* Adds a partial index to allow only DISCOVERED IP addresses to coexist with other allocation types (all the other types' addresses still must be unique among themselves).
Description of the change
This was also tested manually as follows:
To post a comment you must log in.
Looks good.