@Test public void testVRouterId() throws Exception { Optional<DeviceId> vRouterId = config.vRouterId(); assertTrue(vRouterId.isPresent()); assertThat(vRouterId.get(), is(VROUTER_ID_1)); }
public Optional<DeviceId> vRouterId() { if (!object.has(VROUTER_ID)) { return Optional.empty(); } try { return Optional.of(DeviceId.deviceId(object.path(VROUTER_ID).asText())); } catch (IllegalArgumentException e) { return null; } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Optional<DeviceId> vRouterId() { if (!object.has(VROUTER_ID)) { return Optional.empty(); } try { return Optional.of(DeviceId.deviceId(object.path(VROUTER_ID).asText())); } catch (IllegalArgumentException e) { return null; } } }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Optional<DeviceId> vRouterId() { if (!object.has(VROUTER_ID)) { return Optional.empty(); } try { return Optional.of(DeviceId.deviceId(object.path(VROUTER_ID).asText())); } catch (IllegalArgumentException e) { return null; } }  }
SegmentRoutingAppConfig extends Config<ApplicationId> { public Optional<DeviceId> vRouterId() { if (!object.has(VROUTER_ID)) { return Optional.empty(); } try { return Optional.of(DeviceId.deviceId(object.path(VROUTER_ID).asText())); } catch (IllegalArgumentException e) { return null; } }  @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 Optional<DeviceId> vRouterId() { if (!object.has(VROUTER_ID)) { return Optional.empty(); } try { return Optional.of(DeviceId.deviceId(object.path(VROUTER_ID).asText())); } catch (IllegalArgumentException e) { return null; } }  @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();  }