2 * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.openflow.md.core.sal.convertor.action.cases;
11 import java.util.Optional;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.openflowplugin.api.OFConstants;
14 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
15 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionResponseConvertorData;
16 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.common.ConvertorCase;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetVlanPcpActionCaseBuilder;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanPcp;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetVlanPcpCase;
23 public class OfToSalSetVlanPcpCase extends ConvertorCase<SetVlanPcpCase, Action, ActionResponseConvertorData> {
24 public OfToSalSetVlanPcpCase() {
25 super(SetVlanPcpCase.class, true, OFConstants.OFP_VERSION_1_0);
29 public Optional<Action> process(@NonNull final SetVlanPcpCase source, final ActionResponseConvertorData data,
30 ConvertorExecutor convertorExecutor) {
31 return Optional.of(new SetVlanPcpActionCaseBuilder()
32 .setSetVlanPcpAction(new SetVlanPcpActionBuilder()
33 .setVlanPcp(new VlanPcp(source.getSetVlanPcpAction().getVlanPcp()))