From 052405e95f1a62e5af91e2bb2b7cb98d1329f728 Mon Sep 17 00:00:00 2001 From: Flavio Fernandes Date: Mon, 20 Jul 2015 18:49:53 -0400 Subject: [PATCH] Update showOvsdbMdsal.py to display bridge name and mac next to alias Change-Id: Ida68f52803737eb06bda03bbcc4ccf36758ab046 Signed-off-by: Flavio Fernandes --- resources/commons/showOvsdbMdsal.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/resources/commons/showOvsdbMdsal.py b/resources/commons/showOvsdbMdsal.py index 05102cb7d..864cb0836 100755 --- a/resources/commons/showOvsdbMdsal.py +++ b/resources/commons/showOvsdbMdsal.py @@ -459,13 +459,10 @@ def showPrettyNamesMap(): prtLn('aliasMap:', 0) resultMap = {} for bridge in state.bridgeNodes.values(): - resultMap[ bridge.alias ] = bridge.getOpenflowName() + resultMap[ bridge.alias ] = '{0: <25} {1: <7} {2}'.format(bridge.getOpenflowName(), bridge.name, bridge.dpId) - resultMapKeys = resultMap.keys() - resultMapKeys.sort() - - for resultMapKey in resultMapKeys: - prtLn('{0}{1: <10} -> {2}'.format(spc, resultMapKey, resultMap[resultMapKey]), 0) + for resultMapKey in sorted(resultMap): + prtLn('{0}{1: <10} -> {2}'.format(spc, resultMapKey, resultMap[resultMapKey]), 0) prtLn('', 0) # -- -- 2.36.6