d67daa9f770c82d3d6762ed8034cd90018b9ea9a
[genius.git] / itm / itm-api / src / main / java / org / opendaylight / genius / itm / api / IITMProvider.java
1 /*
2  * Copyright (c) 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.genius.itm.api;
9 import java.math.BigInteger;
10 import java.util.List;
11
12 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
13 import org.apache.felix.service.command.CommandSession;
14 import org.opendaylight.genius.interfacemanager.exceptions.InterfaceNotFoundException;
15 import org.opendaylight.genius.mdsalutil.ActionInfo;
16 import org.opendaylight.genius.mdsalutil.MatchInfo;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
18 //import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.itm.config.rev151102.vtep.config.schemas.VtepConfigSchema;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.config.rev160406.vtep.config.schemas.VtepConfigSchema;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.TunnelList ;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList;
23
24 public interface IITMProvider {
25     // APIs used by i
26     public void createLocalCache(BigInteger dpnId, String portName, Integer vlanId, String ipAddress, String subnetMask, String gatewayIp, String transportZone, CommandSession session);
27
28     public void commitTeps();
29
30     public DataBroker getDataBroker();
31
32     public void showTeps(CommandSession session);
33
34     public void showState(List<StateTunnelList> tunnels, CommandSession session);
35
36     public void showCache(String cacheName);
37
38     public void deleteVtep(BigInteger dpnId, String portName, Integer vlanId, String ipAddress, String subnetMask,
39                            String gatewayIp, String transportZone, CommandSession session);
40     // public void showState(TunnelsState tunnelsState);
41     public void configureTunnelType(String transportZone, String tunnelType);
42
43
44     /**
45      * Adds the vtep config schema.
46      *
47      * @param vtepConfigSchema
48      *            the vtep config schema
49      */
50     public void addVtepConfigSchema(VtepConfigSchema vtepConfigSchema);
51
52     /**
53      * Gets the vtep config schema.
54      *
55      * @param schemaName
56      *            the schema name
57      * @return the vtep config schema
58      */
59     public VtepConfigSchema getVtepConfigSchema(String schemaName);
60
61     /**
62      * Gets the all vtep config schemas.
63      *
64      * @return the all vtep config schemas
65      */
66     public List<VtepConfigSchema> getAllVtepConfigSchemas();
67
68     /**
69      * Update VTEP schema.
70      *
71      * @param schemaName
72      *            the schema name
73      * @param lstDpnsForAdd
74      *            the lst dpns for add
75      * @param lstDpnsForDelete
76      *            the lst dpns for delete
77      */
78     public void updateVtepSchema(String schemaName, List<BigInteger> lstDpnsForAdd, List<BigInteger> lstDpnsForDelete);
79
80     /**
81      * Delete all vtep schemas.
82      */
83     public void deleteAllVtepSchemas();
84
85     public void configureTunnelMonitorParams(boolean monitorEnabled, String monitorProtocol);
86
87     public void configureTunnelMonitorInterval(int interval);
88
89     public void addExternalEndpoint(java.lang.Class<? extends TunnelTypeBase> tunType, IpAddress dcgwIP);
90
91     public void remExternalEndpoint(java.lang.Class<? extends TunnelTypeBase> tunType, IpAddress dcgwIP);
92
93     public boolean validateIP (final String ip);
94 }