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;
21 public interface IInterfaceManager {
23 Long getPortForInterface(String ifName);
26 Long getPortForInterface(Interface intf);
29 BigInteger getDpnForInterface(String ifName);
32 BigInteger getDpnForInterface(Interface intrf);
35 String getEndpointIpForDpn(BigInteger dpnId);
38 List<ActionInfo> getInterfaceEgressActions(String ifName);
40 InterfaceInfo getInterfaceInfo(String intInfo);
42 InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName,
43 InterfaceInfo.InterfaceType interfaceType);
45 InterfaceInfo getInterfaceInfoFromOperationalDataStore(String interfaceName);
47 Interface getInterfaceInfoFromConfigDataStore(String interfaceName);
49 void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
50 IfL2vlan.L2vlanMode l2vlanMode) throws InterfaceAlreadyExistsException;
52 void createVLANInterface(String interfaceName, String portName, BigInteger dpId, Integer vlanId, String description,
53 IfL2vlan.L2vlanMode l2vlanMode, boolean isExternal) throws InterfaceAlreadyExistsException;
55 void bindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
57 void unbindService(String interfaceName, Class<? extends ServiceModeBase> serviceMode, BoundServices serviceInfo);
59 List<Interface> getVlanInterfaces();
61 List<Interface> getVxlanInterfaces();
63 boolean isExternalInterface(String interfaceName);