Quick Start Guide
Installation
In most cases installation via pip is the simplest and best way to install scrapli_netconf.
See here for advanced installation details.
| pip install scrapli-netconf
|
A Simple Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14 | from scrapli_netconf.driver import NetconfDriver
my_device = {
"host": "172.18.0.13",
"auth_username": "vrnetlab",
"auth_password": "VR-netlab9",
"auth_strict_key": False,
"port": 830
}
conn = NetconfDriver(**my_device)
conn.open()
response = conn.get_config(source="running")
print(response.result)
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 | $ python my_scrapli_script.py
<rpc-reply message-id="101">
<data>
<ssh>
<server>
<v2/>
<netconf>830</netconf>
<netconf-vrf-table>
<vrf>
<vrf-name>default</vrf-name>
<enable/>
</vrf>
</netconf-vrf-table>
</server>
</ssh>
<interface-configurations>
<interface-configuration>
<active>act</active>
<interface-name>MgmtEth0/RP0/CPU0/0</interface-name>
<SNIP>
</data>
</rpc-reply>
|
More Examples