2 * Copyright (c) 2015 - 2016 Ericsson India Global Services Pvt Ltd. 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.cloudservicechain.api;
12 public interface ICloudServiceChain {
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
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
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
28 void programVpnToScfPipeline(String vpnName, short tableId, long scfTag, int lportTag, int addOrRemove);
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.
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
44 * @param addOrRemove States if the flows must be added or removed
46 void programScfToVpnPipeline(String vpnName, long scfTag, int servChainTag, long dpnId, int lportTag,
47 boolean isLastServiceChain, int addOrRemove);
50 * Removes all Flow entries (LFIB + LPortDispatcher) that are related to a
51 * given VpnPseudoLport.
53 * @param vpnInstanceName Name of the VPN, typically its UUID
54 * @param vpnPseudoLportTag Lport tag of the VpnPseudoPort
56 void removeVpnPseudoPortFlows(String vpnInstanceName, int vpnPseudoLportTag);
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
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
73 * @param addOrRemove States if the flows must be added or removed
75 void programElanScfPipeline(String elanName, short tableId, long scfTag, int elanLportTag,
76 boolean isLastServiceChain, int addOrRemove);
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);
83 * Removes all Flow entries (ExtTunnelTable + LPortDispatcher) that are
84 * related to a given ElanPseudoLport.
86 * @param elanName Name of the Elan Instance
87 * @param elanPseudoLportTag Lport tag of the ElanPseudoPort
89 void removeElanPseudoPortFlows(String elanName, int elanPseudoLportTag);