def get_route_type(self, dest=None, afi=None): """ This function returns the route type based on destination ip address or afi :param address: :return: """ if dest: return get_route_type(dest) elif afi == 'ipv4': return 'route' elif afi == 'ipv6': return 'route6'
def get_afi(self, address): route_type = get_route_type(address) if route_type == 'route': return 'ipv4' elif route_type == 'route6': return 'ipv6'
def get_afi(self, address): route_type = get_route_type(address) if route_type == "route": return "ipv4" elif route_type == "route6": return "ipv6"