private OFOxm buildExtensionOxm(ExtensionSelector extension) { if (!driverService.isPresent()) { log.error("No driver service present"); return null; } Driver driver = driverService.get().getDriver(deviceId); if (driver.hasBehaviour(ExtensionSelectorInterpreter.class)) { DefaultDriverHandler handler = new DefaultDriverHandler(new DefaultDriverData(driver, deviceId)); ExtensionSelectorInterpreter interpreter = handler.behaviour(ExtensionSelectorInterpreter.class); return interpreter.mapSelector(factory(), extension); } return null; }
case VLAN_VID: if (selectorInterpreter != null && selectorInterpreter.supported(ExtensionSelectorTypes.OFDPA_MATCH_VLAN_VID.type())) { if (match.getVersion().equals(OFVersion.OF_13)) { OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.VLAN_VID); builder.extension(selectorInterpreter.mapOxm(oxm), deviceId); } else { try { OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.NSP); builder.extension(selectorInterpreter.mapOxm(oxm), deviceId); } catch (UnsupportedOperationException e) { log.debug(e.getMessage()); try { OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.NSI); builder.extension(selectorInterpreter.mapOxm(oxm), deviceId); } catch (UnsupportedOperationException e) { log.debug(e.getMessage()); try { OFOxm oxm = ((OFMatchV3) match).getOxmList().get(MatchField.ENCAP_ETH_TYPE); builder.extension(selectorInterpreter.mapOxm(oxm), deviceId); } catch (UnsupportedOperationException e) { log.debug(e.getMessage());