diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2018-03-16 14:00:15 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2018-03-16 14:00:15 -0400 |
commit | b7b7331b9c308d8e1cb0b3dfd4398e6e7cb1b60f (patch) | |
tree | 876fd67b90b67f95f9dfe8682d53c846d5874700 /cloudinit/net/netplan.py | |
parent | 97012fbb5207ddf1d2dcbb1c5eae710c47ab8ec0 (diff) | |
download | vyos-cloud-init-b7b7331b9c308d8e1cb0b3dfd4398e6e7cb1b60f.tar.gz vyos-cloud-init-b7b7331b9c308d8e1cb0b3dfd4398e6e7cb1b60f.zip |
netplan: render bridge port-priority values
Update netplan renderer to write out bridge port-priority values
now that netplan supports the feature.
LP: #1735821
Diffstat (limited to 'cloudinit/net/netplan.py')
-rw-r--r-- | cloudinit/net/netplan.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/net/netplan.py b/cloudinit/net/netplan.py index d3788af8..6bee3d37 100644 --- a/cloudinit/net/netplan.py +++ b/cloudinit/net/netplan.py @@ -311,12 +311,12 @@ class Renderer(renderer.Renderer): if newname is None: continue br_config.update({newname: value}) - if newname == 'path-cost': - # <interface> <cost> -> <interface>: int(<cost>) + if newname in ['path-cost', 'port-priority']: + # <interface> <value> -> <interface>: int(<value>) newvalue = {} - for costval in value: - (port, cost) = costval.split() - newvalue[port] = int(cost) + for val in value: + (port, portval) = val.split() + newvalue[port] = int(portval) br_config.update({newname: newvalue}) if len(br_config) > 0: |