Merge lp:~jtv/maas/hide-cluster-default-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: | 3249 |
Proposed branch: | lp:~jtv/maas/hide-cluster-default-disable-ipv4-if-no-ipv6 |
Merge into: | lp:~maas-committers/maas/trunk |
Prerequisite: | lp:~jtv/maas/bug-1379816 |
Diff against target: |
70 lines (+45/-0) 2 files modified
src/maasserver/forms.py (+10/-0) src/maasserver/tests/test_forms_nodegroup.py (+35/-0) |
To merge this branch: | bzr merge lp:~jtv/maas/hide-cluster-default-disable-ipv4-if-no-ipv6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Raphaël Badin (community) | Approve | ||
Review via email: mp+238254@code.launchpad.net |
Commit message
Hide the cluster edit form's “disable IPv4 by default” button if the cluster has no managed IPv6 interfaces.
Description of the change
Depends on https:/
The trick is the same one we also used on the Node form's disable_ipv4 field. If the field should not be displayed, we configure it with an empty label and its widget type set to HiddenInput. That way the field still works in the API, but the UI won't show it.
What happens if you leave this field in the “disable IPv4” setting but disable IPv6 on your cluster? Any new nodes will still be created with the setting enabled by default. But when you deploy a node with IPv4 disabled on a cluster that does not manage any IPv6 subnets, the nodes will simply ignore the setting and come up with IPv4 anyway. (This is currently done in the Ubuntu OperatingSystem implementation, but it should eventually be in generic code.)
Jeroen
Looks good.