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 java.util.List;
14 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.OfContext;
15 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.OfWriter;
16 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.flow.PolicyEnforcer.NetworkElements;
17 import org.opendaylight.groupbasedpolicy.renderer.ofoverlay.flow.PolicyEnforcer.PolicyPair;
18 import org.opendaylight.groupbasedpolicy.resolver.validator.Validator;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.common.rev140421.ActionDefinitionId;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.HasDirection.Direction;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.subject.feature.definitions.ActionDefinition;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.renderer.rev151103.renderers.renderer.capabilities.supported.action.definition.SupportedParameterValues;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.groupbasedpolicy.policy.rev140421.tenants.tenant.subject.feature.instances.ActionInstance;
27 * Represent an action definition, and provide tools for generating
28 * flow instructions based on the action
31 public abstract class Action implements Validator<ActionInstance> {
33 * Get the action definition for this action
34 * @return the {@link ActionDefinition} for this action
36 public abstract ActionDefinitionId getId();
39 * Get the action definition for this action
40 * @return the {@link ActionDefinition} for this action
42 public abstract ActionDefinition getActionDef();
45 * The result represents supported parameters for the action by renderer
47 * @return list of supported parameters by the action
49 public abstract List<SupportedParameterValues> getSupportedParameterValues();
52 * Construct a set of actions that will apply to the traffic. Augment
53 * the existing list of actions or add new actions. It's important
54 * that the order of the returned list be consistent however
56 * @param actions The existing actions
57 * @param params the parameters for the action instance
58 * @param order the order of the list of actions
59 * @param netElements the network elements
60 * @param policyPair the {@link PolicyPair}
61 * @param ofWriter the {@link OfWriter}
62 * @param ctx the OfContext
63 * @param direction the direction of traffic
64 * @return the updated list of actions (may be a different length)
66 public abstract List<ActionBuilder> updateAction(List<ActionBuilder> actions,
67 Map<String, Object> params,
69 NetworkElements netElements,
70 PolicyPair policyPair,