.child(Protocol.class, new ProtocolKey(BGP.class, RIB_ID))
.augmentation(NetworkInstanceProtocol.class).child(Bgp.class);
wt.put(LogicalDatastoreType.OPERATIONAL, bgpIID, bgp, true);
- wt.submit().get();
+ wt.commit().get();
}
@Test
private void createRib(final Global global) throws ExecutionException, InterruptedException {
final WriteTransaction wr = getDataBroker().newWriteOnlyTransaction();
wr.put(LogicalDatastoreType.CONFIGURATION, GLOBAL_II, global, true);
- wr.submit().get();
+ wr.commit().get();
}
private void deleteRib() throws ExecutionException, InterruptedException {
final WriteTransaction wr = getDataBroker().newWriteOnlyTransaction();
wr.delete(LogicalDatastoreType.CONFIGURATION, BGP_II);
- wr.submit().get();
+ wr.commit().get();
}
private void createNeighbor(final Neighbors neighbors) throws ExecutionException, InterruptedException {
final WriteTransaction wr = getDataBroker().newWriteOnlyTransaction();
wr.put(LogicalDatastoreType.CONFIGURATION, NEIGHBORS_II, neighbors, true);
- wr.submit().get();
+ wr.commit().get();
}
private void deleteNeighbors() throws ExecutionException, InterruptedException {
final WriteTransaction wr = getDataBroker().newWriteOnlyTransaction();
wr.delete(LogicalDatastoreType.CONFIGURATION, NEIGHBORS_II);
- wr.submit().get();
+ wr.commit().get();
}
}
\ No newline at end of file
.forEach(bi -> processBmpMonitorConfig((BmpMonitorConfig) bi.getValue(), wtx));
try {
- wtx.submit().get();
+ wtx.commit().get();
} catch (final ExecutionException | InterruptedException e) {
LOG.warn("Failed to create Bmp config", e);
}
}
}
try {
- wtx.submit().get();
+ wtx.commit().get();
} catch (final ExecutionException | InterruptedException e) {
LOG.warn("Failed to create Protocol", e);
}
WriteTransaction.CREATE_MISSING_PARENTS);
try {
- wtx.submit().get();
+ wtx.commit().get();
} catch (final ExecutionException | InterruptedException e) {
LOG.warn("Failed to create Routing Policy config", e);
}
}
}
try {
- wtx.submit().get();
+ wtx.commit().get();
} catch (final ExecutionException | InterruptedException e) {
LOG.warn("Failed to create Network Topologies", e);
}
.child(Topology.class, new TopologyKey(new TopologyId(PCEP_TOPOLOGY)))
.child(Node.class, new NodeKey(new NodeId(NODE_ID))).build();
wt.put(LogicalDatastoreType.OPERATIONAL, topology, node, true);
- wt.submit().get();
+ wt.commit().get();
}
private PcepSessionState createPcepSessionState() {
new TopologyPcepBuilder().build()).build()).build())
.setNode(new ArrayList<>()).build(), true);
try {
- tx.submit().get();
+ tx.commit().get();
LOG.info("PCEP Topology {} created successfully.", topologyId.getValue());
ServerSessionManager.this.isClosed.set(false);
} catch (final ExecutionException | InterruptedException throwable) {
for (final KeyedInstanceIdentifier<Node, NodeKey> statId : this.statsMap.keySet()) {
wTx.delete(LogicalDatastoreType.OPERATIONAL, statId);
}
- wTx.submit().get();
+ wTx.commit().get();
this.statsMap.clear();
this.transactionChain.close();
this.scheduler.shutdown();
new TopologyTunnelPcepBuilder().build()).build()).build())
.setNode(new ArrayList<>()).build(), true);
try {
- tx.submit().get();
+ tx.commit().get();
} catch (final InterruptedException | ExecutionException e) {
LOG.error("Failed to create Tunnel Topology root", e);
}
}
@Test(expected = VerifyException.class)
- public void testWaitFutureSuccessFail() throws Exception {
+ public void testWaitFutureSuccessFail() {
when(this.future.isDone()).thenReturn(false);
doReturn(this.future).when(this.future).addListener(any());
waitFutureSuccess(this.future);
}
@Test
- public void testWaitFutureSuccess() throws Exception {
+ public void testWaitFutureSuccess() {
when(this.future.isSuccess()).thenReturn(true);
doAnswer(invocation -> {
invocation.getArgumentAt(0, GenericFutureListener.class).operationComplete(CheckUtilTest.this.future);
new TopologyBuilder()
.setTopologyId(TOPOLOGY_ID)
.build(), true);
- wt.submit().get();
+ wt.commit().get();
}
@Test
}
@Test(expected = AssertionError.class)
- public void testCheckReceivedMessagesNotEqual() throws Exception {
+ public void testCheckReceivedMessagesNotEqual() {
doReturn(0).when(this.listenerCheck).getListMessageSize();
checkReceivedMessages(this.listenerCheck, 1, TIMEOUT);
}
@Test
- public void testCheckReceivedMessagesEqual() throws Exception {
+ public void testCheckReceivedMessagesEqual() {
doReturn(1).when(this.listenerCheck).getListMessageSize();
checkReceivedMessages(this.listenerCheck, 1, TIMEOUT);
}