I am trying to deviate a list to container in yang. I tried going through RFC#6020, and I couldn't figure-out how to deviate on the container level.
Asked
Active
Viewed 611 times
2 Answers
2
You can't change the type of a yang node.
However, you can use deviate not-supported
on the list and deviate add
on the parent node to create a new container with the same name as the list. The child elements of the list will be lost.
What you try to achieve is not a common use case and deviation modules are not designed to do what you request. A deviation should be used as a last resort to let netconf clients know that some part of the yang modules is not supported or only with restrictions.

quality-gate
- 98
- 7
0
You can't do it. But you can use deviate not-supported on the list and augment a new container to the parent node. 'deviate' statment only can modify the poperties of data node ,but it can not add a new data node.

frank
- 1