private ConnectPoint createConnectPoint(String devicePortString) { String[] splitted = devicePortString.split("/"); checkArgument(splitted.length == 2, "Connect point must be in \"deviceUri/portNumber\" format"); DeviceId deviceId = DeviceId.deviceId(splitted[0]); DeviceService deviceService = get(DeviceService.class); List<Port> ports = deviceService.getPorts(deviceId); for (Port port : ports) { if (splitted[1].equals(port.number().name())) { return new ConnectPoint(deviceId, port.number()); } } return null; }
.filter(r -> r.getColumn("name").data().equals(portNumber.name())) .findFirst().orElse(null); if (portRow != null && qosRow != null) {
@Override public void write(Kryo kryo, Output output, PortNumber object) { output.writeBoolean(object.hasName()); output.writeLong(object.toLong()); if (object.hasName()) { output.writeString(object.name()); } }
private ConnectPoint staticPort(ConnectPoint connectPoint) { Port port = deviceService.getPort(connectPoint.deviceId(), connectPoint.port()); String staticPort = port.annotations().value(AnnotationKeys.STATIC_PORT); // FIXME: need a better way to match the port if (staticPort != null) { for (Port p : deviceService.getPorts(connectPoint.deviceId())) { if (staticPort.equals(p.number().name())) { return new ConnectPoint(p.element().id(), p.number()); } } } return null; }
private ConnectPoint staticPort(ConnectPoint connectPoint) { Port port = deviceService.getPort(connectPoint.deviceId(), connectPoint.port()); String staticPort = port.annotations().value(AnnotationKeys.STATIC_PORT); // FIXME: need a better way to match the port if (staticPort != null) { for (Port p : deviceService.getPorts(connectPoint.deviceId())) { if (staticPort.equals(p.number().name())) { return new ConnectPoint(p.element().id(), p.number()); } } } return null; }
.valueOf(remoteControllerIp); ports.stream() .filter(p -> p.name().equalsIgnoreCase(tunnelName)) .forEach(p -> { l2ForwardService
String tunnelName = "vxlan-" + DEFAULT_IP; ports.stream() .filter(p ->p.name().equalsIgnoreCase(tunnelName)) .forEach(p -> { treatment.setOutput(p);