Files
2021-08-21 17:13:33 +04:00

8 lines
352 B
Python

from ncclient import manager
with manager.connect(host='172.16.2.34', username='root',
password='xxxx', hostkey_verify=False) as m:
result = m.get_config("running",
filter=('subtree',
'<interfaces xmlns="http://openconfig.net/yang/interfaces"/>'))
print (result)