-
Notifications
You must be signed in to change notification settings - Fork 78
YDK fails process RPC payload, which contain 'data' tag #851
Copy link
Copy link
Closed
Description
Expected Behavior
The YDK should correctly process all Yang models regardless of object naming.
Current Behavior
When RPC payload contains 'data' tag the YDK fails to process returned from Netconf payload and creates XML error.
Data is invalid according to the yang model. Error details: Missing closing element tag "data". Path: '/lacp-bundles/bundles/bundle/data'
Parsing failed with message Missing closing element tag "data".
The issue appears, because 'data' tag is used by RPC schema by itself.
Steps to Reproduce
Configure LACP bundle on IOS XR router. Then try to read oper data using script:
lacp_bundle = Cisco_IOS_XR_bundlemgr_oper.LacpBundles()
bundle = lacp_bundle.bundles.Bundle()
bundle.bundle_interface = "Bundle-Ether1"
member = bundle.members.Member()
member.member_interface = YFilter.read
member.bandwidth = YFilter.read
bundle.data.actor_bundle_data.mac_address = YFilter.read
bundle.data.actor_bundle_data.bundle_interface_name = YFilter.read
bundle.data.actor_bundle_data.available_bandwidth = YFilter.read
bundle.data.actor_bundle_data.effective_bandwidth = YFilter.read
bundle.data.actor_bundle_data.configured_bandwidth = YFilter.read
bundle.data.actor_bundle_data.minimum_active_links = YFilter.read
bundle.data.actor_bundle_data.active_member_count = YFilter.read
bundle.members.member.append(member)
lacp_bundle.bundles.bundle.append(bundle)
Note the 'data' is name of container in the Yang model.
Logs
Reply from IOS XR device is perfectly fine:
<?xml version="1.0"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="10">
<data>
<lacp-bundles xmlns="http://cisco.com/ns/yang/Cisco-IOS-XR-bundlemgr-oper">
<bundles>
<bundle>
<bundle-interface>Bundle-Ether1</bundle-interface>
<data>
<actor-bundle-data>
<bundle-interface-name>Bundle-Ether1</bundle-interface-name>
<available-bandwidth>0</available-bandwidth>
<effective-bandwidth>0</effective-bandwidth>
<configured-bandwidth>4294967295</configured-bandwidth>
<minimum-active-links>1</minimum-active-links>
<active-member-count>0</active-member-count>
</actor-bundle-data>
</data>
<members>
<member>
<member-interface>GigabitEthernet0/0/0/4</member-interface>
<bandwidth>1000000</bandwidth>
</member>
</members>
</bundle>
</bundles>
</lacp-bundles>
</data>
</rpc-reply>
But the YDK gives error:
Entity: line 15: parser error : Premature end of data in tag bundle line 4
</data>
^
Entity: line 15: parser error : Premature end of data in tag bundles line 3
</data>
^
Entity: line 15: parser error : Premature end of data in tag lacp-bundles line 2
</data>
^
Entity: line 15: parser error : Premature end of data in tag data line 1
</data>
^
Data is invalid according to the yang model. Error details: Missing closing element tag "data". Path: '/lacp-bundles/bundles/bundle/data'
Parsing failed with message Missing closing element tag "data".
System Information
YDK-0.7.3, xrv9k router running IOS XR 6.5.1.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels