@Test public void testOspfProcessBuilder() { NetworkFactory nf = new NetworkFactory(); Configuration c = nf.configurationBuilder().setConfigurationFormat(CONFIG_FORMAT).build(); Vrf vrf = nf.vrfBuilder().setOwner(c).build(); OspfProcess.Builder ob = nf.ospfProcessBuilder().setRouterId(Ip.ZERO); OspfProcess o1 = ob.build(); OspfProcess o2 = ob.setVrf(vrf).build(); assertThat(o1, not(sameInstance(o2))); assertThat(vrf.getOspfProcesses().values().iterator().next(), sameInstance(o2)); }
public OspfProcess.Builder ospfProcessBuilder() { return OspfProcess.builder(() -> generateName(OspfProcess.class)).setReferenceBandwidth(1e8); }
NetworkFactory { public OspfProcess.Builder ospfProcessBuilder() { return OspfProcess.builder(() -> generateName(OspfProcess.class)).setReferenceBandwidth(1e8); } }
NetworkFactory { public OspfProcess.Builder ospfProcessBuilder() { return OspfProcess.builder(() -> generateName(OspfProcess.class)).setReferenceBandwidth(1e8); } NetworkFactory(); }
NetworkFactory { public OspfProcess.Builder ospfProcessBuilder() { return OspfProcess.builder(() -> generateName(OspfProcess.class)).setReferenceBandwidth(1e8); } NetworkFactory(); IpAccessList.Builder aclBuilder(); BgpActivePeerConfig.Builder bgpNeighborBuilder(); BgpPassivePeerConfig.Builder bgpDynamicNeighborBuilder(); BgpProcess.Builder bgpProcessBuilder(); Configuration.Builder configurationBuilder(); Interface.Builder interfaceBuilder(); OspfArea.Builder ospfAreaBuilder(); OspfProcess.Builder ospfProcessBuilder(); RipProcess.Builder ripProcessBuilder(); @VisibleForTesting RoutingPolicy.Builder routingPolicyBuilder(); Vrf.Builder vrfBuilder(); }
NetworkFactory { public OspfProcess.Builder ospfProcessBuilder() { return OspfProcess.builder(() -> generateName(OspfProcess.class)).setReferenceBandwidth(1e8); } NetworkFactory(); IpAccessList.Builder aclBuilder(); BgpActivePeerConfig.Builder bgpNeighborBuilder(); BgpPassivePeerConfig.Builder bgpDynamicNeighborBuilder(); BgpProcess.Builder bgpProcessBuilder(); Configuration.Builder configurationBuilder(); Interface.Builder interfaceBuilder(); OspfArea.Builder ospfAreaBuilder(); OspfProcess.Builder ospfProcessBuilder(); RipProcess.Builder ripProcessBuilder(); @VisibleForTesting RoutingPolicy.Builder routingPolicyBuilder(); Vrf.Builder vrfBuilder();  }