@Test public void testRemoveBridgeDomainOnNodes() throws Exception { Mockito.when(bdManager.removeBridgeDomainFromVppNode(Mockito.eq(BD_1), Mockito.eq(NODE_1))) .thenReturn(Futures.immediateFuture(null)); bdManager.removeBridgeDomainFromVppNode(BD_1, NODE_1); Mockito.verify(bdManager).removeBridgeDomainFromVppNode(Matchers.eq(BD_1), Matchers.eq(NODE_1)); }
void removeBridgeDomainOnNodes(final SetMultimap<String, NodeId> vppNodesByBridgeDomain) { for (String bd : vppNodesByBridgeDomain.keySet()) { Set<NodeId> vppNodes = vppNodesByBridgeDomain.get(bd); for (NodeId vppNode : vppNodes) { try { bdManager.removeBridgeDomainFromVppNode(bd, vppNode).get(WAIT_FOR_BD_PROCESSING, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { LOG.warn("Bridge domain {} was not removed from node {}", bd, vppNode.getValue(), e); } catch (TimeoutException e) { LOG.warn("Probably, bridge domain {} was not removed from node {} because BridgeDomainManager " + "did not respond by {} seconds. Check VBD log for more details", bd, vppNode.getValue(), WAIT_FOR_BD_PROCESSING, e); } } } }
ForwardingManager { void removeBridgeDomainOnNodes(final SetMultimap<String, NodeId> vppNodesByBridgeDomain) { for (String bd : vppNodesByBridgeDomain.keySet()) { Set<NodeId> vppNodes = vppNodesByBridgeDomain.get(bd); for (NodeId vppNode : vppNodes) { try { bdManager.removeBridgeDomainFromVppNode(bd, vppNode).get(WAIT_FOR_BD_PROCESSING, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { LOG.warn("Bridge domain {} was not removed from node {}", bd, vppNode.getValue(), e); } catch (TimeoutException e) { LOG.warn("Probably, bridge domain {} was not removed from node {} because BridgeDomainManager " + "did not respond by {} seconds. Check VBD log for more details", bd, vppNode.getValue(), WAIT_FOR_BD_PROCESSING, e); } } } } }
ForwardingManager { void removeBridgeDomainOnNodes(final SetMultimap<String, NodeId> vppNodesByBridgeDomain) { for (String bd : vppNodesByBridgeDomain.keySet()) { Set<NodeId> vppNodes = vppNodesByBridgeDomain.get(bd); for (NodeId vppNode : vppNodes) { try { bdManager.removeBridgeDomainFromVppNode(bd, vppNode).get(WAIT_FOR_BD_PROCESSING, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { LOG.warn("Bridge domain {} was not removed from node {}", bd, vppNode.getValue(), e); } catch (TimeoutException e) { LOG.warn("Probably, bridge domain {} was not removed from node {} because BridgeDomainManager " + "did not respond by {} seconds. Check VBD log for more details", bd, vppNode.getValue(), WAIT_FOR_BD_PROCESSING, e); } } } } ForwardingManager(@Nonnull InterfaceManager ifaceManager, @Nonnull AclManager aclManager,
                             @Nonnull NatManager natManager, @Nonnull RoutingManager routingManager,
                             @Nonnull BridgeDomainManager bdManager, @Nonnull LispStateManager lispStateManager,
                             @Nonnull LoopbackManager loopbackManager, @Nonnull FlatOverlayManager flatOverlayManager,
                             @Nonnull DhcpRelayHandler dhcpRelayHandler, @Nonnull DataBroker dataBroker); }
ForwardingManager { void removeBridgeDomainOnNodes(final SetMultimap<String, NodeId> vppNodesByBridgeDomain) { for (String bd : vppNodesByBridgeDomain.keySet()) { Set<NodeId> vppNodes = vppNodesByBridgeDomain.get(bd); for (NodeId vppNode : vppNodes) { try { bdManager.removeBridgeDomainFromVppNode(bd, vppNode).get(WAIT_FOR_BD_PROCESSING, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { LOG.warn("Bridge domain {} was not removed from node {}", bd, vppNode.getValue(), e); } catch (TimeoutException e) { LOG.warn("Probably, bridge domain {} was not removed from node {} because BridgeDomainManager " + "did not respond by {} seconds. Check VBD log for more details", bd, vppNode.getValue(), WAIT_FOR_BD_PROCESSING, e); } } } } ForwardingManager(@Nonnull InterfaceManager ifaceManager, @Nonnull AclManager aclManager,
                             @Nonnull NatManager natManager, @Nonnull RoutingManager routingManager,
                             @Nonnull BridgeDomainManager bdManager, @Nonnull LispStateManager lispStateManager,
                             @Nonnull LoopbackManager loopbackManager, @Nonnull FlatOverlayManager flatOverlayManager,
                             @Nonnull DhcpRelayHandler dhcpRelayHandler, @Nonnull DataBroker dataBroker); static Optional<IpPrefix> resolveIpPrefix(RendererNetworkDomain rendDomain); }
ForwardingManager { void removeBridgeDomainOnNodes(final SetMultimap<String, NodeId> vppNodesByBridgeDomain) { for (String bd : vppNodesByBridgeDomain.keySet()) { Set<NodeId> vppNodes = vppNodesByBridgeDomain.get(bd); for (NodeId vppNode : vppNodes) { try { bdManager.removeBridgeDomainFromVppNode(bd, vppNode).get(WAIT_FOR_BD_PROCESSING, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException e) { LOG.warn("Bridge domain {} was not removed from node {}", bd, vppNode.getValue(), e); } catch (TimeoutException e) { LOG.warn("Probably, bridge domain {} was not removed from node {} because BridgeDomainManager " + "did not respond by {} seconds. Check VBD log for more details", bd, vppNode.getValue(), WAIT_FOR_BD_PROCESSING, e); } } } } ForwardingManager(@Nonnull InterfaceManager ifaceManager, @Nonnull AclManager aclManager,
                             @Nonnull NatManager natManager, @Nonnull RoutingManager routingManager,
                             @Nonnull BridgeDomainManager bdManager, @Nonnull LispStateManager lispStateManager,
                             @Nonnull LoopbackManager loopbackManager, @Nonnull FlatOverlayManager flatOverlayManager,
                             @Nonnull DhcpRelayHandler dhcpRelayHandler, @Nonnull DataBroker dataBroker); static Optional<IpPrefix> resolveIpPrefix(RendererNetworkDomain rendDomain);  }