diff options
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: |