Allows to find child of Operation definition (RPC, Action) 48/74848/1
authorJakub Tóth <jakub.toth@pantheon.tech>
Mon, 6 Aug 2018 11:43:58 +0000 (13:43 +0200)
committerJakub Tóth <jakub.toth@pantheon.tech>
Mon, 6 Aug 2018 11:44:06 +0000 (13:44 +0200)
Change-Id: Ie1048ed6d294a507cc90c65ded7dbfb6d8c6018f
Signed-off-by: Jakub Tóth <jakub.toth@pantheon.tech>
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/SchemaUtils.java

index 7f203557e21c097eaf2d453e45d9540dda7694b8..6bd8c4e70774a9687fadcae30fcf6968eb3e9c11 100644 (file)
@@ -38,7 +38,7 @@ import org.opendaylight.yangtools.yang.model.api.ChoiceSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.DataNodeContainer;
 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.NotificationNodeContainer;
-import org.opendaylight.yangtools.yang.model.api.RpcDefinition;
+import org.opendaylight.yangtools.yang.model.api.OperationDefinition;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
@@ -463,12 +463,12 @@ public final class SchemaUtils {
         if (node instanceof ChoiceSchemaNode) {
             return ((ChoiceSchemaNode) node).getCaseNodeByName(qname);
         }
-        if (node instanceof RpcDefinition) {
+        if (node instanceof OperationDefinition) {
             switch (qname.getLocalName()) {
                 case "input":
-                    return ((RpcDefinition) node).getInput();
+                    return ((OperationDefinition) node).getInput();
                 case "output":
-                    return ((RpcDefinition) node).getOutput();
+                    return ((OperationDefinition) node).getOutput();
                 default:
                     return null;
             }