2 * Copyright (c) 2014 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.groupbasedpolicy.renderer.ofoverlay.sf;
11 import static org.opendaylight.groupbasedpolicy.renderer.ofoverlay.flow.FlowUtils.nxOutputRegAction;
13 import java.util.List;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionDefinitionId;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionName;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.Description;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ActionDefinition;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ActionDefinitionBuilder;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg7;
28 public class AllowAction extends Action {
29 public static final ActionDefinitionId ID =
30 new ActionDefinitionId("f942e8fd-e957-42b7-bd18-f73d11266d17");
31 protected static final String TYPE = "type";
32 protected static final ActionDefinition DEF =
33 new ActionDefinitionBuilder()
35 .setName(new ActionName("allow"))
36 .setDescription(new Description("Allow the specified traffic to pass"))
39 // How allow is implemented in the PolicyEnforcer table
40 private final org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action allow =
41 nxOutputRegAction(NxmNxReg7.class);
44 public ActionDefinitionId getId() {
49 public ActionDefinition getActionDef() {
54 public List<ActionBuilder> updateAction(List<ActionBuilder> actions,
55 Map<String, Object> params,
58 * Allow action doesn't use parameters
59 * TODO: check to make sure ActionBuilder w/allow isn't already present
61 ActionBuilder ab = new ActionBuilder();