Imported vpnservice as a subtree
[netvirt.git] / vpnservice / mdsalutil / mdsalutil-api / src / main / java / org / opendaylight / vpnservice / mdsalutil / interfaces / IMdsalApiManager.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 package org.opendaylight.vpnservice.mdsalutil.interfaces;
9
10 import java.math.BigInteger;
11 import java.util.List;
12
13 import com.google.common.util.concurrent.CheckedFuture;
14 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
15 import org.opendaylight.vpnservice.mdsalutil.ActionInfo;
16 import org.opendaylight.vpnservice.mdsalutil.FlowEntity;
17 import org.opendaylight.vpnservice.mdsalutil.GroupEntity;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
20
21 public interface IMdsalApiManager {
22
23     public void installFlow(FlowEntity flowEntity);
24
25     public CheckedFuture<Void,TransactionCommitFailedException> installFlow(BigInteger dpId, Flow flowEntity);
26
27     public CheckedFuture<Void,TransactionCommitFailedException> removeFlow(BigInteger dpId, Flow flowEntity);
28
29     public CheckedFuture<Void,TransactionCommitFailedException> removeFlow(BigInteger dpId, FlowEntity flowEntity);
30
31     public CheckedFuture<Void,TransactionCommitFailedException> installFlow(BigInteger dpId, FlowEntity flowEntity);
32
33     public void removeFlow(FlowEntity flowEntity);
34
35     public void installGroup(GroupEntity groupEntity);
36
37     public void modifyGroup(GroupEntity groupEntity);
38
39     public void removeGroup(GroupEntity groupEntity);
40
41     public void sendPacketOut(BigInteger dpnId, int groupId, byte[] payload);
42
43     public void sendPacketOutWithActions(BigInteger dpnId, long groupId, byte[] payload, List<ActionInfo> actionInfos);
44
45     public void sendARPPacketOutWithActions(BigInteger dpnId, byte[] payload, List<ActionInfo> action_info);
46
47     /**
48      * API to remove the flow on Data Plane Node synchronously. It internally waits for
49      * Flow Change Notification to confirm flow delete request is being sent with-in delayTime.
50      *
51      * @param flowEntity
52      * @param delayTime
53      */
54     public void syncRemoveFlow(FlowEntity flowEntity, long delayTime);
55     public void syncInstallFlow(FlowEntity flowEntity, long delayTime);
56
57     /**
58      * API to install the Group on Data Plane Node synchronously. It internally waits for
59      * Group Change Notification to confirm group mod request is being sent with-in delayTime
60      *
61      * @param groupEntity
62      * @param delayTime
63      */
64     public void syncInstallGroup(GroupEntity groupEntity, long delayTime);
65
66     public void syncInstallGroup(BigInteger dpId, Group group, long delayTime);
67
68     /**
69      * API to remove the Group on Data Plane Node synchronously. It internally waits for
70      * Group Change Notification to confirm group delete request is being sent.
71      *
72      * @param groupEntity
73      */
74     public void syncRemoveGroup(GroupEntity groupEntity);
75
76     public void syncRemoveGroup(BigInteger dpId, Group groupEntity);
77 }