07-01-2021 02:51 AM
Hi,
I have been experimenting the NSO RESTCONF API through Postman with some real devices connected and configured to it. However, I have noticed that some responses come incomplete and do not close the XML/JSON response tags.
For example, when I do a GET request to my ISR4451 device:
http://localhost:8080/restconf/data/tailf-ncs:devices/device=ISR4451?content=nonconfig
It only returns:
<device xmlns="http://tail-f.com/ns/ncs" xmlns:ncs="http://tail-f.com/ns/ncs"> <name>ISR4451</name> <commit-queue> <queue-length>0</queue-length> </commit-queue> <active-settings> <connect-timeout>20</connect-timeout> <read-timeout>20</read-timeout> <write-timeout>20</write-timeout> <ssh-keep-alive> <interval>20</interval> <count>3</count> </ssh-keep-alive> <ned-keep-alive> <count>3</count> </ned-keep-alive> <connect-retries> <attempts>0</attempts> <timeout>3</timeout> </connect-retries> <trace>false</trace> <trace-output>file</trace-output> <ned-settings> <use-junos-rollback>false</use-junos-rollback> </ned-settings> <commit-queue> <enabled-by-default>false</enabled-by-default> </commit-queue> <session-limits> <max-sessions>unlimited</max-sessions> </session-limits> <session-pool> <idle-time>30</idle-time> </session-pool> <no-overwrite> <enabled-by-default>false</enabled-by-default> </no-overwrite> <lsa> <no-overwrite> <enabled-by-default>false</enabled-by-default> </no-overwrite> </lsa> <out-of-sync-commit-behaviour>reject</out-of-sync-commit-behaviour> </active-settings> <state> <oper-state>unknown</oper-state> <transaction-mode>running-only</transaction-mode> <last-transaction-id>1827-381726-6237</last-transaction-id> <last-modules-state> <module xmlns="http://tail-f.com/ns/ncs/devices-yang-library">
It seems there is a lot of information missing. It just stops at the <module> tag and does not send the rest of it.
Am I missing something? Is this a bug?
Thank you.
07-30-2021 02:54 AM
Hello,
The truncated output indeed does not look right.
could you please indicate which NSO version you are using?
Is it happening both for XML and JSON for the same command?
Do you see any log when this occur?
I am aware of some recent corrections for instance in NSO 5.5 CHANGES file:
167 - restconf: In certain circumstances it was possible that elements were 168 dropped for the XML output format. Now elements are not dropped and are 169 emitted as expected. 170 171 (ENG-21816, RT:38276, PS-33345, SR:687136729)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide