napalm-automation-community / napalm-ros

MikroTik RouterOS NAPALM driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Writing Parser for ROS device

govardhan271 opened this issue · comments

Writing Parser for mikrotik-ros device?

How to select the parser type for ROS device?
What is the command similar to show running-config all command in eos and nxos device?
How the parser implementation is to be done, I mean writing the regex to parse the data?

I was able to get the data from device, but to parse the data i am facing the above issues mentioned.

The data i got from the device after implementing the cli with argument ["/interface/vlan/print"] in ros is :

[{".id": "*6", "vlan-id": 10, "arp": "enabled", "l2mtu": 65531, "mtu": 1500, "running": true, "loop-protect-status": "off", "loop-protect-disable-time": "5m", "name": "vlan1", "loop-protect": "default", "interface": "bridge0", "loop-protect-send-interval": "5s", "mac-address": "22:80:99:DE:1D:32", "arp-timeout": "auto", "use-service-tag": false, "disabled": false}, {".id": "*7", "vlan-id": 20, "arp": "enabled", "l2mtu": 65531, "mtu": 1500, "running": true, "loop-protect-status": "off", "loop-protect-disable-time": "5m", "name": "vlan2", "loop-protect": "default", "interface": "bridge1", "loop-protect-send-interval": "5s", "mac-address": "42:B6:CF:09:E7:1D", "arp-timeout": "auto", "use-service-tag": false, "disabled": false}, {".id": "*8", "arp-timeout": "auto", "arp": "enabled", "mtu": 1500, "interface": "ether1", "running": true, "loop-protect-status": "off", "loop-protect-disable-time": "5m", "name": "vlan3", "loop-protect": "default", "loop-protect-send-interval": "5s", "mac-address": "08:00:27:33:7C:0D", "vlan-id": 30, "use-service-tag": false, "disabled": false}]

The version of ROS device which i am currently using is MikroTik RouterOS 6.42.11 (c) 1999-2018

Thanks in advance.

This driver uses API. No text parsing is required in napalm-ros for replies.
What problem do you want to solve ?