1

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.

nullptr
  • 133
  • 1
  • 1
  • 8

2 Answers2

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.

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