Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

0

How to order list elements on ODL RestConf API Documentation

asked 2015-08-24 19:32:55 -0700

kevin5476 gravatar image

updated 2015-08-27 18:54:51 -0700

I check RFC6020 and defined "ordered-by user;" in yang file.

example:

  list node {
    ordered-by user;

    key "A";
    unique "A B";

    leaf A {
      type uint32;
    }
    leaf B {
      type string;
    }
    leaf C {
      type string;
    }

But when I get operational data on "http://localhost:8181/apidoc/explorer/index.html"

The output order of list in Response Body maybe is B, A, C

How could I arrange the order as I want ? (A, B, C)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-09-10 03:59:02 -0700

Tony Tkacik gravatar image

Ordered-by user, means items in list node are ordered by user, not the leafs A,B,C regarding leafs - ordering is currently decided by system, and there is no such way for user to specify ordering.

MD-SAL, Netconf and Restconf was designed in such way, that we do not support custom ordering where not maintained by YANG specification to allow us for memory / performance optimization in ODL. (Preserving user-order for leafs will hugely increase memory consumption in ODL.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
2 followers

Stats

Asked: 2015-08-24 19:32:55 -0700

Seen: 637 times

Last updated: Sep 10 '15