Edward Haas has uploaded a new change for review. Change subject: net: Canonize dhcpv6 on API input ......................................................................
net: Canonize dhcpv6 on API input IPv6 dhcp is enabled by default, therefore, if the key is missing from the network setup request, dhcp on ipv6 is left ON. VDSM assumes a different default, which is ipv6 dhcp OFF. To keep VDSM logic, a missing dhcpv6 key is converted to dhcpv6=False Change-Id: I2b551f28ba143ca88efdbaec7771b7eba0608318 Signed-off-by: Edward Haas <[email protected]> --- M lib/vdsm/network/canonize.py M tests/netconfpersistenceTests.py 2 files changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/52989/1 diff --git a/lib/vdsm/network/canonize.py b/lib/vdsm/network/canonize.py index 81baebc..54113a5 100644 --- a/lib/vdsm/network/canonize.py +++ b/lib/vdsm/network/canonize.py @@ -42,6 +42,7 @@ _canonize_vlan(attrs) _canonize_bridged(attrs) _canonize_stp(attrs) + _canonize_ipv6(attrs) def _canonize_remove(data): @@ -82,3 +83,8 @@ except ValueError: raise ConfigNetworkError(ne.ERR_BAD_PARAMS, '"%s" is not ' 'a valid bridge STP value.' % stp) + + +def _canonize_ipv6(data): + if 'dhcpv6' not in data: + data['dhcpv6'] = False diff --git a/tests/netconfpersistenceTests.py b/tests/netconfpersistenceTests.py index 8834f83..abed729 100644 --- a/tests/netconfpersistenceTests.py +++ b/tests/netconfpersistenceTests.py @@ -33,7 +33,7 @@ NETWORK = 'luke' NETWORK_ATTRIBUTES = {'bonding': 'bond0', 'bridged': True, 'vlan': 1, - 'mtu': 1500, 'stp': False} + 'mtu': 1500, 'stp': False, 'dhcpv6': False} BONDING = 'skywalker' BONDING_ATTRIBUTES = {'options': 'mode=4 miimon=100', 'nics': ['eth0', 'eth1']} -- To view, visit https://gerrit.ovirt.org/52989 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b551f28ba143ca88efdbaec7771b7eba0608318 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Edward Haas <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
