We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Based on reporting from YDK user George Yanev [email protected].
XmlSubtreeCodec fails decode payload with augmented component and returns exception:
YServiceProviderError: Wrong payload!
TEST_CASE("test_augment_leaf") { ydk::path::Repository repo{TEST_HOME}; ydk::path::NetconfSession session{repo, "127.0.0.1", "admin", "admin", 12022}; auto i = make_shared<ydktest_sanity::Runner::Passive::Interfac>(); i->test = "abc"; auto passive = make_shared<ydktest_sanity::Runner::Passive>(); passive->name = "xyz"; passive->interfac.append(i); auto r_1 = make_shared<ydktest_sanity::Runner>(); r_1->passive.append(passive); passive->testc->xyz = make_shared<ydktest_sanity::Runner::Passive::Testc::Xyz>(); passive->testc->xyz->parent = passive.get(); passive->testc->xyz->xyz = 25; CodecServiceProvider codec_provider{EncodingFormat::XML}; CodecService codec_service{}; auto xmlC = codec_service.encode(codec_provider, *r_1, true); XmlSubtreeCodec xml_codec{}; auto xmlX = xml_codec.encode(*r_1, session.get_root_schema()); cout << "XmlSubtreeCodec:\n" << xmlX << endl << endl; REQUIRE(xmlC.erase(xmlC.find_last_not_of("\n")+1) == xmlX); auto runner = xml_codec.decode(xmlC, make_shared<ydktest_sanity::Runner>()); }
XmlSubtreeCodec: <runner xmlns="http://cisco.com/ns/yang/ydktest-sanity"> <passive> <name>xyz</name> <interfac> <test>abc</test> </interfac> <testc xmlns="http://cisco.com/ns/yang/ydktest-sanity-augm"> <xyz> <xyz>25</xyz> </xyz> </testc> </passive> </runner> [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'passive' in 'runner' [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'name' in 'passive' [2019-09-19 14:59:36.726] [ydk] [debug] XML: Creating leaf 'name' with value 'xyz' [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'interfac' in 'passive' [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'test' in 'interfac' [2019-09-19 14:59:36.726] [ydk] [debug] XML: Creating leaf 'test' with value 'abc' [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'testc' in 'passive' [2019-09-19 14:59:36.726] [ydk] [debug] Looking for child 'xyz' in 'passive' [2019-09-19 14:59:36.726] [ydk] [error] Wrong payload! <xyz> not found [2019-09-19 14:59:36.727] [ydk] [info] Disconnected from device [2019-09-19 14:59:36.728] [ydk] [debug] Trace: Writing message (session 34): <?xml version="1.0" encoding="UTF-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"> <close-session/> </rpc> [2019-09-19 14:59:36.730] [ydk] [debug] Trace: Received message (session 34): <?xml version="1.0" encoding="UTF-8"?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="2"><ok/></rpc-reply> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ydk_bundle_test is a Catch v1.7.1 host application. Run with -? for options ------------------------------------------------------------------------------- test_augment_leaf ------------------------------------------------------------------------------- /home/yan/ydk-workspace/ydk-gen/sdk/cpp/tests/test_xml_subtree.cpp:337 ............................................................................... /home/yan/ydk-workspace/ydk-gen/sdk/cpp/tests/test_xml_subtree.cpp:337: FAILED: {Unknown expression after the reported line} due to unexpected exception with message: YServiceProviderError: Wrong payload! <xyz> not found =============================================================================== test cases: 1 | 1 failed assertions: 2 | 1 passed | 1 failed
The text was updated successfully, but these errors were encountered:
Similar issue observed in JsonSubtreeCodec.
Sorry, something went wrong.
Resolved issue CiscoDevNet#956
2b4221e
ygorelik
No branches or pull requests
Based on reporting from YDK user George Yanev [email protected].
Current Behavior
XmlSubtreeCodec fails decode payload with augmented component and returns exception:
YServiceProviderError: Wrong payload!
Test Case
Logs
System Information
The text was updated successfully, but these errors were encountered: