Uni Add cmd CLI implmentation
[unimgr.git] / impl / src / main / java / org / opendaylight / unimgr / impl / UnimgrMapper.java
index 74a744c90d177143bf854795c3146b435a4af0d4..ff2293bb61c53e18d21c50e2c41469bfca296506 100755 (executable)
@@ -282,4 +282,19 @@ public class UnimgrMapper {
         return nodePath;
     }
 
+    /**
+     * Generates an Instance Identifier for a specific UNI node by
+     * using the node Id
+     * @param nodeId The node ID of a specific UNI node.
+     * @return An Instance Identifier for a specific UNI node.
+     */
+    public static InstanceIdentifier<Node> getUniNodeIid(NodeId nodeId) {
+    InstanceIdentifier<Node> nodePath = InstanceIdentifier
+                                            .create(NetworkTopology.class)
+                                            .child(Topology.class,
+                                                    new TopologyKey(UnimgrConstants.UNI_TOPOLOGY_ID))
+                                            .child(Node.class,
+                                                    new NodeKey(nodeId));
+    return nodePath;
+}
 }