By taking advantage of the MD-SAL, I would like to write a Java procedure able to add nodes and links to a specific topology identifier (instance). I do NOT mean to do that by the RestConf interface. In other words, once created a topology by:
TopologyKey topology = new TopologyKey(new TopologyId("mytopo:1")); topologyPath = InstanceIdentifier.builder(NetworkTopology.class).child(Topology.class, topology).build(); TopologyBuilder tb = new TopologyBuilder(); tb.setKey(topology); Topology top = tb.build(); DataModificationTransaction tx = dataService.beginTransaction(); tx.putOperationalData(topologyPath, top);
I would further create nodes and associated them to that topology. How to associate the nodes and links to a specific topology instance ?