02-09-2022 04:48 PM - edited 02-09-2022 04:49 PM
Hello,
When executing the crud.read function on the Cisco-IOS-XR-npu-fsdb-stats-oper data model I get the following error:
"Value 0 already in leaf-list: timestamp_n"
Can someone please help me understand why we are getting this error?
The leaf-list timestamp_n contains multiple uint_64 digits and are initialized to 0:
leaf-list timestamp-n {
type uint64;
max-elements "15";
description "timestamp n";
}
<link-fsm>
<num-entry>10</num-entry>
<timestamp-n>1644432928901502226</timestamp-n>
<timestamp-n>1644432928901676545</timestamp-n>
<timestamp-n>1644432928938049158</timestamp-n>
<timestamp-n>1644432930737218401</timestamp-n>
<timestamp-n>1644432930737239785</timestamp-n>
<timestamp-n>1644432930737252563</timestamp-n>
<timestamp-n>1644432930737290379</timestamp-n>
<timestamp-n>1644432930737305811</timestamp-n>
<timestamp-n>1644432930737319486</timestamp-n>
<timestamp-n>1644432930773866519</timestamp-n>
<timestamp-n>0</timestamp-n>
<timestamp-n>0</timestamp-n>
<timestamp-n>0</timestamp-n>
<timestamp-n>0</timestamp-n>
<timestamp-n>0</timestamp-n>
</link-fsm>
Thanks,
Anthony
02-09-2022 05:10 PM
Based on RFC-6020 (YANG 1.0) the repetition of values in the leaf-list is not allowed, hence the error while populating leaf-list object in the YDK code. Looking to the model Cisco-IOS-XR-npu-fsdb-stats-oper.yang I can see that it is indeed YANG 1.0 module and therefore the RPC output is incorrect.
The RFC-7950 (YANG 1.1) allows having value repetition in the leaf-list for only operational data. Unfortunately publicly available YDK version (0.8.6) does not support the YANG 1.1 models and features.
Yan Gorelik
Cisco Systems
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