@Test public void testSuppressHostByProvider() throws Exception { Set<String> supprsuppressHostByProvider = config.suppressHostByProvider(); assertNotNull("suppressHostByProvider should not be null", supprsuppressHostByProvider); assertThat(supprsuppressHostByProvider.size(), is(2)); assertTrue(supprsuppressHostByProvider.contains(PROVIDER_1)); assertTrue(supprsuppressHostByProvider.contains(PROVIDER_2)); }
public Set<String> suppressHostByProvider() { if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { return ImmutableSet.of(); } ImmutableSet.Builder<String> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); for (JsonNode jsonNode : arrayNode) { String providerName = jsonNode.asText(null); if (providerName == null) { return null; } builder.add(providerName); } return builder.build(); }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<String> suppressHostByProvider() { if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { return ImmutableSet.of(); } ImmutableSet.Builder<String> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); for (JsonNode jsonNode : arrayNode) { String providerName = jsonNode.asText(null); if (providerName == null) { return null; } builder.add(providerName); } return builder.build(); } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<String> suppressHostByProvider() { if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { return ImmutableSet.of(); } ImmutableSet.Builder<String> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); for (JsonNode jsonNode : arrayNode) { String providerName = jsonNode.asText(null); if (providerName == null) { return null; } builder.add(providerName); } return builder.build(); }  }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Set<String> suppressHostByProvider() { if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { return ImmutableSet.of(); } ImmutableSet.Builder<String> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); for (JsonNode jsonNode : arrayNode) { String providerName = jsonNode.asText(null); if (providerName == null) { return null; } builder.add(providerName); } 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<String> suppressHostByProvider() { if (!object.has(SUPPRESS_HOST_BY_PROVIDER)) { return ImmutableSet.of(); } ImmutableSet.Builder<String> builder = ImmutableSet.builder(); ArrayNode arrayNode = (ArrayNode) object.path(SUPPRESS_HOST_BY_PROVIDER); for (JsonNode jsonNode : arrayNode) { String providerName = jsonNode.asText(null); if (providerName == null) { return null; } builder.add(providerName); } 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();  }