def __repr__(self): rtlst = [] for net, msk, gw, iface, addr in self.routes: rtlst.append( (ltoa(net), ltoa(msk), gw, (iface.name if not isinstance(iface, basestring) else iface), addr)) return pretty_routes( rtlst, [("Network", "Netmask", "Gateway", "Iface", "Output IP")])
def __repr__(self): rtlst = [] for net, msk, gw, iface, addr, metric in self.routes: rtlst.append((ltoa(net), ltoa(msk), gw, (iface.name if not isinstance(iface, six.string_types) else iface), addr, str(metric))) return pretty_routes(rtlst, [("Network", "Netmask", "Gateway", "Iface", "Output IP", "Metric")])
def __repr__(self): rtlst = [] for net,msk,gw,iface,addr in self.routes: rtlst.append((ltoa(net), ltoa(msk), gw, (iface.name if not isinstance(iface, six.string_types) else iface), addr)) return pretty_routes(rtlst, [("Network", "Netmask", "Gateway", "Iface", "Output IP")])