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

Add ability to view routes in a particular table #157

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

pshemk
Copy link

@pshemk pshemk commented May 29, 2017

issue #156

@pshemk
Copy link
Author

pshemk commented May 29, 2017

pull request #157

@mirceaulinic
Copy link
Member

mirceaulinic commented May 30, 2017

Hi @pshemk - thanks for your contribution.

We have thought about this improvement, see napalm-automation/napalm-base#174.
Another thing we wanted to tackle is adding a new field inside the output: next_hop_type. Do you think you could do that too?
Please note that this is an API change and we'll nee to implement the changes in two more drivers: iosxr and eos.

@@ -1101,8 +1101,8 @@ def get_mac_address_table(self):

return mac_address_table

def get_route_to(self, destination='', protocol=''):
"""Return route details to a specific destination, learned from a certain protocol."""
def get_route_to(self, destination='', protocol='', table=''):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename table to vrf

@pshemk
Copy link
Author

pshemk commented May 30, 2017

I've renamed table to 'vrf'. I realise that for consistency we should use vrf, but in junos a vrf can have multiple tables, so this might be a tad confusing too.

What is 'next_hop_type' in this context? It looks like the current implementation pulls out all the route properties already:

            "route_to": {
                "13.107.16.0/24": [
                    {
                        "age": 527044,
                        "current_active": true,
                        "inactive_reason": "",
                        "last_active": true,
                        "next_hop": "10.69.2.29",
                        "outgoing_interface": "xe-0/0/1.100",
                        "preference": 170,
                        "protocol": "BGP",
                        "protocol_attributes": {
                            "as_path": "8075 8068",
                            "communities": [
                                "23655:100",
                                "23655:202"
                            ],
                            "local_as": 23655,
                            "local_preference": 130,
                            "metric": 100,
                            "metric2": 839,
                            "preference2": -131,
                            "remote_address": "10.69.0.253",
                            "remote_as": 23655
                        },
                        "routing_table": "InternetCombined.inet.0",
                        "selected_next_hop": true
                    },

@mirceaulinic
Copy link
Member

mirceaulinic commented May 31, 2017

@pshemk this is pending clarification under napalm-automation/napalm-base#174.
Meanwhile, you could amend your commits to make sure you're using your email address and github can link them to your account.

@mirceaulinic mirceaulinic modified the milestones: BLOCKED, APPROVED May 31, 2017
@pshemk
Copy link
Author

pshemk commented May 31, 2017

the commits have correct username now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants