Merge lp://staging/~julian-edwards/maas/mac-network-removal into lp://staging/~maas-committers/maas/trunk
Proposed by
Julian Edwards
Status: | Merged |
---|---|
Approved by: | Julian Edwards |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3005 |
Proposed branch: | lp://staging/~julian-edwards/maas/mac-network-removal |
Merge into: | lp://staging/~maas-committers/maas/trunk |
Diff against target: |
94 lines (+49/-3) 3 files modified
src/maasserver/api/networks.py (+3/-1) src/maasserver/forms.py (+20/-2) src/maasserver/tests/test_forms_network.py (+26/-0) |
To merge this branch: | bzr merge lp://staging/~julian-edwards/maas/mac-network-removal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+234907@code.staging.launchpad.net |
Commit message
Make it possible to remove the last MAC from the networks edit form.
Description of the change
Because the same form is used for the API and the web view, and the API uses its own operations for manipulating the MAC addresses, the web view was unable to assume it could delete the mac_addresses on the Network.
I've fixed it by defaulting to deleting the mac_addresses if not set, unless a flag is passed, which the API handler now does.
To post a comment you must log in.
Ugh. Just one thing missing: could you document the parameter on the form's __init__, preferably in such generally clear terms that "this is a horrible kludge for a very specific situation" is more or less an afterthought?