private void processPortAdded(Device device, Port port) { if (!port.annotations().value("portName").equals("vxlan")) { OpenstackSwitchingRulePopulator rulePopulator = new OpenstackSwitchingRulePopulator( appId, flowObjectiveService, deviceService, restHandler, driverService); rulePopulator.populateSwitchingRules(device, port); } }
@Override public OpenstackPort port(Port port) { Collection<OpenstackPort> ports = restHandler.getPorts(); String uuid = port.annotations().value("portName").substring(3); return ports.stream().filter(p -> p.id().startsWith(uuid)).findFirst().orElse(null); }
/** * Returns port name. * * @param port port * @return port name */ private String getPortName(Port port) { return port.annotations().value("portName"); }