Make some classes final and not instantiables
[genius.git] / interfacemanager / interfacemanager-api / src / main / java / org / opendaylight / genius / interfacemanager / interfaces / IInterfaceManager.java
1 /*
2  * Copyright (c) 2016, 2017 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.genius.interfacemanager.interfaces;
10
11 import java.math.BigInteger;
12 import java.util.List;
13 import java.util.Map;
14 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
15 import org.opendaylight.genius.interfacemanager.exceptions.InterfaceAlreadyExistsException;
16 import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
17 import org.opendaylight.genius.mdsalutil.ActionInfo;
18 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeBase;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbBridgeAugmentation;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
26 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
27 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
28
29 public interface IInterfaceManager {
30
31     Long getPortForInterface(String ifName);
32
33     Long getPortForInterface(Interface intf);
34
35     BigInteger getDpnForInterface(String ifName);
36
37     BigInteger getDpnForInterface(Interface intrf);
38
39     String getEndpointIpForDpn(BigInteger dpnId);
40
41     List<ActionInfo> getInterfaceEgressActions(String ifName);
42
43     InterfaceInfo getInterfaceInfo(String intInfo);
44
45     InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName,
46             InterfaceInfo.InterfaceType interfaceType);
47
48     InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName);
49
50     /**
51      * This API is currently used only for CLI usage. Please be careful that this API
52      * can return stale entries since it is just a cache read.
53      */
54     InterfaceInfo getInterfaceInfoFromOperationalDSCache(String interfaceName);
55
56     Interface getInterfaceInfoFromConfigDataStore(String interfaceName);
57
58     void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
59             IfL2vlan.L2vlanMode l2vlanMode) throws InterfaceAlreadyExistsException;
60
61     void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
62             IfL2vlan.L2vlanMode l2vlanMode, boolean isExternal) throws InterfaceAlreadyExistsException;
63
64     boolean isServiceBoundOnInterfaceForIngress(short servicePriority, String interfaceName);
65
66     boolean isServiceBoundOnInterfaceForEgress(short servicePriority, String interfaceName);
67
68     void bindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
69
70     void bindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo,
71                      WriteTransaction tx);
72
73     void unbindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
74
75     List<Interface> getVlanInterfaces();
76
77     List<Interface> getVxlanInterfaces();
78
79     List<Interface> getChildInterfaces(String parentInterface);
80
81     boolean isExternalInterface(String interfaceName);
82
83     String getPortNameForInterface(NodeConnectorId nodeConnectorId, String interfaceName);
84
85     String getPortNameForInterface(String dpnId, String interfaceName);
86
87     String getParentRefNameForInterface(String interfaceName);
88
89     Map<String, OvsdbTerminationPointAugmentation> getTerminationPointCache();
90
91     OvsdbTerminationPointAugmentation getTerminationPointForInterface(String interfaceName);
92
93     OvsdbBridgeAugmentation getOvsdbBridgeForInterface(String interfaceName);
94
95     OvsdbBridgeAugmentation getOvsdbBridgeForNodeIid(InstanceIdentifier<Node> nodeIid);
96
97     List<OvsdbTerminationPointAugmentation> getPortsOnBridge(BigInteger dpnId);
98
99     List<OvsdbTerminationPointAugmentation> getTunnelPortsOnBridge(BigInteger dpnId);
100
101     Map<Class<? extends InterfaceTypeBase>, List<OvsdbTerminationPointAugmentation>>
102         getPortsOnBridgeByType(BigInteger dpnId);
103
104     void updateInterfaceParentRef(String interfaceName, String parentInterface);
105
106     void updateInterfaceParentRef(String interfaceName, String parentInterface, boolean readInterfaceBeforeWrite);
107
108     long getLogicalTunnelSelectGroupId(int lportTag);
109 }