Tuesday, May 19, 2020

Junos/PyEZ/ Is there any way to get Routing-Instance info (interface, instance-type, protocols) ?

Hi there cool cats and network engineers, I'm working on JSNAPy if you guys familiar with it needs commands to verify / check status of the customers through <routing-instance>.

For example: show vpls connections instance abc. I need to know the RI is abc. I want to achieve that through input: interface of the customer: ae2.2002, I will get result as routing-instance abc, instance-type: vpls, protocols: vpls, ext...

Is there any operations commands or snmp mib to retrieve these info? I have searched the internet, the use of configuration snmp { routing-instance-access; ... } but as far as I know we might have to configure this for each customer.

I want to autonomation this process for all the customers and then through python get some random interface customers (aeX.Y) then get me name of RI, protocols, instance type.

Have anyone of you pros out there experience this issue before?

'ae7.3022': { 'ifAdminStatus': '1',

'ifAlias': 'FTI-L3VPN-ABC-CUSTOMERA',

'ifOperStatus': '1',

'nameRI': 'L3VPN-FTI-ABC-CUSTOMERA',

'protocols': '',

'routing_options': 'static'}}}

Through my py, I have get these info by rpc.get_config

data = dev.rpc.get_config(filter_xml='<routing-instances/>', options={'inherit':'inherit'})

Any faster or optimized ways to earn this?



No comments:

Post a Comment