pyapi FEATURE <edit-config> implementation
ncRPCEditConfig() method of the Session to send <edit-config> to the
NETCONF server.
diff --git a/python/examples/get.py b/python/examples/get.py
index 5fa0bc4..9ccfb73 100755
--- a/python/examples/get.py
+++ b/python/examples/get.py
@@ -13,6 +13,9 @@
def password_auth(user, host, data):
return getpass.getpass((user if user else os.getlogin()) + '@' + host + ' password : ')
+def hostkey_check(hostname, state, keytype, hexa, priv):
+ return True
+
#
# get know where to connect
#
@@ -32,6 +35,7 @@
ssh = nc.SSH()
ssh.setAuthInteractiveClb(interactive_auth)
ssh.setAuthPasswordClb(password_auth)
+ssh.setAuthHostkeyCheckClb(hostkey_check)
#
# create NETCONF session to the server