<reponame>marawat/PyManish<filename>netconf1.py
#!/usr/bin/python3

import time
from ncclient import manager

#using connect function with manager to connect Netconf enabled device

device=manager.connect(host='172.16.6.131',username='root',password='<PASSWORD>',port=22,allow_agent=False,look_for_keys=False,hostkey_verify=False)
print(device)

print('________________________')
time.sleep(2)
print(dir(device))
print('@@@@@@@@@@@@@@@@@@@@@@@@@@')
time.sleep(1)
print(device.get_config('running'))


#!/usr/bin/python3

import time
from ncclient import manager

#using connect function with manager to connect Netconf enabled device

device=manager.connect(host='172.16.6.131',username='root',password='<PASSWORD>',port=22,allow_agent=False,look_for_keys=False,hostkey_verify=False)
print(device)

print('________________________')
time.sleep(2)
print(dir(device))
print('@@@@@@@@@@@@@@@@@@@@@@@@@@')
time.sleep(1)
print(device.get_config('running'))
#!/usr/bin/python3 #using connect function with manager to connect Netconf enabled device