2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowplugin.impl.translator;
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
12 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
13 import org.opendaylight.openflowplugin.api.openflow.md.util.OpenflowVersion;
14 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.MatchConvertorImpl;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved;
19 * translate {@link FlowRemoved} message to FlowRemoved notification (omit instructions)
21 public class FlowRemovedV10Translator extends FlowRemovedTranslator {
24 protected MatchBuilder translateMatch(FlowRemoved flowRemoved, DeviceState deviceState) {
25 return MatchConvertorImpl.fromOFMatchV10ToSALMatch(flowRemoved.getMatchV10(),
26 deviceState.getFeatures().getDatapathId(), OpenflowVersion.OF10);
30 * Always returns zero because OF10 FLOW_REMOVED doesn't contain table ID.
32 * @param flowRemoved FLOW_REMOVED message.
36 protected Short translateTableId(FlowRemoved flowRemoved) {
37 return Short.valueOf((short)0);