...
Name | Organization | Email |
---|---|---|
Adarsh M | Huawei Technologies | adarsh.m@huawei.com |
Bharat Saraswal | Huawei Technologies | bharat.saraswal@huawei.com |
Brian O'Connor | OnLab | bocon@onlab.us |
Gaurav Agrawal | Huawei Technologies | gaurav.agrawal@huawei.com |
Janani B | Huawei Technologies | janani.b@huawei.com |
Patrick Liu | Huawei Technologies | Partick.Liu@huawei.com |
Ray Milkey | OnLab | ray@onlab.us |
Sathish Kumar M | Huawei Technologies | sathishkumar.m@huawei.com |
Shankara | Huawei Technologies | |
Sonu Gupta | Huawei Technologies | sonu.gupta@huawei.com |
Suchitra H N | Huawei Technologies | suchitra.hn@huawei.com |
Thomas Vachuska | OnLab | tom@onlab.us |
Vidyashree Rama | Huawei Technologies | vidyashree.rama@huawei.com |
Vinod Kumar S | Huawei Technologies | vinods.kumar@huawei.com |
YANG Tools Overview
YANG
...
Tools
...
is
...
a
...
infrastructure
...
project
...
aiming
...
to
...
develop
...
necessary
...
tool
...
chain
...
and
...
libraries
...
providing
...
support
...
of
...
NETCONF
...
and
...
YANG
...
for
...
Java(JVM-language
...
based)
...
projects
...
and
...
applications.
In
...
ONOS,
...
YANG
...
is
...
being
...
used
...
as
...
a
...
general
...
purpose
...
modeling
...
language.
There
...
are
...
four
...
entities
...
which
...
drive
...
this:
Model
YangCompiler
YangSerializer
YangRunTime
Model
Base Models will be used by different YANG components. It includes following:
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.
...
- 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.
...
Links the various Intra File/Inter-File/ Inter-JAR YANG constructs dependencies. For ex: grouping and uses linking, typedef and type linking. Import, imclude depencency.
Translator
Generates
...
java
...
code
...
corresponding
...
to
...
Data
...
model.
For
...
more
...
information
...
please
...
refer
...
https://wiki.onosproject.org/display/ONOS/YANG+utils
In a nutshell, the process takes a set of YANG files and compiles them into a set of Java classes along with the compiled schema metadata and
...
The following depicts the compilation process:
For
...
more
...
information
...
please
...
refer
...
https://wiki.onosproject.org/display/ONOS/YANG+Compiler
YANG Live Compiler
Allows
...
on-the-fly
...
compilation
...
&
...
registration
...
of
...
YANG
...
models.
YANG Serializers
Serializers
...
is
...
an
...
entity
...
capable
...
of
...
encoding
...
and
...
decoding
...
arbitrary
...
structures(Data
...
Node),
...
which
...
are
...
in-memory
...
representations
...
of
...
YANG
...
models,
...
to
...
and
...
from
...
various
...
external
...
representations,
...
e.g.
...
XML,
...
JSON.
It
...
decodes
...
the
...
external
...
representation
...
of
...
a
...
configuration
...
model
...
from
...
the
...
specified
...
composite
...
stream
...
into
...
an
...
in-memory
...
representation.
...
Resource
...
identifier
...
stream
...
"URI"
...
will
...
get
...
decoded
...
to
...
resource
...
identifier
...
and
...
resource
...
data
...
stream
...
will
...
get
...
decoded
...
to
...
data
...
node.
It
...
encodes
...
the
...
internal
...
in-memory
...
representation
...
of
...
a
...
configuration
...
model
...
to
...
an
...
external
...
representation
...
consumable
...
from
...
the
...
resulting
...
input
...
stream.
...
Resource
...
identifier
...
in
...
composite
...
data
...
will
...
get
...
encoded
...
to
...
resource
...
identifier
...
stream
...
and
...
data
...
node
...
will
...
be
...
encoded
...
to
...
resource
...
data
...
stream.
Facilities to convert Input stream to DataNode and vice versa.
...
https://wiki.onosproject.org/display/ONOS/L3VPN
Future
To
...
be
...
planned:
1)
...
YANG
...
1.1
...
version.
2)
...
OpenConfig
...
YANG
...
integration
...
to
...
ONOS.
3)
...
YANG
...
Library
...
based
...
on
...
RFC
...
7895.
4)
...
YANG
...
GUI
...
enhancement
...
for
...
live
...
compilation.