https://carlmontanari.github.io/scrapli/
First of all installing Scrapli..
python3 -m pip install scrapli
I had to change the ssh_config file of Ubuntu to match the older Ciphers like the following and auth_secondary which is the enable password needed to be configured in order to access the devices in EVE-NG.
Following white colored text were the text I needed to add.
This can be using one of the following solutions.
1. Text fsm
2. Genie
I will perform the following example by Textfsm. For that we need to install Textfsm templates to Scrapli library.
use following command in cli;
python3 -m pip install scrapli[textfsm]
Following code will get the "show version" output to the "JSON" structured format.
Output:-
Configuring Devices with Scrapli
Following example will configure ospf process and ospf router id using Scrapli.
Note that the commands are sent as a list and will be configured as line by line and no need to send "configure terminal" command as it will be taken care by the library.
No comments:
Post a Comment