From 4a41d24b35bebd163d60e52a479383270cbfc0df Mon Sep 17 00:00:00 2001 From: Nikhil Date: Wed, 29 Jun 2016 16:38:50 -0700 Subject: [PATCH] addons: bridge: ifquery -c fix for port attributes Ticket: CM-11195 Reviewed By: roopa, julien Testing Done: used the configuration mentioned in bug description Signed-off-by: Nikhil running values for bridge-portmcrouter, bridge-portmcfl, and bridge-portprios were accessed using invalid keys. --- addons/bridge.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/bridge.py b/addons/bridge.py index 803051f..c2ec8e0 100644 --- a/addons/bridge.py +++ b/addons/bridge.py @@ -1663,9 +1663,9 @@ class bridge(moduleBase): ifaceobj_getfunc, bridgename) for attr, dstattr in {'bridge-pathcosts' : 'pathcost', - 'bridge-portprios' : 'priority', - 'bridge-portmcrouter' : 'mcrouter', - 'bridge-portmcfl' : 'mcfl' }.items(): + 'bridge-portprios' : 'portprio', + 'bridge-portmcrouter' : 'portmcrouter', + 'bridge-portmcfl' : 'portmcfl' }.items(): attrval = ifaceobj.get_attr_value_first(attr) if not attrval: continue @@ -1674,7 +1674,7 @@ class bridge(moduleBase): running_attrval = self.brctlcmd.get_bridgeport_attr( bridgename, ifaceobj.name, dstattr) - if dstattr == 'mcrouter': + if dstattr == 'portmcrouter': if not utils.is_binary_bool(attrval) and running_attrval: running_attrval = utils.get_yesno_boolean( utils.get_boolean_from_string(running_attrval))