@Test public void testSetSuppressHostByPort() throws Exception { ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); builder.add(PORT_3); config.setSuppressHostByPort(builder.build()); Set<ConnectPoint> suppressHostByPort = config.suppressHostByPort(); assertNotNull("suppressHostByPort should not be null", suppressHostByPort); assertThat(suppressHostByPort.size(), is(1)); assertTrue(suppressHostByPort.contains(PORT_3)); }
public SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints) { if (connectPoints == null) { object.remove(SUPPRESS_HOST_BY_PORT); } else { ArrayNode arrayNode = mapper.createArrayNode(); connectPoints.forEach(connectPoint -> { arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); }); object.set(SUPPRESS_HOST_BY_PORT, arrayNode); } return this; }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints) { if (connectPoints == null) { object.remove(SUPPRESS_HOST_BY_PORT); } else { ArrayNode arrayNode = mapper.createArrayNode(); connectPoints.forEach(connectPoint -> { arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); }); object.set(SUPPRESS_HOST_BY_PORT, arrayNode); } return this; } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints) { if (connectPoints == null) { object.remove(SUPPRESS_HOST_BY_PORT); } else { ArrayNode arrayNode = mapper.createArrayNode(); connectPoints.forEach(connectPoint -> { arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); }); object.set(SUPPRESS_HOST_BY_PORT, arrayNode); } return this; }  }
SegmentRoutingAppConfig extends Config<ApplicationId> { public SegmentRoutingAppConfig setSuppressHostByPort(Set<ConnectPoint> connectPoints) { if (connectPoints == null) { object.remove(SUPPRESS_HOST_BY_PORT); } else { ArrayNode arrayNode = mapper.createArrayNode(); connectPoints.forEach(connectPoint -> { arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); }); object.set(SUPPRESS_HOST_BY_PORT, 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 setSuppressHostByPort(Set<ConnectPoint> connectPoints) { if (connectPoints == null) { object.remove(SUPPRESS_HOST_BY_PORT); } else { ArrayNode arrayNode = mapper.createArrayNode(); connectPoints.forEach(connectPoint -> { arrayNode.add(connectPoint.deviceId() + "/" + connectPoint.port()); }); object.set(SUPPRESS_HOST_BY_PORT, 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();  }