@Test public void testSetVRouterMacs() throws Exception { ImmutableSet.Builder<MacAddress> builder = ImmutableSet.builder(); builder.add(ROUTER_MAC_3); config.setVRouterMacs(builder.build()); Set<MacAddress> vRouterMacs = config.vRouterMacs(); assertThat(vRouterMacs.size(), is(1)); assertTrue(vRouterMacs.contains(ROUTER_MAC_3)); }
public SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs) { if (vRouterMacs == null) { object.remove(VROUTER_MACS); } else { ArrayNode arrayNode = mapper.createArrayNode(); vRouterMacs.forEach(mac -> { arrayNode.add(mac.toString()); }); object.set(VROUTER_MACS, arrayNode); } return this; }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs) { if (vRouterMacs == null) { object.remove(VROUTER_MACS); } else { ArrayNode arrayNode = mapper.createArrayNode(); vRouterMacs.forEach(mac -> { arrayNode.add(mac.toString()); }); object.set(VROUTER_MACS, arrayNode); } return this; } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs) { if (vRouterMacs == null) { object.remove(VROUTER_MACS); } else { ArrayNode arrayNode = mapper.createArrayNode(); vRouterMacs.forEach(mac -> { arrayNode.add(mac.toString()); }); object.set(VROUTER_MACS, arrayNode); } return this; }  }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs) { if (vRouterMacs == null) { object.remove(VROUTER_MACS); } else { ArrayNode arrayNode = mapper.createArrayNode(); vRouterMacs.forEach(mac -> { arrayNode.add(mac.toString()); }); object.set(VROUTER_MACS, arrayNode); } return this; }  @Override boolean isValid(); Set<MacAddress> vRouterMacs(); SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs); Optional<DeviceId> vRouterId(); SegmentRoutingAppConfig setVRouterId(DeviceId vRouterId); Set<ConnectPoint> suppressSubnet(); SegmentRoutingAppConfig setSuppressSubnet(Set<ConnectPoint> suppressSubnet); Set<ConnectPoint> suppressHostByPort(); SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints); Set<String> suppressHostByProvider(); SegmentRoutingAppConfig setSuppressHostByProvider(Set<String> providers); @Override String toString(); }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs) { if (vRouterMacs == null) { object.remove(VROUTER_MACS); } else { ArrayNode arrayNode = mapper.createArrayNode(); vRouterMacs.forEach(mac -> { arrayNode.add(mac.toString()); }); object.set(VROUTER_MACS, arrayNode); } return this; }  @Override boolean isValid(); Set<MacAddress> vRouterMacs(); SegmentRoutingAppConfig setVRouterMacs(Set<MacAddress> vRouterMacs); Optional<DeviceId> vRouterId(); SegmentRoutingAppConfig setVRouterId(DeviceId vRouterId); Set<ConnectPoint> suppressSubnet(); SegmentRoutingAppConfig setSuppressSubnet(Set<ConnectPoint> suppressSubnet); Set<ConnectPoint> suppressHostByPort(); SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints); Set<String> suppressHostByProvider(); SegmentRoutingAppConfig setSuppressHostByProvider(Set<String> providers); @Override String toString();  }