cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
360
Views
5
Helpful
1
Replies

"Value 0 already in leaf-list: " error seen when reading data model

anthonyperry
Cisco Employee
Cisco Employee

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?

 

http://allure.cisco.com/auto/tftpboot-projects/anthonyp/Cafy/cafyap/work/archive/fabric_test_ydk_20220121-153545_p19436/reports/index.html#suites/622429c363feac72d87ab7e1631e5396/dc9ebd0435a8c750/

 

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

1 Reply 1

ygorelik
Cisco Employee
Cisco Employee

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