Fix checkstyle violations in openflowplugin extensions
[openflowplugin.git] / extension / openflowplugin-extension-nicira / src / main / java / org / opendaylight / openflowplugin / extension / vendor / nicira / convertor / action / ActionUtil.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.openflowplugin.extension.vendor.nicira.convertor.action;
9
10 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.ActionChoice;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.ExperimenterId;
15
16 /**
17  * Action utilities.
18  *
19  * @author msunal
20  */
21 public final class ActionUtil {
22     public static final ExperimenterId EXPERIMENTER_ID = new ExperimenterId(NiciraConstants.NX_VENDOR_ID);
23
24     private ActionUtil() {
25     }
26
27     public static Action createAction(ActionChoice actionChoice) {
28         ActionBuilder actionBuilder = new ActionBuilder();
29         actionBuilder.setActionChoice(actionChoice);
30         actionBuilder.setExperimenterId(EXPERIMENTER_ID);
31         return actionBuilder.build();
32     }
33 }