- Timestamp:
- Dec 16, 2019, 8:49:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r14384 r14408 1115 1115 ifacedump = datadump[iface_key] 1116 1116 1117 if not 'ns_ip' in ifacedump: 1117 if 'mac' in ifacedump: 1118 x_ip = ifacedump['ip'].split('/')[0] 1119 x_mode = 'active' if ifacedump.get('status') == 'up' else 'disabled' 1120 elif 'ns_ip' in ifacedump: 1121 x_ip = ifacedump['ns_ip'].split('/')[0] 1122 x_mode = ifacedump.get('mode') or 'unknown' 1123 else: 1118 1124 continue 1119 1125 1120 x_ip = ifacedump['ns_ip'].split('/')[0] 1121 1122 if 'mode' in ifacedump: 1123 x_mode = ifacedump['mode'] 1124 else: 1125 x_mode = 'unknown' 1126 1127 if 'bridge_type' in ifacedump: 1128 device_type = ifacedump['bridge_type'] 1129 else: 1130 device_type = 'Unknown' 1131 1132 table.append((ifacedump['autogen_iface'], x_mode, 'http://%s' % x_ip if url else x_ip, device_type)) 1126 device_type = ifacedump.get('bridge_type') or 'Unknown' 1127 table.append((ifacedump['autogen_iface'], x_mode, 'http://%s' % x_ip if url else x_ip, "%s (%s)" % (device_type, ifacedump.get('comment','')))) 1128 1133 1129 return table 1134 1130 … … 1377 1373 ('ns_mac', False), 1378 1374 ('bullet2_mac', False), 1375 ('mac', False), 1379 1376 ('ns_type', False), 1380 1377 ('bridge_type', False),
Note:
See TracChangeset
for help on using the changeset viewer.