<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ydk.errors.YModelError:  Could not create data node: openconfig-if-ip:ipv4 : Schema node not found.. Path: openconfig-if-ip:ipv4 in Tools</title>
    <link>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-could-not-create-data-node-openconfig-if/m-p/3774465#M2168</link>
    <description>&lt;P&gt;During use of openconfg + ydk, exception prevents the code from an execution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My use case here is to create an addressed loopback interface on CSR, IOS-XE 16.8.1 with openconfig + ydk. (if I remove IPv4 semantics, but keep subinterface piece, code executes fine).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise if this is an version mismatch / misuse / bug? Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(ydk) root@debian:~/ydk# pip freeze | grep ydk&lt;BR /&gt;ydk==0.8.0&lt;BR /&gt;ydk-models-ietf==0.1.5.post2&lt;BR /&gt;ydk-models-openconfig==0.1.5&lt;/P&gt;&lt;P&gt;(same behaviour on latest profile)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;csr1#show vers&lt;BR /&gt;Cisco IOS XE Software, Version 16.08.01a&lt;BR /&gt;Cisco IOS Software [Fuji], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.8.1a, RELEASE SOFTWARE (fc1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;import logging&lt;BR /&gt;log = logging.getLogger('ydk')&lt;BR /&gt;log.setLevel(logging.DEBUG)&lt;BR /&gt;handler = logging.StreamHandler()&lt;BR /&gt;log.addHandler(handler)&lt;/P&gt;&lt;P&gt;from ydk.models.openconfig import openconfig_interfaces&lt;BR /&gt;interfaces = openconfig_interfaces.Interfaces()&lt;BR /&gt;interface = interfaces.Interface()&lt;BR /&gt;interface.name = "Loopback22"&lt;BR /&gt;interface.config.name = "Loopback22"&lt;BR /&gt;interface.config.description = "Test"&lt;BR /&gt;interface.config.enabled = True&lt;BR /&gt;from ydk.models.ietf.iana_if_type import SoftwareLoopback&lt;BR /&gt;sl = SoftwareLoopback()&lt;BR /&gt;interface.config.type = sl&lt;BR /&gt;# configure ip subinterface&lt;BR /&gt;subinterface = interface.subinterfaces.Subinterface()&lt;BR /&gt;subinterface.index = 0&lt;BR /&gt;subinterface.config.index = 0&lt;/P&gt;&lt;P&gt;subinterface.ipv4 = subinterface.Ipv4()&lt;/P&gt;&lt;P&gt;address = subinterface.ipv4.addresses.Address()&lt;BR /&gt;address.ip = "192.168.0.1"&lt;BR /&gt;address.config.ip = "192.168.0.1"&lt;BR /&gt;address.config.prefix_length = 32&lt;/P&gt;&lt;P&gt;subinterface.ipv4.addresses.address.append(address)&lt;/P&gt;&lt;P&gt;interface.subinterfaces.subinterface.append(subinterface)&lt;BR /&gt;interfaces.interface.append(interface)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from ydk.services import CRUDService&lt;BR /&gt;from ydk.providers import NetconfServiceProvider&lt;/P&gt;&lt;P&gt;crud = CRUDService()&lt;BR /&gt;provider = NetconfServiceProvider(address="ip", port=830, username="user", password="pass", protocol="ssh")&lt;BR /&gt;crud.create(provider, interfaces)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;P&gt;Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-if-ip" module into "cisco-xe-openconfig-if-ip-deviation" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-if-ip-deviation" parsing failed.&lt;BR /&gt;Loading module 'cisco-xe-openconfig-interfaces-deviation', revision ''&lt;BR /&gt;Getting module 'cisco-xe-openconfig-interfaces-deviation' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/cisco-xe-openconfig-interfaces-deviation.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Getting module 'openconfig-vlan' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/openconfig-vlan.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Getting module 'openconfig-vlan-types' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/openconfig-vlan-types.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.&lt;BR /&gt;Getting child schema with path 'openconfig-if-ip:ipv4' in /openconfig-interfaces:interfaces/interface[name='Loopback22']/subinterfaces/subinterface[index='0']&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Schema node not found. Path: 'openconfig-if-ip:ipv4'&lt;BR /&gt;Creating new data path 'openconfig-if-ip:ipv4' with value '' in 'subinterface'&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Schema node not found. Path: 'openconfig-if-ip:ipv4'&lt;BR /&gt;Could not create data node: openconfig-if-ip:ipv4 for path: 'openconfig-if-ip:ipv4', value: ''&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 112, in helper&lt;BR /&gt;return func(self, provider, entity, *args, **kwargs)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/services/crud_service.py", line 49, in create&lt;BR /&gt;return self._crud.create(provider, entity)&lt;BR /&gt;File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__&lt;BR /&gt;self.gen.throw(type, value, traceback)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error&lt;BR /&gt;_raise(_exc)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 56, in _raise&lt;BR /&gt;raise exc&lt;BR /&gt;ydk.errors.YModelError: Could not create data node: openconfig-if-ip:ipv4 : Schema node not found.. Path: openconfig-if-ip:ipv4&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jan 2019 21:53:06 GMT</pubDate>
    <dc:creator>mzb</dc:creator>
    <dc:date>2019-01-07T21:53:06Z</dc:date>
    <item>
      <title>ydk.errors.YModelError:  Could not create data node: openconfig-if-ip:ipv4 : Schema node not found.. Path: openconfig-if-ip:ipv4</title>
      <link>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-could-not-create-data-node-openconfig-if/m-p/3774465#M2168</link>
      <description>&lt;P&gt;During use of openconfg + ydk, exception prevents the code from an execution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My use case here is to create an addressed loopback interface on CSR, IOS-XE 16.8.1 with openconfig + ydk. (if I remove IPv4 semantics, but keep subinterface piece, code executes fine).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise if this is an version mismatch / misuse / bug? Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(ydk) root@debian:~/ydk# pip freeze | grep ydk&lt;BR /&gt;ydk==0.8.0&lt;BR /&gt;ydk-models-ietf==0.1.5.post2&lt;BR /&gt;ydk-models-openconfig==0.1.5&lt;/P&gt;&lt;P&gt;(same behaviour on latest profile)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;csr1#show vers&lt;BR /&gt;Cisco IOS XE Software, Version 16.08.01a&lt;BR /&gt;Cisco IOS Software [Fuji], Virtual XE Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 16.8.1a, RELEASE SOFTWARE (fc1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;import logging&lt;BR /&gt;log = logging.getLogger('ydk')&lt;BR /&gt;log.setLevel(logging.DEBUG)&lt;BR /&gt;handler = logging.StreamHandler()&lt;BR /&gt;log.addHandler(handler)&lt;/P&gt;&lt;P&gt;from ydk.models.openconfig import openconfig_interfaces&lt;BR /&gt;interfaces = openconfig_interfaces.Interfaces()&lt;BR /&gt;interface = interfaces.Interface()&lt;BR /&gt;interface.name = "Loopback22"&lt;BR /&gt;interface.config.name = "Loopback22"&lt;BR /&gt;interface.config.description = "Test"&lt;BR /&gt;interface.config.enabled = True&lt;BR /&gt;from ydk.models.ietf.iana_if_type import SoftwareLoopback&lt;BR /&gt;sl = SoftwareLoopback()&lt;BR /&gt;interface.config.type = sl&lt;BR /&gt;# configure ip subinterface&lt;BR /&gt;subinterface = interface.subinterfaces.Subinterface()&lt;BR /&gt;subinterface.index = 0&lt;BR /&gt;subinterface.config.index = 0&lt;/P&gt;&lt;P&gt;subinterface.ipv4 = subinterface.Ipv4()&lt;/P&gt;&lt;P&gt;address = subinterface.ipv4.addresses.Address()&lt;BR /&gt;address.ip = "192.168.0.1"&lt;BR /&gt;address.config.ip = "192.168.0.1"&lt;BR /&gt;address.config.prefix_length = 32&lt;/P&gt;&lt;P&gt;subinterface.ipv4.addresses.address.append(address)&lt;/P&gt;&lt;P&gt;interface.subinterfaces.subinterface.append(subinterface)&lt;BR /&gt;interfaces.interface.append(interface)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from ydk.services import CRUDService&lt;BR /&gt;from ydk.providers import NetconfServiceProvider&lt;/P&gt;&lt;P&gt;crud = CRUDService()&lt;BR /&gt;provider = NetconfServiceProvider(address="ip", port=830, username="user", password="pass", protocol="ssh")&lt;BR /&gt;crud.create(provider, interfaces)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Log:&lt;/P&gt;&lt;P&gt;Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "openconfig-if-ip" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-if-ip" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-if-ip" module into "cisco-xe-openconfig-if-ip-deviation" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-if-ip-deviation" parsing failed.&lt;BR /&gt;Loading module 'cisco-xe-openconfig-interfaces-deviation', revision ''&lt;BR /&gt;Getting module 'cisco-xe-openconfig-interfaces-deviation' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/cisco-xe-openconfig-interfaces-deviation.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Getting module 'openconfig-vlan' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/openconfig-vlan.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Getting module 'openconfig-vlan-types' submodule 'none'&lt;BR /&gt;Looking for file in folder: /root/.ydk/129.213.x.x_830&lt;BR /&gt;Opening file '/root/.ydk/129.213.x.x_830/openconfig-vlan-types.yang'&lt;BR /&gt;Path found with rev: true. Path without rev: false&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Invalid keyword "[1-9][0-9]{1,2}|[1-9])\.\.(409[0-4]|"".&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan-types" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan-types" module into "openconfig-vlan" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "openconfig-vlan" parsing failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Importing "openconfig-vlan" module into "cisco-xe-openconfig-interfaces-deviation" failed.&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Module "cisco-xe-openconfig-interfaces-deviation" parsing failed.&lt;BR /&gt;Getting child schema with path 'openconfig-if-ip:ipv4' in /openconfig-interfaces:interfaces/interface[name='Loopback22']/subinterfaces/subinterface[index='0']&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Schema node not found. Path: 'openconfig-if-ip:ipv4'&lt;BR /&gt;Creating new data path 'openconfig-if-ip:ipv4' with value '' in 'subinterface'&lt;BR /&gt;Data is invalid according to the yang model. Libyang error: Schema node not found. Path: 'openconfig-if-ip:ipv4'&lt;BR /&gt;Could not create data node: openconfig-if-ip:ipv4 for path: 'openconfig-if-ip:ipv4', value: ''&lt;BR /&gt;Traceback (most recent call last):&lt;BR /&gt;File "&amp;lt;stdin&amp;gt;", line 1, in &amp;lt;module&amp;gt;&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 112, in helper&lt;BR /&gt;return func(self, provider, entity, *args, **kwargs)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/services/crud_service.py", line 49, in create&lt;BR /&gt;return self._crud.create(provider, entity)&lt;BR /&gt;File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__&lt;BR /&gt;self.gen.throw(type, value, traceback)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 82, in handle_runtime_error&lt;BR /&gt;_raise(_exc)&lt;BR /&gt;File "/root/ydk/local/lib/python2.7/site-packages/ydk/errors/error_handler.py", line 56, in _raise&lt;BR /&gt;raise exc&lt;BR /&gt;ydk.errors.YModelError: Could not create data node: openconfig-if-ip:ipv4 : Schema node not found.. Path: openconfig-if-ip:ipv4&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 21:53:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ydk-errors-ymodelerror-could-not-create-data-node-openconfig-if/m-p/3774465#M2168</guid>
      <dc:creator>mzb</dc:creator>
      <dc:date>2019-01-07T21:53:06Z</dc:date>
    </item>
  </channel>
</rss>

