Fix build faliures due to OFPlugin checktyle fixes
[netvirt.git] / cloud-servicechain / cloud-servicechain-api / src / main / java / org / opendaylight / netvirt / cloudservicechain / api / ICloudServiceChain.java
1 /*
2  * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. 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
9 package org.opendaylight.netvirt.cloudservicechain.api;
10
11
12 public interface ICloudServiceChain {
13
14
15     /**
16      * Creates/removes the flows that send the packets from a VPN to the SCF
17      * domain. These flows are programmed in all DPNs where the VPN has
18      * footprint.
19      *
20      * @param vpnName Vpn instance name, typically the UUID
21      * @param tableId Id of the SCF pipeline to where LPortDispatcher must send
22      *           the packet. Typically it should by Uplink or Downlink Dynamic
23      *           Subs Filter
24      * @param scfTag ServiceChainForwarding Tag
25      * @param lportTag LportTag of the VPN Pseudo Logical Port
26      * @param addOrRemove states if pipeline must be created or removed
27      */
28     void programVpnToScfPipeline(String vpnName, short tableId, long scfTag, int lportTag, int addOrRemove);
29
30
31     /**
32      * Creates/removes the flows that handover packets from SCF pipeline to a
33      * specific VPN. This happens when there is a ScHop with an egressPort that
34      * is the VpnPseudoLPort.
35      *
36      * @param vpnName Vpn instance name, typically the UUID
37      * @param scfTag ServiceChainForwarding Tag
38      * @param servChainTag Service Chain Tag
39      * @param dpnId DPN where the ingress Port of the ScHop is located
40      * @param lportTag Lport tag of the VpnPseudoPort
41      * @param isLastServiceChain Only considered in removal operations. States
42      *            if there are no more ServiceChains using the VPNPseudoPort as
43      *            egress port.
44      * @param addOrRemove States if the flows must be added or removed
45      */
46     void programScfToVpnPipeline(String vpnName, long scfTag, int servChainTag, long dpnId, int lportTag,
47                                  boolean isLastServiceChain, int addOrRemove);
48
49     /**
50      * Removes all Flow entries (LFIB + LPortDispatcher) that are related to a
51      * given VpnPseudoLport.
52      *
53      * @param vpnInstanceName Name of the VPN, typically its UUID
54      * @param vpnPseudoLportTag Lport tag of the VpnPseudoPort
55      */
56     void removeVpnPseudoPortFlows(String vpnInstanceName, int vpnPseudoLportTag);
57
58
59
60     /**
61      * Programs the needed flows for sending traffic to the SCF pipeline when
62      * it is coming from an L2-GW (ELAN) and also for handing over that
63      * traffic from SCF to ELAN when the packets does not match any Service
64      * Chain.
65      *
66      * @param elanName Elan instance name, typically the UUID. Needed to
67      *     retrieve the VNI and the elanTag.
68      * @param scfTag ServiceChainForwarding Tag
69      * @param elanLportTag LPortTag of the Elan Pseudo Port
70      * @param isLastServiceChain Only considered in removal operations. States
71      *     if there are no more ServiceChains using the ElanPseudoPort as
72      *     ingress port.
73      * @param addOrRemove States if the flows must be added or removed
74      */
75     void programElanScfPipeline(String elanName, short tableId, long scfTag, int elanLportTag,
76                                 boolean isLastServiceChain, int addOrRemove);
77
78     // TODO: To be removed when sdnc is changed so that it calls the following API instead:
79     void programElanScfPipeline(String elanName, short tableId, int scfTag, int elanLportTag, int addOrRemove);
80
81
82     /**
83      * Removes all Flow entries (ExtTunnelTable + LPortDispatcher) that are
84      * related to a given ElanPseudoLport.
85      *
86      * @param elanName Name of the Elan Instance
87      * @param elanPseudoLportTag Lport tag of the ElanPseudoPort
88      */
89     void removeElanPseudoPortFlows(String elanName, int elanPseudoLportTag);
90 }