0

encountring a weird issue with confd. Items are indexed by uint key - when i use configuration with 9 items or lower, everything is ok - cdb_get with index 1 returns the first item, index two the seconds and so on.

When i add the 10th item - the 1st item I query i get the correct one ( 1 id ) but when i query for the second item i'll get the 10th item ( like they are sorted in a "stringy" manner, and not int although they are declared as uint in yang schema ).

Struggling with this for few days, does anyone have an idea how to correct the return order? Thanks

  • Welcome to Stack Overflow. Please see [this guide](https://stackoverflow.com/help/mcve) on creating a minimal, complete and verifiable example in your question. – Toby May 14 '17 at 13:45
  • Sounds like you need to sort the keys numerically, instead of sorting by string. Contents of a cdb are not sorted, so if you are accessing a small cdb, you might interate over all the keys and values, building your own data structure, and then sort your internal data structure as you like. http://discuss.tail-f.com/t/how-to-only-get-objects-configured-node/692 – gstrauss May 20 '17 at 03:12

0 Answers0