Attaching YANG model converter implementation.
Change-Id: I676639806903449ba86cf1858f4b28cfbb3a6eb7
diff --git a/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java b/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
index 21fea28..a18a0af 100644
--- a/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
+++ b/apps/yang/src/main/java/org/onosproject/yang/YangRuntimeManager.java
@@ -40,6 +40,7 @@
import org.onosproject.yang.runtime.YangRuntimeService;
import org.onosproject.yang.runtime.YangSerializer;
import org.onosproject.yang.runtime.YangSerializerRegistry;
+import org.onosproject.yang.runtime.impl.DefaultModelConverter;
import org.onosproject.yang.runtime.impl.DefaultYangModelRegistry;
import org.onosproject.yang.runtime.impl.DefaultYangRuntimeHandler;
import org.onosproject.yang.runtime.impl.DefaultYangSerializerRegistry;
@@ -71,6 +72,7 @@
private DefaultYangModelRegistry modelRegistry;
private DefaultYangSerializerRegistry serializerRegistry;
private DefaultYangRuntimeHandler runtimeService;
+ private DefaultModelConverter modelConverter;
@Activate
public void activate() {
@@ -81,6 +83,7 @@
new DefaultYangRuntimeHandler(serializerRegistry, modelRegistry);
serializerRegistry.registerSerializer(new JsonSerializer());
serializerRegistry.registerSerializer(new XmlSerializer());
+ modelConverter = new DefaultModelConverter(modelRegistry);
log.info("Started");
}
@@ -132,14 +135,12 @@
@Override
public ModelObjectData createModel(ResourceData resourceData) {
- // TODO implementation.
- return null;
+ return modelConverter.createModel(resourceData);
}
@Override
public ResourceData createDataNode(ModelObjectData modelObjectData) {
- // TODO implementation.
- return null;
+ return modelConverter.createDataNode(modelObjectData);
}
@Override