Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

DataNode: Provides a basis for holding information in a tree whose structure corresponds to a set of YANG models (base & augmentations).

  • Is immutable.
  • Provides a mechanism for mutation (Builder pattern, etc.)
  • Understands the schema that was used to construct it.
  • Store will be based on DataNode.

Data node is categorized in two sub-type:

  •  Inner Inner node represents container and list.
  • Leaf node represents leaf and leaf-list.

...

ResourceId: Resource identifier, Its list of node key to drive path till the resource, where key is contains the local node name and the corresponding module namespace. 
  • Is immutable.
  •  Provides a mechanism for mutation (Builder pattern, etc.)
  • Used to operate on a given resource.

ModelObject: Provides a common basis for all POJOs which are generated from a YANG model.

  • It is mutable.
  • The binding between ModelObject POJO and DataNode is performed by the YANG Runtime.

YANG Compiler

             

...

There is Maven and Buck plugins made available as minimalistic separate entities that will serve the purpose of shuttling information from the build frameworks to the YANG compiler. These plugins are useful for producing Java source code that can be used to compile applications against various YANG models. 

Various

...

components

...

of

...

YANG

...

compiler

...

which

...

helps

...

yang

...

compiler

...

to

...

compiles

...

YANG

...

files

...

and

...

generates

...

the

...

required

...

code

...

with

...

serialized

...

metadata.

Parser :

Parse the input YANG file and produces DataModel. It compiles Yang files against the YANG grammar version 1.0 using ANTLR tool and updates the data model tree.

...

2) XML Serializer: Convert to/from XML to DataNode

 

YANG Runtime

The runtime serves as a registry of various YANG models in the system and its primary purpose is serialization and deserialization from various external formats (XML, JSON, Kryo) and their internal Java representations (based on DataNode base-class). Users (and applications) should be able to register new models and new serializers at runtime.

The YANG runtime is independent from any transport protocols (e.g. RESTCONF, NETCONF) and any storage or messaging mechanisms. Implementations of outward-facing protocols depend on the YANG runtime to serialize and deserialize their payloads, and the Dynamic Config subsystem will depend on the YANG runtime to serialize these objects for distribution and persistence. However, none of these outward facing or storage concerns should permeate into the YANG runtime; it is deployable in a standalone JVM, OSGi, or ONOS environment.

For

...

more

...

information

...

please

...

refer

...

https://wiki.onosproject.org/display/ONOS/YANG+Runtime

Reference of Applications

...

https://wiki.onosproject.org/display/ONOS/L3VPN

...

Future

To be planned:
YANG 1.1

...