@Test public void testSuppressHostByPort() throws Exception { Set<ConnectPoint> suppressHostByPort = config.suppressHostByPort(); assertNotNull("suppressHostByPort should not be null", suppressHostByPort); assertThat(suppressHostByPort.size(), is(2)); assertTrue(suppressHostByPort.contains(PORT_1)); assertTrue(suppressHostByPort.contains(PORT_2)); }
public Set<ConnectPoint> suppressHostByPort() { if (!object.has(SUPPRESS_HOST_BY_PORT)) { return ImmutableSet.of(); } ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); for (JsonNode jsonNode : arrayNode) { String portName = jsonNode.asText(null); if (portName == null) { return null; } try { builder.add(ConnectPoint.deviceConnectPoint(portName)); } catch (IllegalArgumentException e) { return null; } } return builder.build(); }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<ConnectPoint> suppressHostByPort() { if (!object.has(SUPPRESS_HOST_BY_PORT)) { return ImmutableSet.of(); } ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); for (JsonNode jsonNode : arrayNode) { String portName = jsonNode.asText(null); if (portName == null) { return null; } try { builder.add(ConnectPoint.deviceConnectPoint(portName)); } catch (IllegalArgumentException e) { return null; } } return builder.build(); } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<ConnectPoint> suppressHostByPort() { if (!object.has(SUPPRESS_HOST_BY_PORT)) { return ImmutableSet.of(); } ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); for (JsonNode jsonNode : arrayNode) { String portName = jsonNode.asText(null); if (portName == null) { return null; } try { builder.add(ConnectPoint.deviceConnectPoint(portName)); } catch (IllegalArgumentException e) { return null; } } return builder.build(); }  }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<ConnectPoint> suppressHostByPort() { if (!object.has(SUPPRESS_HOST_BY_PORT)) { return ImmutableSet.of(); } ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); for (JsonNode jsonNode : arrayNode) { String portName = jsonNode.asText(null); if (portName == null) { return null; } try { builder.add(ConnectPoint.deviceConnectPoint(portName)); } catch (IllegalArgumentException e) { return null; } } return builder.build(); }  @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 Set<ConnectPoint> suppressHostByPort() { if (!object.has(SUPPRESS_HOST_BY_PORT)) { return ImmutableSet.of(); } ImmutableSet.Builder<ConnectPoint> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PORT); for (JsonNode jsonNode : arrayNode) { String portName = jsonNode.asText(null); if (portName == null) { return null; } try { builder.add(ConnectPoint.deviceConnectPoint(portName)); } catch (IllegalArgumentException e) { return null; } } return builder.build(); }  @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();  }