diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2019-05-29 04:59:43 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-05-29 04:59:43 +0000 |
commit | ded1ec81e3c6c37c5241b12fcc3c41182e675dff (patch) | |
tree | c78c95e9f82d6bb60336531d0beca6887932606c /cloudinit/net | |
parent | c951963ffa94145be1bd5f1cef7dba6007f75bd2 (diff) | |
download | vyos-cloud-init-ded1ec81e3c6c37c5241b12fcc3c41182e675dff.tar.gz vyos-cloud-init-ded1ec81e3c6c37c5241b12fcc3c41182e675dff.zip |
netplan: update netplan key mappings for gratuitous-arp
Previous versions of netplan included a misspelling for the
bond parameter around gratuitous-arp. This has been fixed and released
and cloud-init needs to accept both values. This branch fixes the
key that will be rendered and transforms the previous misspelling
when capturing network_state.
LP: #1827238
Diffstat (limited to 'cloudinit/net')
-rw-r--r-- | cloudinit/net/network_state.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py index 4d19f562..3702130a 100644 --- a/cloudinit/net/network_state.py +++ b/cloudinit/net/network_state.py @@ -707,6 +707,14 @@ class NetworkStateInterpreter(object): item_params = dict((key, value) for (key, value) in item_cfg.items() if key not in NETWORK_V2_KEY_FILTER) + # we accept the fixed spelling, but write the old for compatability + # Xenial does not have an updated netplan which supports the + # correct spelling. LP: #1756701 + params = item_params['parameters'] + grat_value = params.pop('gratuitous-arp', None) + if grat_value: + params['gratuitious-arp'] = grat_value + v1_cmd = { 'type': cmd_type, 'name': item_name, |