-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
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
'ietf-netconf-monitoring:get-schema' returns schema with escape sequences #614
Comments
To reproduce: from ydk.path import NetconfSession
from ydk.path import Codec
from ydk.types import EncodingFormat
# Create a NetconfSession instance to connect to the device
netconf_session = NetconfSession(address='10.0.0.1' , username='admin', password='admin')
c = Codec()
# Get the root schema node
root = netconf_session.get_root_schema()
# Create the 'ietf-netconf-monitoring:get-schema' RPC object
get_schema = root.create_rpc('ietf-netconf-monitoring:get-schema')
# Set the 'identifier' to 'Cisco-IOS-XR-aaa-lib-cfg'
get_schema.get_input_node().create_datanode('identifier','openconfig-bgp')
# Invoke the RPC
output_data = get_schema(netconf_session)
# Encode the RPC reply to XML
output_xml = c.encode(output_data, EncodingFormat.XML, True)
# Print the XML
print(output_xml) |
Added code to convert XML special character sequences to regular ones and encapsulate the data to CDATA tag. Added C++ test case. |
Seeing the same escape characters when using a different client like |
Added replacement of Above test would produce the following:
|
'ietf-netconf-monitoring:get-schema' returns schema data with "predefined entities" representing special characters: < (<), & (&), > (>), " ("), and ' ('). The actual characters should be used in the schema Instead of the "predefined entities".
For instance, instead of returning:
The following data should be returned:
The text was updated successfully, but these errors were encountered: