Closed robshakir closed 9 years ago
We use a similar construct in the RIB model, where there may be a multitude of routes in the table with the same prefix/next-hop/etc. so creating a keyless list is useful since it's read-only.
would it make sense in this case to create a map with a system-generated key (e.g., uuid) that is just never accessed by the user?
btw, do you use an ordered collection for ordered-by: user lists?
ordered-by is not yet supported, but I was planning to use a collections.OrderedDict
- under the YANGList class (right now self._members there is a dict()
).
There are a couple of options here - I would prefer to use a dict
since otherwise YANGList needs to handle the fact that self._members might have multiple types.
Resolved in 4fa7f47f2ac44c0bf9122517ffc1e82c36065867.
Note: Two changes to resolve under this ticket:
According to RFC6020, a list that is config: false may not have a key statement - this is currently not supported in pyangbind.
Example module - yang/vendor/cisco/xr/530/Cisco-IOS-XR-cdp-oper.yang