getInterfaceInfoFromOperationalDS Optimisation
[genius.git] / interfacemanager / interfacemanager-api / src / main / java / org / opendaylight / genius / interfacemanager / interfaces / IInterfaceManager.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
9 package org.opendaylight.genius.interfacemanager.interfaces;
10
11 import java.math.BigInteger;
12 import java.util.List;
13 import org.opendaylight.genius.interfacemanager.exceptions.InterfaceAlreadyExistsException;
14 import org.opendaylight.genius.interfacemanager.globals.InterfaceInfo;
15 import org.opendaylight.genius.mdsalutil.ActionInfo;
16 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rev160406.IfL2vlan;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.ServiceModeBase;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId;
21
22 public interface IInterfaceManager {
23     @Deprecated
24     Long getPortForInterface(String ifName);
25
26     @Deprecated
27     Long getPortForInterface(Interface intf);
28
29     @Deprecated
30     BigInteger getDpnForInterface(String ifName);
31
32     @Deprecated
33     BigInteger getDpnForInterface(Interface intrf);
34
35     @Deprecated
36     String getEndpointIpForDpn(BigInteger dpnId);
37
38     @Deprecated
39     List<ActionInfo> getInterfaceEgressActions(String ifName);
40
41     InterfaceInfo getInterfaceInfo(String intInfo);
42
43     InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName,
44             InterfaceInfo.InterfaceType interfaceType);
45
46     /*
47      * This API is currently used only for CLI usage. Please be careful that this API
48      * can return stale entries since it is just a cache read.
49      */
50     InterfaceInfo getInterfaceInfoFromOperationalDSCache(String interfaceName);
51
52     InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName);
53
54     Interface getInterfaceInfoFromConfigDataStore(String interfaceName);
55
56     void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
57             IfL2vlan.L2vlanMode l2vlanMode) throws InterfaceAlreadyExistsException;
58
59     void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
60             IfL2vlan.L2vlanMode l2vlanMode, boolean isExternal) throws InterfaceAlreadyExistsException;
61
62     void bindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
63
64     void unbindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
65
66     List<Interface> getVlanInterfaces();
67
68     List<Interface> getVxlanInterfaces();
69
70     boolean isExternalInterface(String interfaceName);
71
72     String getPortNameForInterface(NodeConnectorId nodeConnectorId, String interfaceName);
73
74     String getPortNameForInterface(String dpnId, String interfaceName);
75
76     String getParentRefNameForInterface(String interfaceName);
77
78     void updateInterfaceParentRef(String interfaceName, String parentInterface);
79
80     void updateInterfaceParentRef(String interfaceName, String parentInterface, boolean readInterfaceBeforeWrite);
81
82 }