- Team
- Overview
- YANG Runtime Architecture
- Serializer Registry
- ModelConverter Service
- Runtime Service
- Model Registry
- Helper Utils
- Runtime Helper
- Serializer Helper
- Use Cases of YANG Runtime
- Configuration of devices
- Configuration of service
Team
Name | Organization | |
---|---|---|
Patrick Liu | Huawei Technologies | Partick.Liu@huawei.com |
Thomas Vachuska | OnLab | tom@onlab.us |
Gaurav Agrawal | Huawei Technologies | |
Bharat Saraswal | Huawei Technologies | bharat.saraswal@huawei.com |
Sonu Gupta | Huawei Technologies | sonu.gupta@huawei.com |
Janani B | Huawei Technologies | janani.b@huawei.com |
Vidyashree Rama | Huawei Technologies | vidyashree.rama@huawei.com |
Vinod Kumar S | Huawei Technologies | vinods.kumar@huawei.com |
Adarsh M | Huawei Technologies | adarsh.m@huawei.com |
KalyankumarAsangi | Huawei Technologies | kalyana@huawei.com |
Overview
ONOS dynamic configuration subsystem is developed with a purpose to allow service providers to access the configuration capabilities of various devices as prescribed by their YANG models and similarly to allow the service providers to define YANG models for their own network services. The system should be composed in a modular fashion and using isolated and reusable components to assure proper separation of concerns among them. YANG runtime is one of its component.YANG 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 must remain independent from any transport protocols (e.g. RESTCONF,NETCONF) and any storage or messaging mechanisms. Implementations of outward-facing protocols should 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 should be deployable in a standalone JVM, OSGi, or ONOS environment. Schema agnostic application will act upon the ModelObject based on YANG compiler's generated code. YANG runtime enables the model conversion between the DataNode and POJO.
Moreover YANG runtime is also a schema context provider which can be used by other applications/dynamic config subsystem components to obtain a specific schema context.
YANG Runtime Architecture
1)Serializer Registry
This service is used for registering and unregistering the available data format serializers. YANG App activation registers the default XML/JSON serializers. User can override the registration or can register new data formats. In case of multiple registrations of same data format, last one will take into effect.
Snippet code showing default registration of serializers:
DefaultYangSerializerRegistry serializerRegistry = new DefaultYangSerializerRegistry();
serializerRegistry.registerSerializer(new JsonSerializer());
serializerRegistry.registerSerializer(new XmlSerializer());
The interface provides 2 capabilities:
To register a new serializer or overwrite if the serializer for a particular data format already exists.
=> void registerSerializer(YANGSerializer serializer)
To unregister the specified serializer
=>void unregisterSerializer(YANGSerializer serializer)