Child pages
  • #40: Top level lists in the YANG module
Skip to end of metadata
Go to start of metadata
StatusEXECUTED
Stakeholders
Outcome
Due date
OwnerMartin Skorupski 

Decision

The proposed change to the YANG cannot be implemented without losing backward compatibility.

It will not be part of TR-532 v1.1

Issue#40 remains open.

Background

The NETCONF and RESTCONF protocol have a problem with fetching top-level lists inside a YANG module. Because the result is encoded in XML, a root element for the XML is needed in the response. If one tries to fetch a top-level list inside a YANG module, this root element does not exist, thus the response cannot be constructed.

This is the reason why the best practice when creating a YANG model is not having top-level lists inside a module, but wrap them around a container.

Because of the reasons mentioned above, the microwave-model has usability problems in practice. To solve this, all the top-level lists inside the microwave-model should be wrapped around a container. This can be done in the YANG generation step (to be solved in the UML2YANG tool).

E.g.: mw-air-interface-pac is a top-level list. In the current case, the XML response when fetching this list would be like this:

<mw-air-interface-pac>

<layer-protocol>someValueHere1</layerProtocol>

...

</mw-air-interface-pac>

<mw-air-interface-pac>

<layer-protocol>someValueHere2</layerProtocol>

...

</mw-air-interface-pac>

 

This is not usable in practice. A more appropriate response would look like this, after wrapping the mw-air-interface-pac around a container:

<mw-air-interface-pacs>

<mw-air-interface-pac>

<layer-protocol>someValueHere1</layerProtocol>

...

</mw-air-interface-pac>

<mw-air-interface-pac>

<layer-protocol>someValueHere2</layerProtocol>

...

</mw-air-interface-pac>

</mw-air-interface-pacs>