<?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 Re: YCoreError: YCodecError:Unknown element in Tools</title>
    <link>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4317184#M1214</link>
    <description>&lt;P&gt;Thank you for response&lt;/P&gt;&lt;P&gt;The logs shared above are before the Netconf Session/Capabilities are exchanged, I am not using YDK NetconfProvider, just using Codec Service to convert JSON configuration templates to XML. using the CodecServiceProvider with type=json or type=xml, Do I need to use discovery capabilities before using CodecServiceProvider ?&lt;/P&gt;&lt;P&gt;From my understanding - the decode of JSON to YDK Python Object is failing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;capability&amp;gt;http://cisco.com/ns/yang/Cisco-IOS-XR-um-policymap-classmap-cfg?module=Cisco-IOS-XR-um-policymap-classmap-cfg&amp;amp;amp;revision=2020-01-27&amp;amp;amp;features=pmap-type-qos,pmap-type-pbr,pmap-type-accounting,pmap-type-redirect,pmap-type-traffic,pmap-type-control,pmap-type-afmon,cmap-type-qos,cmap-type-traffic,match-ipv4-acl,match-ipv6-acl,match-ethernet-services-acl,match-ipv4-dscp,match-ipv4-prec,match-ipv6-dscp,match-ipv6-prec,match-dscp,match-prec,match-proto,match-mpls-exp-top,match-cos,match-cos-inner,match-vlan,match-vlan-inner,match-source-port,match-destination-port,match-src-mac,match-dst-mac,match-src-addr-ipv4,match-dst-addr-ipv4,match-src-addr-ipv6,match-dst-addr-ipv6,match-atm,match-cac,match-dei,match-dei-inner,match-discard-class,match-ethertype,match-flow-key,match-fragment-type,flow-max-count,match-fr-de,match-fr,match-mpls-disp-ipv4-acl,match-mpls-disp-ipv6-acl,match-mpls-disp-cmap,match-mpls-exp-imposition,match-ipv4-packet-length,match-ipv6-packet-length,match-authen-status,match-timer,match-username,match-vpls-known,match-vpls-unknown,match-vpls-control,matchnot-ipv4-acl,matchnot-ipv6-acl,matchnot-es-acl,matchnot-cac-local,matchnot-dei,matchnot-authen-status,matchnot-protocol,matchnot-timer,matchnot-username,matchnot-ethertype,matchnot-fr-de,matchnot-fr,matchnot-ipv4-packet-length,matchnot-ipv6-packet-length,matchnot-vlan,matchnot-vlan-inner,matchnot-vpls-known,matchnot-vpls-unknown,matchnot-vpls-bcast,matchnot-vpls-control,matchnot-vpls-mcast,matchnot-flow-tag,matchnot-mac-address,matchnot-mpls-disp-ipv4-acl,matchnot-mpls-disp-ipv6-acl,action-compress-header-ip,action-encap-sequence,action-accounting,action-prepaid,action-timeout,action-authenticate,action-authorize,action-disconnect,action-monitor,action-set-timer,action-stop-timer,action-copy,action-http-redirect,action-http-enrichment,action-punt,action-redirect-nexthop,action-redirect-rt,action-service-function,action-set-dst-address,action-set-df,action-set-fwd-class,action-set-src-address,action-transmit,action-decap-gre,action-fmm,action-metric,action-ipcbr,action-ipcbr-pkt-rate,action-ipcbr-media-rate,action-mdi-pkt-rate,action-rtp,action-rtp-min-seq,action-rtp-seq-ext,action-rtp-j2k,action-rtp-mmr,action-rtp-voice,action-react,action-react-snmp,action-react-clone,action-react-alarm,action-react-grouped-alarm,action-cac,action-bandwidth,action-service-fragment,action-pfc,action-police-bucket,action-police-peak-burst,action-police-conform-color,action-police-exceed-color,action-police-coupled,action-police-set-fr-de,action-set-atm-clp,action-set-traffic-class,action-shape-burst,action-service-from-line,action-service-internal&amp;lt;/capability&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Apr 2021 07:40:14 GMT</pubDate>
    <dc:creator>ajitdani</dc:creator>
    <dc:date>2021-04-01T07:40:14Z</dc:date>
    <item>
      <title>YCoreError: YCodecError:Unknown element</title>
      <link>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4316695#M1212</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am getting "Data is invalid according to the yang model. Libyang error: Unknown element "qos". Path: '/Cisco-IOS-XR-um-policymap-classmap-cfg:policy-map/type/qos[policy-map-name='l2vpn-v1410-PE-PARENT-EGRESS']'" while using the Codec Service to generation XML RPC configuration.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are the log messages -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2021-03-31 09:05:00,474 [CID=1234567] [Thread-6] DEBUG ydk - Extracting module names from JSON payload&lt;BR /&gt;2021-03-31 09:05:00,474 [CID=1234567] [Thread-6] DEBUG ydk - Loading module 'Cisco-IOS-XR-um-policymap-classmap-cfg', revision ''&lt;BR /&gt;2021-03-31 09:05:00,474 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "Cisco-IOS-XR-um-policymap-classmap-cfg" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang.&lt;BR /&gt;2021-03-31 09:05:00,475 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "Cisco-IOS-XR-um-policymap-classmap-cfg" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi.&lt;BR /&gt;2021-03-31 09:05:00,475 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Loading schema from "/opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang/Cisco-IOS-XR-um-policymap-classmap-cfg.yang" file.&lt;BR /&gt;2021-03-31 09:05:00,475 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "cisco-semver" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang.&lt;BR /&gt;2021-03-31 09:05:00,476 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "cisco-semver" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi.&lt;BR /&gt;2021-03-31 09:05:00,476 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Loading schema from "/opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang/cisco-semver.yang" file.&lt;BR /&gt;2021-03-31 09:05:00,476 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Module "cisco-semver@2019-03-13" successfully parsed as implemented.&lt;BR /&gt;2021-03-31 09:05:00,477 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "Cisco-IOS-XR-types" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang.&lt;BR /&gt;2021-03-31 09:05:00,477 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Searching for "Cisco-IOS-XR-types" in /opt/adani/Code/PycharmProjects/netconf-adapter-testapi.&lt;BR /&gt;2021-03-31 09:05:00,477 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Loading schema from "/opt/adani/Code/PycharmProjects/netconf-adapter-testapi/venv/lib/python3.6/site-packages/ydk/models/bt_cisco_ios_xr/_yang/Cisco-IOS-XR-types.yang" file.&lt;BR /&gt;2021-03-31 09:05:00,479 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Module "Cisco-IOS-XR-types@2020-06-25" successfully parsed as implemented.&lt;BR /&gt;2021-03-31 09:05:00,487 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Resolving "Cisco-IOS-XR-um-policymap-classmap-cfg" unresolved schema nodes and their constraints...&lt;BR /&gt;2021-03-31 09:05:00,488 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] All "Cisco-IOS-XR-um-policymap-classmap-cfg" schema nodes and constraints resolved.&lt;BR /&gt;2021-03-31 09:05:00,488 [CID=1234567] [Thread-6] DEBUG ydk - [libyang] Module "Cisco-IOS-XR-um-policymap-classmap-cfg@2020-10-05" successfully parsed as implemented.&lt;BR /&gt;2021-03-31 09:05:00,488 [CID=1234567] [Thread-6] DEBUG ydk - Added new libyang module 'Cisco-IOS-XR-um-policymap-classmap-cfg'&lt;BR /&gt;2021-03-31 09:05:00,488 [CID=1234567] [Thread-6] DEBUG ydk - Populating new module schema 'Cisco-IOS-XR-um-policymap-classmap-cfg'&lt;BR /&gt;2021-03-31 09:05:00,489 [CID=1234567] [Thread-6] ERROR ydk - Data is invalid according to the yang model. Libyang error: Unknown element "qos". Path: '/Cisco-IOS-XR-um-policymap-classmap-cfg:policy-map/type/qos[policy-map-name='l2vpn-v1410-PE-PARENT-EGRESS']'&lt;BR /&gt;2021-03-31 09:05:00,489 [CID=1234567] [Thread-6] ERROR ydk - Parsing failed with message Unknown element "qos".&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 10:44:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4316695#M1212</guid>
      <dc:creator>ajitdani</dc:creator>
      <dc:date>2021-03-31T10:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: YCoreError: YCodecError:Unknown element</title>
      <link>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4317013#M1213</link>
      <description>&lt;P&gt;The YANG model states this:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;container policy-map {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"Configure a policy-map";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;container type {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;description&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;"policy-map type";&lt;BR /&gt;      ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;      list qos {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;if-feature "pmap-type-qos";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;key "policy-map-name";&lt;BR /&gt;        ...&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;That means the feature "pmap-type-qos" must be enabled in order for "list qos" to be present in the model. In the log it is visible that this feature is not present in server capabilities. If it was present, the log would have this message:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;DEBUG ydk - Enabled feature 'pmap-type-qos' in 'Cisco-IOS-XR-um-policymap-classmap-cfg'&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;Please check that your server indeed supports&amp;nbsp;feature "pmap-type-qos" and the feature is present in the capabilities for module "&lt;SPAN&gt;Cisco-IOS-XR-um-policymap-classmap-cfg".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 20:52:17 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4317013#M1213</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2021-03-31T20:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: YCoreError: YCodecError:Unknown element</title>
      <link>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4317184#M1214</link>
      <description>&lt;P&gt;Thank you for response&lt;/P&gt;&lt;P&gt;The logs shared above are before the Netconf Session/Capabilities are exchanged, I am not using YDK NetconfProvider, just using Codec Service to convert JSON configuration templates to XML. using the CodecServiceProvider with type=json or type=xml, Do I need to use discovery capabilities before using CodecServiceProvider ?&lt;/P&gt;&lt;P&gt;From my understanding - the decode of JSON to YDK Python Object is failing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;capability&amp;gt;http://cisco.com/ns/yang/Cisco-IOS-XR-um-policymap-classmap-cfg?module=Cisco-IOS-XR-um-policymap-classmap-cfg&amp;amp;amp;revision=2020-01-27&amp;amp;amp;features=pmap-type-qos,pmap-type-pbr,pmap-type-accounting,pmap-type-redirect,pmap-type-traffic,pmap-type-control,pmap-type-afmon,cmap-type-qos,cmap-type-traffic,match-ipv4-acl,match-ipv6-acl,match-ethernet-services-acl,match-ipv4-dscp,match-ipv4-prec,match-ipv6-dscp,match-ipv6-prec,match-dscp,match-prec,match-proto,match-mpls-exp-top,match-cos,match-cos-inner,match-vlan,match-vlan-inner,match-source-port,match-destination-port,match-src-mac,match-dst-mac,match-src-addr-ipv4,match-dst-addr-ipv4,match-src-addr-ipv6,match-dst-addr-ipv6,match-atm,match-cac,match-dei,match-dei-inner,match-discard-class,match-ethertype,match-flow-key,match-fragment-type,flow-max-count,match-fr-de,match-fr,match-mpls-disp-ipv4-acl,match-mpls-disp-ipv6-acl,match-mpls-disp-cmap,match-mpls-exp-imposition,match-ipv4-packet-length,match-ipv6-packet-length,match-authen-status,match-timer,match-username,match-vpls-known,match-vpls-unknown,match-vpls-control,matchnot-ipv4-acl,matchnot-ipv6-acl,matchnot-es-acl,matchnot-cac-local,matchnot-dei,matchnot-authen-status,matchnot-protocol,matchnot-timer,matchnot-username,matchnot-ethertype,matchnot-fr-de,matchnot-fr,matchnot-ipv4-packet-length,matchnot-ipv6-packet-length,matchnot-vlan,matchnot-vlan-inner,matchnot-vpls-known,matchnot-vpls-unknown,matchnot-vpls-bcast,matchnot-vpls-control,matchnot-vpls-mcast,matchnot-flow-tag,matchnot-mac-address,matchnot-mpls-disp-ipv4-acl,matchnot-mpls-disp-ipv6-acl,action-compress-header-ip,action-encap-sequence,action-accounting,action-prepaid,action-timeout,action-authenticate,action-authorize,action-disconnect,action-monitor,action-set-timer,action-stop-timer,action-copy,action-http-redirect,action-http-enrichment,action-punt,action-redirect-nexthop,action-redirect-rt,action-service-function,action-set-dst-address,action-set-df,action-set-fwd-class,action-set-src-address,action-transmit,action-decap-gre,action-fmm,action-metric,action-ipcbr,action-ipcbr-pkt-rate,action-ipcbr-media-rate,action-mdi-pkt-rate,action-rtp,action-rtp-min-seq,action-rtp-seq-ext,action-rtp-j2k,action-rtp-mmr,action-rtp-voice,action-react,action-react-snmp,action-react-clone,action-react-alarm,action-react-grouped-alarm,action-cac,action-bandwidth,action-service-fragment,action-pfc,action-police-bucket,action-police-peak-burst,action-police-conform-color,action-police-exceed-color,action-police-coupled,action-police-set-fr-de,action-set-atm-clp,action-set-traffic-class,action-shape-burst,action-service-from-line,action-service-internal&amp;lt;/capability&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Apr 2021 07:40:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4317184#M1214</guid>
      <dc:creator>ajitdani</dc:creator>
      <dc:date>2021-04-01T07:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: YCoreError: YCodecError:Unknown element</title>
      <link>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4318403#M1215</link>
      <description>&lt;P&gt;If you are not using Netconf capabilities and just want to use CodecService for encoding your model object to XML or JSON string, you have to initialize CodecServiceProvider by explicitly specifying capabilities. Here is example that you would need to adopt to your application:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.path &lt;SPAN&gt;import &lt;/SPAN&gt;Repository&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.providers &lt;SPAN&gt;import &lt;/SPAN&gt;CodecServiceProvider&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;ydk.services &lt;SPAN&gt;import &lt;/SPAN&gt;CodecService&lt;BR /&gt;&lt;BR /&gt;repo = Repository('path/to/model/repository&lt;SPAN&gt;'&lt;/SPAN&gt;)&lt;BR /&gt;lookup_table = {'&lt;SPAN&gt;http://cisco.com/ns/yang/Cisco-IOS-XR-um-policymap-classmap-cfg'&lt;/SPAN&gt;: Capability('&lt;SPAN&gt;Cisco-IOS-XR-um-policymap-classmap-cfg'&lt;/SPAN&gt;&lt;SPAN&gt;, '', ['pmap-type-qos'], []&lt;/SPAN&gt;),&lt;BR /&gt;                }&lt;BR /&gt;capabilities = [Capability(&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;Cisco-IOS-XR-um-policymap-classmap-cfg&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'', ['pmap-type-qos'], []&lt;/SPAN&gt;)&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt; ]&lt;BR /&gt;root_schema = repo.create_root_schema(lookup_table&lt;SPAN&gt;, &lt;/SPAN&gt;capabilities)&lt;BR /&gt;json_codec_provider = CodecServiceProvider(&lt;SPAN&gt;type&lt;/SPAN&gt;=&lt;SPAN&gt;'json', repo=repo&lt;/SPAN&gt;)&lt;BR /&gt;xml_codec_provider = CodecServiceProvider(&lt;SPAN&gt;type&lt;/SPAN&gt;=&lt;SPAN&gt;'xml', repo=repo&lt;/SPAN&gt;)&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Apr 2021 21:54:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/ycoreerror-ycodecerror-unknown-element/m-p/4318403#M1215</guid>
      <dc:creator>yangorelik</dc:creator>
      <dc:date>2021-04-04T21:54:52Z</dc:date>
    </item>
  </channel>
</rss>

