use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopologyBuilder in project bgpcep by opendaylight.
the class AbstractTopologyBuilderTest method createEmptyTopology.
private void createEmptyTopology() {
final WriteTransaction wTx = getDataBroker().newWriteOnlyTransaction();
wTx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(NetworkTopology.class).build(), new NetworkTopologyBuilder().setTopology(Map.of()).build());
wTx.commit();
}
use of org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NetworkTopologyBuilder in project bgpcep by opendaylight.
the class TopologyStatsRpcServiceImplTest method setUp.
@Before
public void setUp() throws Exception {
rpcService = new TopologyStatsRpcServiceImpl(getDataBroker());
rpcService.init();
// PCEP topology with one PCC node
final Topology t1 = createTopology(TOPOLOGY_ID1, BindingMap.of(createPcepNode(NODE_ID1)));
// PCEP topology with two PCC node
final Topology t2 = createTopology(TOPOLOGY_ID2, BindingMap.of(createPcepNode(NODE_ID2), createPcepNode(NODE_ID3)));
// Non-PCEP topology with one non-PCC node
final Topology t3 = createTopology(NONPCEP_TOPOLOGY, BindingMap.of(new NodeBuilder().setNodeId(new NodeId(NONPCEP_NODE)).build()));
final WriteTransaction wtx = getDataBroker().newWriteOnlyTransaction();
final NetworkTopologyBuilder ntb = new NetworkTopologyBuilder();
ntb.setTopology(BindingMap.of(t1, t2, t3));
wtx.put(LogicalDatastoreType.OPERATIONAL, InstanceIdentifier.builder(NetworkTopology.class).build(), ntb.build());
wtx.commit().get();
}
Aggregations