Skip to content
This repository was archived by the owner on Feb 10, 2018. It is now read-only.

Commit 9fff442

Browse files
Pshem KowalczykPshem Kowalczyk
Pshem Kowalczyk
authored and
Pshem Kowalczyk
committed
rename table to vrf
1 parent ce829f7 commit 9fff442

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

napalm_junos/junos.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -1101,8 +1101,8 @@ def get_mac_address_table(self):
11011101

11021102
return mac_address_table
11031103

1104-
def get_route_to(self, destination='', protocol='', table=''):
1105-
"""Return route details to a specific destination, learned from a certain protocol, visible in a particular table."""
1104+
def get_route_to(self, destination='', protocol='', vrf=''):
1105+
"""Return route details to a specific destination, learned from a certain protocol, visible in a particular vrf (table)."""
11061106
routes = {}
11071107

11081108
if not isinstance(destination, py23_compat.string_types):
@@ -1114,8 +1114,8 @@ def get_route_to(self, destination='', protocol='', table=''):
11141114
if protocol == 'connected':
11151115
protocol = 'direct' # this is how is called on JunOS
11161116

1117-
if table and not isinstance(table, py23_compat.string_types):
1118-
raise TypeError('Please specify a valid table!')
1117+
if vrf and not isinstance(vrf, py23_compat.string_types):
1118+
raise TypeError('Please specify a valid vrf!')
11191119

11201120
_COMMON_PROTOCOL_FIELDS_ = [
11211121
'destination',
@@ -1165,8 +1165,8 @@ def get_route_to(self, destination='', protocol='', table=''):
11651165
if protocol and isinstance(destination, py23_compat.string_types):
11661166
rt_kargs['protocol'] = protocol
11671167

1168-
if table:
1169-
rt_kargs['table'] = table
1168+
if vrf:
1169+
rt_kargs['vrf'] = vrf
11701170

11711171
try:
11721172
routes_table.get(**rt_kargs)

0 commit comments

Comments
 (0)