04-26-2017 12:30 AM
>>> from ydk.models.cisco_ios_xr import Cisco_IOS_XR_ip_static_cfg
>>> from ydk.providers import NetconfServiceProvider
>>> from ydk.services import CRUDService
>>> ncc = NetconfServiceProvider(address='172.27.121.52',username='root',password='lab',port=830)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ydk/providers/netconf_provider.py", line 69, in __init__
self._connect()
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ydk/providers/netconf_provider.py", line 75, in _connect
self.sp_instance.connect(self.session_config)
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ydk/providers/_provider_plugin.py", line 296, in connect
hostkey_verify=False)
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ncclient/manager.py", line 154, in connect
return connect_ssh(*args, **kwds)
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ncclient/manager.py", line 119, in connect_ssh
session.connect(*args, **kwds)
File "/auto/cafy_dev/cafykit/exec/lib/python3.4/site-packages/ncclient/transport/ssh.py", line 383, in connect
raise SSHError("Could not open socket to %s:%s" % (host, port))
ncclient.transport.errors.SSHError: Could not open socket to 172.27.121.52:830