2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
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
9 package org.opendaylight.genius.interfacemanager.interfaces;
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;
22 public interface IInterfaceManager {
24 Long getPortForInterface(String ifName);
27 Long getPortForInterface(Interface intf);
30 BigInteger getDpnForInterface(String ifName);
33 BigInteger getDpnForInterface(Interface intrf);
36 String getEndpointIpForDpn(BigInteger dpnId);
39 List<ActionInfo> getInterfaceEgressActions(String ifName);
41 InterfaceInfo getInterfaceInfo(String intInfo);
43 InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName,
44 InterfaceInfo.InterfaceType interfaceType);
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.
50 InterfaceInfo getInterfaceInfoFromOperationalDSCache(String interfaceName);
52 InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName);
54 Interface getInterfaceInfoFromConfigDataStore(String interfaceName);
56 void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
57 IfL2vlan.L2vlanMode l2vlanMode) throws InterfaceAlreadyExistsException;
59 void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
60 IfL2vlan.L2vlanMode l2vlanMode, boolean isExternal) throws InterfaceAlreadyExistsException;
62 void bindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
64 void unbindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
66 List<Interface> getVlanInterfaces();
68 List<Interface> getVxlanInterfaces();
70 boolean isExternalInterface(String interfaceName);
72 String getPortNameForInterface(NodeConnectorId nodeConnectorId, String interfaceName);
74 String getPortNameForInterface(String dpnId, String interfaceName);
76 String getParentRefNameForInterface(String interfaceName);
78 void updateInterfaceParentRef(String interfaceName, String parentInterface);
80 void updateInterfaceParentRef(String interfaceName, String parentInterface, boolean readInterfaceBeforeWrite);