From b7b7331b9c308d8e1cb0b3dfd4398e6e7cb1b60f Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Fri, 16 Mar 2018 14:00:15 -0400 Subject: netplan: render bridge port-priority values Update netplan renderer to write out bridge port-priority values now that netplan supports the feature. LP: #1735821 --- cloudinit/net/netplan.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cloudinit/net/netplan.py') 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': - # -> : int() + if newname in ['path-cost', 'port-priority']: + # -> : int() 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: -- cgit v1.2.3