@Override public ExtensionTreatment mapAction(OFAction action) throws UnsupportedOperationException { if (action.getType().equals(OFActionType.SET_FIELD)) { OFActionSetField setFieldAction = (OFActionSetField) action; OFOxm<?> oxm = setFieldAction.getField(); switch (oxm.getMatchField().id) { case VLAN_VID: OFOxmVlanVid vlanVid = (OFOxmVlanVid) oxm; return new OfdpaSetVlanVid(VlanId.vlanId(vlanVid.getValue().getRawVid())); default: throw new UnsupportedOperationException( "Driver does not support extension type " + oxm.getMatchField().id); } } throw new UnsupportedOperationException( "Unexpected OFAction: " + action.toString()); }