Skip to content

Commit

Permalink
Add protocol host
Browse files Browse the repository at this point in the history
  • Loading branch information
XioNoX authored and GGabriele committed Jan 27, 2017
1 parent 1819a80 commit a2c0311
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions napalm_panos/panos.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ def get_route_to(self, destination='', protocol=''):
d['protocol'] = "ospf"
if 'B' in flags:
d['protocol'] = "bgp"
if 'H' in flags:
d['protocol'] = "host"
if route['age'] is not None:
d['age'] = int(route['age'])
if route['nexthop'] is not None:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"10.22.0.0/16": [{"protocol": "bgp", "last_active": false, "next_hop": "10.0.0.1", "outgoing_interface": "", "preference": -1, "inactive_reason": "", "current_active": true, "age": 2878517, "routing_table": "default", "selected_next_hop": false, "protocol_attributes": {}}]}
{"10.22.0.0/16": [{"protocol": "bgp", "last_active": false, "next_hop": "10.0.0.1", "outgoing_interface": "", "preference": -1, "inactive_reason": "", "current_active": true, "age": 2832970, "routing_table": "default", "selected_next_hop": false, "protocol_attributes": {}}]}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"10.0.0.128/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.1","outgoing_interface": "tunnel.34","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "192.168.1.1/32": [{"current_active": true,"age": -1,"routing_table": "default","next_hop": "0.0.0.0","outgoing_interface": "","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "10.0.0.132/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.2","outgoing_interface": "tunnel.35","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }]}
{"10.0.0.128/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.1","outgoing_interface": "tunnel.34","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "192.168.1.1/32": [{"protocol": "host", "current_active": true,"age": -1,"routing_table": "default","next_hop": "0.0.0.0","outgoing_interface": "","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }], "10.0.0.132/30": [{"protocol": "connect","current_active": true,"age": -1,"routing_table": "default","next_hop": "10.0.0.2","outgoing_interface": "tunnel.35","preference": 0, "protocol_attributes": {}, "inactive_reason": "", "last_active": false, "selected_next_hop": false }]}

0 comments on commit a2c0311

Please sign in to comment.