nullptr
nullptr

Reputation: 133

How to deviate a list to container in YANG?

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.

Upvotes: 1

Views: 896

Answers (2)

frank
frank

Reputation: 1

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.

Upvotes: 0

quality-gate
quality-gate

Reputation: 98

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.

Upvotes: 2

Related Questions