[ONOS-7064] Yang Runtime support for Anydata api exposed
Change-Id: I79be737d119de858306922ea277d7b5926682800
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/YangModelRegistry.java b/runtime/src/main/java/org/onosproject/yang/runtime/YangModelRegistry.java
index ea15b12..373597b 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/YangModelRegistry.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/YangModelRegistry.java
@@ -40,6 +40,32 @@
throws IllegalArgumentException;
/**
+ * Registers the given generated node class under provided anydata class.
+ *
+ * @param id identifier to reference anydata container under which
+ * application is expecting the data
+ * @param id1 identifier to reference the node defined in YANG file which
+ * application can send as content or child nodes under anydata
+ * @throws IllegalArgumentException when provided identifier is not
+ * not valid
+ */
+ void registerAnydataSchema(Class id, Class id1)
+ throws IllegalArgumentException;
+
+ /**
+ * Unregisters the given generated node class under provided anydata class.
+ *
+ * @param id identifier to reference anydata container under which
+ * application has registered the schema
+ * @param id1 identifier to reference the node defined in YANG file which
+ * application can send as content or child nodes under anydata
+ * @throws IllegalArgumentException when provided identifier is not
+ * not valid
+ */
+ void unregisterAnydataSchema(Class id, Class id1)
+ throws IllegalArgumentException;
+
+ /**
* Unregisters the specified model.
*
* @param param parameters having model to be registered with additional
diff --git a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYangModelRegistry.java b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYangModelRegistry.java
index ca75517..c20fc12 100644
--- a/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYangModelRegistry.java
+++ b/runtime/src/main/java/org/onosproject/yang/runtime/impl/DefaultYangModelRegistry.java
@@ -164,6 +164,18 @@
updateChildContext(curNodes);
}
+ @Override
+ public void registerAnydataSchema(Class id, Class id1) throws
+ IllegalArgumentException{
+ //TODO implemention
+ }
+
+ @Override
+ public void unregisterAnydataSchema(Class id, Class id1) throws
+ IllegalArgumentException {
+ //TODO implemention
+ }
+
/**
* Register specific model.
*