@Test public void testSetAdjacencySids() throws Exception { config.setAdjacencySids(adjacencySids2); assertThat(config.adjacencySids(), is(adjacencySids2)); }
public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJSID, sid); ArrayNode portsNode = mapper.createArrayNode(); ports.forEach(port -> { portsNode.add(port.toString()); }); adjacencySidNode.set(PORTS, portsNode); adjacencySidsNode.add(adjacencySidNode); }); object.set(ADJSIDS, adjacencySidsNode); } return this; }
SegmentRoutingDeviceConfig extends Config<DeviceId> { public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJSID, sid); ArrayNode portsNode = mapper.createArrayNode(); ports.forEach(port -> { portsNode.add(port.toString()); }); adjacencySidNode.set(PORTS, portsNode); adjacencySidsNode.add(adjacencySidNode); }); object.set(ADJSIDS, adjacencySidsNode); } return this; } }
SegmentRoutingDeviceConfig extends Config<DeviceId> { public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJSID, sid); ArrayNode portsNode = mapper.createArrayNode(); ports.forEach(port -> { portsNode.add(port.toString()); }); adjacencySidNode.set(PORTS, portsNode); adjacencySidsNode.add(adjacencySidNode); }); object.set(ADJSIDS, adjacencySidsNode); } return this; }  }
SegmentRoutingDeviceConfig extends Config<DeviceId> { public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJSID, sid); ArrayNode portsNode = mapper.createArrayNode(); ports.forEach(port -> { portsNode.add(port.toString()); }); adjacencySidNode.set(PORTS, portsNode); adjacencySidsNode.add(adjacencySidNode); }); object.set(ADJSIDS, adjacencySidsNode); } return this; }  @Override boolean isValid(); Optional<String> name(); SegmentRoutingDeviceConfig setName(String name); Ip4Address routerIp(); SegmentRoutingDeviceConfig setRouterIp(String ip); MacAddress routerMac(); SegmentRoutingDeviceConfig setRouterMac(String mac); int nodeSid(); SegmentRoutingDeviceConfig setNodeSid(int sid); Boolean isEdgeRouter(); SegmentRoutingDeviceConfig setIsEdgeRouter(boolean isEdgeRouter); Map<Integer, Set<Integer>> adjacencySids(); SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids); }
SegmentRoutingDeviceConfig extends Config<DeviceId> { public SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids) { if (adjacencySids == null) { object.remove(ADJSIDS); } else { ArrayNode adjacencySidsNode = mapper.createArrayNode(); adjacencySids.forEach((sid, ports) -> { ObjectNode adjacencySidNode = mapper.createObjectNode(); adjacencySidNode.put(ADJSID, sid); ArrayNode portsNode = mapper.createArrayNode(); ports.forEach(port -> { portsNode.add(port.toString()); }); adjacencySidNode.set(PORTS, portsNode); adjacencySidsNode.add(adjacencySidNode); }); object.set(ADJSIDS, adjacencySidsNode); } return this; }  @Override boolean isValid(); Optional<String> name(); SegmentRoutingDeviceConfig setName(String name); Ip4Address routerIp(); SegmentRoutingDeviceConfig setRouterIp(String ip); MacAddress routerMac(); SegmentRoutingDeviceConfig setRouterMac(String mac); int nodeSid(); SegmentRoutingDeviceConfig setNodeSid(int sid); Boolean isEdgeRouter(); SegmentRoutingDeviceConfig setIsEdgeRouter(boolean isEdgeRouter); Map<Integer, Set<Integer>> adjacencySids(); SegmentRoutingDeviceConfig setAdjacencySids(Map<Integer, Set<Integer>> adjacencySids);  }