2 * Copyright (c) 2017 Ericsson 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.netvirt.sfc.classifier.service.domain.api;
11 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.ace.Matches;
12 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
16 * The interface of classifier entry renderers.
19 * There are different independent render types:
20 * - Ingress (i.e. ingress bind to interface).
21 * - Node (i.e. node initialization).
22 * - Path (i.e. write path egress flows).
23 * - Match (i.e. write ACL flow).
24 * - Egress (i.e egress bind to interface).
27 * A renderer may not implement all the render types and is responsible to know
28 * if the render applies to it or not (for example, an openflow renderer should
29 * not write to a non openflow node).
31 public interface ClassifierEntryRenderer {
34 * Render ingress interface actions.
36 * @param interfaceKey the ingress interface key.
38 void renderIngress(InterfaceKey interfaceKey);
41 * Render node wide actions.
43 * @param nodeId the classifier node identifier.
45 void renderNode(NodeId nodeId);
48 * Render path based actions.
50 * @param nodeId the classifier node identifier.
51 * @param nsp the path identifier.
52 * @param nsi the path starting index.
53 * @param nsl the path length.
54 * @param firstHopIp the first SFF ip address. Null if the SFF is nodeId.
56 void renderPath(NodeId nodeId, Long nsp, short nsi, short nsl, String firstHopIp);
59 * Rended match based actions.
61 * @param nodeId the classifier node identifier.
62 * @param connector the node connector for the ingress interface.
63 * @param matches the ACL matches.
64 * @param nsp the path identifier.
65 * @param nsi the initial path index.
67 void renderMatch(NodeId nodeId, String connector, Matches matches, Long nsp, Short nsi);
70 * Render egress interface actions.
72 * @param interfaceKey the egress interface key.
73 * @param destinationIp the destination IP address associated to the
74 * interface. If the interface is a local interface,
75 * this should be a node local IP address, otherwise
76 * the remote IP address.
78 void renderEgress(InterfaceKey interfaceKey, String destinationIp);
81 * Suppress ingress interface actions.
83 * @param interfaceKey the ingress interface key.
85 void suppressIngress(InterfaceKey interfaceKey);
88 * Suppress node wide actions.
90 * @param nodeId the classifier node identifier.
92 void suppressNode(NodeId nodeId);
95 * Supress path based actions.
97 * @param nodeId the classifier node identifier.
98 * @param nsp the path identifier.
99 * @param nsi the path starting index.
100 * @param nsl the path length.
101 * @param firstHopIp the first SFF ip address. Null if the SFF is nodeId.
103 void suppressPath(NodeId nodeId, Long nsp, short nsi, short nsl, String firstHopIp);
106 * Supress match based actions.
108 * @param nodeId the classifier node identifier.
109 * @param connector the node connector for the ingress interface.
110 * @param matches the ACL matches.
111 * @param nsp the path identifier.
112 * @param nsi the initial path index.
114 void suppressMatch(NodeId nodeId, String connector, Matches matches, Long nsp, Short nsi);
117 * Supress egress interface actions.
119 * @param interfaceKey the egress interface key.
120 * @param destinationIp the destination IP address associated to the
121 * interface. If the interface is a local interface,
122 * this should be a node local IP address, otherwise
123 * the remote IP address.
125 void suppressEgress(InterfaceKey interfaceKey, String destinationIp);