This test can fail with unknow hosts as follows. Since this is a OF-config test/sample, known host check is not essential. Disable the check to avoid non-essential problem for easy test.
> ryu $ PYTHONPATH=. ./bin/ryu-manager --verbose > ryu/tests/integrated/test_of_config.py > loading app ryu/tests/integrated/test_of_config.py > loading app ryu.controller.ofp_handler > instantiating app ryu/tests/integrated/test_of_config.py of OFConfigClient > <SSHSession(session, initial daemon)> created: > client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', > 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', > 'urn:ietf:params:netconf:capability:validate:1.0', > 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', > 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', > 'urn:ietf:params:netconf:base:1.0', > 'urn:liberouter:params:netconf:capability:power-control:1.0', > 'urn:ietf:params:netconf:capability:candidate:1.0', > 'urn:ietf:params:netconf:capability:xpath:1.0', > 'urn:ietf:params:netconf:capability:startup:1.0', > 'urn:ietf:params:netconf:capability:interleave:1.0'] > starting thread (client mode): 0x2348650L > Connected (version 2.0, client Erlang) > kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] > client encrypt:['aes128-cbc', '3des-cbc'] server encrypt:['aes128-cbc', > '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client > compress:['none', 'zlib'] server compress:['none', 'zlib'] client lang:[''] > server lang:[''] kex follows?False > Ciphers agreed: local=aes128-cbc, remote=aes128-cbc > using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local > aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; > compression: local none, remote none > Switch to new keys ... > Traceback (most recent call last): > File "./bin/ryu-manager", line 87, in <module> > main() > File "./bin/ryu-manager", line 67, in main > app_mgr.instantiate_apps(**contexts) > File "/ryu/ryu/base/app_manager.py", line 289, in instantiate_apps > self._instantiate(app_name, cls, *args, **kwargs) > File "/ryu/ryu/base/app_manager.py", line 275, in _instantiate > app = cls(*args, **kwargs) > File "/ryu/ryu/tests/integrated/test_of_config.py", line 123, in __init__ > host=HOST, port=PORT, username=USERNAME, password=PASSWORD) > File "/ryu/ryu/lib/of_config/capable_switch.py", line 49, in __init__ > self.netconf = connect(*self._connect_args, **self._connect_kwargs) > File "/ryu/ryu/contrib/ncclient/manager.py", line 67, in connect_ssh > session.connect(*args, **kwds) > File "/ryu/ryu/contrib/ncclient/transport/ssh.py", line 193, in connect > raise SSHUnknownHostError(host, fingerprint) > ncclient.transport.errors.SSHUnknownHostError: Unknown host key > [63:c2:19:95:97:29:84:f6:86:41:1a:15:17:d7:90:0d] for [127.0.0.1] Cc: Shivaram Mysore <[email protected]> Signed-off-by: Isaku Yamahata <[email protected]> --- ryu/tests/integrated/test_of_config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ryu/tests/integrated/test_of_config.py b/ryu/tests/integrated/test_of_config.py index a8c4f9f..2e46c6e 100644 --- a/ryu/tests/integrated/test_of_config.py +++ b/ryu/tests/integrated/test_of_config.py @@ -120,7 +120,8 @@ class OFConfigClient(app_manager.RyuApp): def __init__(self, *args, **kwargs): super(OFConfigClient, self).__init__(*args, **kwargs) self.switch = capable_switch.OFCapableSwitch( - host=HOST, port=PORT, username=USERNAME, password=PASSWORD) + host=HOST, port=PORT, username=USERNAME, password=PASSWORD, + unknown_host_cb=lambda host, fingeprint: True) gevent.spawn(self._do_of_config) def _validate(self, tree): -- 1.7.10.4 ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
