+
+ @staticmethod
+ def show_bridge(node):
+ """
+ Shows the current bridge configuration
+
+ :param node: VPP node.
+ :type node: dict
+ """
+
+ cmd = 'vppctl show bridge'
+ (ret, stdout, stderr) = VPPUtil.exec_command(cmd)
+ if ret != 0:
+ raise RuntimeError('{} failed on node {} {} {}'.
+ format(cmd, node['host'],
+ stdout, stderr))
+ lines = stdout.split('\r\n')
+ bridges = []
+ for line in lines:
+ if line == 'no bridge-domains in use':
+ print line
+ return
+ if len(line) == 0:
+ continue
+
+ lspl = line.lstrip(' ').split()
+ if lspl[0] != 'BD-ID':
+ bridges.append(lspl[0])
+
+ for bridge in bridges:
+ cmd = 'vppctl show bridge {} detail'.format(bridge)
+ (ret, stdout, stderr) = VPPUtil.exec_command(cmd)
+ if ret != 0:
+ raise RuntimeError('{} failed on node {} {} {}'.
+ format(cmd, node['host'],
+ stdout, stderr))
+ print stdout