03-15-2018 09:23 AM
Hi all,
The following code worked before I updated to ydk 0.7.0. Now I am receiving an error when a ydk.errors.YPYCoreError when I run it. I have tested against several virtual devices running XR (code level 6.0 and 6.2.1 as well as XR router in YDK Sandbox 2.1, with all the same result.
I have run the code in both my native Mac environment as well as on Vagrant. Any help would be appreciated
CODE being Run
from ydk.services import CRUDService
from ydk.providers import NetconfServiceProvider
from ydk.models.cisco_ios_xr import Cisco_IOS_XR_ifmgr_cfg as xr_ifmgr_cfg
from ydk.services.codec_service import CodecService
from ydk.providers.codec_provider import CodecServiceProvider
crud = CRUDService()
codec = CodecService()
codec_provider = CodecServiceProvider(type='xml')
provider = NetconfServiceProvider(address=<********>
port=830,
username=<*****>,
password=<*****>,
protocol='ssh')
interface_configurations = xr_ifmgr_cfg.InterfaceConfigurations()
interface_configuration = interface_configurations.InterfaceConfiguration()
interface_configuration.interface_name = 'Loopback0'
interface_configurations.interface_configuration.append(interface_configuration)
read_data = crud.read(provider, interface_configurations)
print(codec.encode(codec_provider, read_data))
TRACEBACK
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 112, in helper
return func(self, provider, entity, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ydk/services/crud_service.py", line 35, in read
return self._crud.read(provider, read_filter)
File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error
_raise(_exc)
File "/usr/local/lib/python2.7/dist-packages/ydk/errors/error_handler.py", line 56, in _raise
raise exc
ydk.errors.YPYCoreError: Couldn't fetch child entity 'Cisco-IOS-XR-ipv4-io-cfg:ipv4-network' in parent /Cisco-IOS-XR-ifmgr-cfg:interface-configurations/interface-configuration[active='act'][interface-name='Loopback0']
03-19-2018 12:18 PM
Can you please raise an issue at and we can take a look at it?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide