72818855ed4d7035258760dba1bd5dc6c8e701e3
[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
10 import com.google.common.base.Optional;
11 import java.util.Collection;
12 import java.util.List;
13 import java.util.Map;
14 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
15 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
16 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
17 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.TunnelTypeBase;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.tunnels_state.StateTunnelList;
20 import org.opendaylight.yangtools.yang.common.Uint64;
21
22 public interface IITMProvider {
23     // APIs used by i
24     void createLocalCache(Uint64 dpnId, String portName, Integer vlanId, String ipAddress, String subnetMask,
25             String gatewayIp, String transportZone);
26
27     void commitTeps();
28
29     DataBroker getDataBroker();
30
31     List<String> showTeps();
32
33     void showState(Collection<StateTunnelList> tunnels);
34
35     void showBridges(Map dpnIdBridgeRefMap);
36
37     void showCache(String cacheName);
38
39     void deleteVtep(Uint64 dpnId, String portName, Integer vlanId, String ipAddress, String subnetMask,
40             String gatewayIp, String transportZone);
41
42     void configureTunnelType(String transportZone, String tunnelType);
43
44     void configureTunnelMonitorParams(boolean monitorEnabled, String monitorProtocol);
45
46     void configureTunnelMonitorInterval(int interval);
47
48     void addExternalEndpoint(java.lang.Class<? extends TunnelTypeBase> tunType, IpAddress dcgwIP);
49
50     void remExternalEndpoint(java.lang.Class<? extends TunnelTypeBase> tunType, IpAddress dcgwIP);
51
52     boolean validateIP(String ip);
53
54     Interface getInterface(String tunnelName);
55
56     Optional<StateTunnelList> getTunnelState(String interfaceName) throws ReadFailedException;
57 }