Merge lp:~jtv/maas/hide-disable_ipv4-if-no-ipv6 into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Jeroen T. Vermeulen |
Approved revision: | no longer in the source branch. |
Merged at revision: | 3191 |
Proposed branch: | lp:~jtv/maas/hide-disable_ipv4-if-no-ipv6 |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
138 lines (+85/-3) 2 files modified
src/maasserver/forms.py (+29/-3) src/maasserver/tests/test_forms_node.py (+56/-0) |
To merge this branch: | bzr merge lp:~jtv/maas/hide-disable_ipv4-if-no-ipv6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+236993@code.launchpad.net |
Commit message
Hide a node's “Disable IPv4 on deployment” checkbox if its cluster is not configured to manage an IPv6 network.
Description of the change
When the option is hidden, it's present on the form (so that the API will continue to support it) but with a HiddenInput widget instead of the default CheckboxInput widget for boolean settings. That's what the test checks for. The label also matters (it shows up even if the widget is "hidden") but it's nowhere near as important as getting the widget right.
The check doesn't go into too much detail: it doesn't care whether the node is actually connected to any of the managed IPv6 networks, only that they're there. The Node edit form is meant to configure what we know about the node, so in principle, we might have to hide or reveal that checkbox actively as the user edits the form. That's probably more trouble than it's worth.
Also, in reality, the option isn't shown on the Add Node form. I left the option to change that open, and provided sensible (I hope) behaviour.
Jeroen
Looks good.
What happens when there's a managed IPv6 network, the user disabled IPv4 on a node, then the IPv6 network is removed? Will MAAS still try to disable IPv4 on the node? If so, does this change remove the means to fix that?