Class ElanL2GatewayUtils
- java.lang.Object
-
- org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils
-
@Singleton public class ElanL2GatewayUtils extends java.lang.Object
It gathers a set of utility methods that handle ELAN configuration in external Devices (where external means "not-CSS". As of now: TORs).It makes use of HwvtepUtils class located under ovsdb/hwvtepsouthbound project for low-level mdsal operations
- Author:
- eperefr
-
-
Constructor Summary
Constructors Constructor Description ElanL2GatewayUtils(org.opendaylight.mdsal.binding.api.DataBroker broker, ElanDmacUtils elanDmacUtils, ElanItmUtils elanItmUtils, ElanClusterUtils elanClusterUtils, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, ElanUtils elanUtils, Scheduler scheduler, ElanConfig elanConfig, ElanInstanceCache elanInstanceCache, ElanInstanceDpnsCache elanInstanceDpnsCache, ElanL2GatewayMulticastUtils elanL2GatewayMulticastUtils, org.opendaylight.infrautils.caches.CacheProvider cacheProvider)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
areMLAGDevices(L2GatewayDevice l2GatewayDevice, L2GatewayDevice otherL2GatewayDevice)
Are MLAG devices.void
cancelDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)
static boolean
checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs remoteMcastMac, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress expectedPhyLocatorIp)
Check if phy locator already exists in remote mcast entry.void
close()
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node>
createInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId)
static void
createItmTunnels(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, java.lang.String hwvtepId, java.lang.String psName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint>
createPhysicalPortInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId physicalSwitchNodeId, java.lang.String phyPortName)
void
deleteElanL2GwDevicesUcastLocalMacsFromDpn(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Delete elan l2 gateway devices ucast local macs from dpn.com.google.common.util.concurrent.FluentFuture<? extends @NonNull org.opendaylight.mdsal.common.api.CommitInfo>
deleteElanMacsFromL2GatewayDevice(java.lang.String hwvtepNodeId, java.lang.String elanName)
Delete elan macs from L2 gateway device.
This includes deleting ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.void
deleteL2GwDeviceUcastLocalMacsFromElan(L2GatewayDevice l2GatewayDevice, java.lang.String elanName)
Delete l2 gateway device ucast local macs from elan.
Deletes macs from internal ELAN nodes and also on rest of external l2 gateway devices which are part of the ELAN.com.google.common.util.concurrent.ListenableFuture<?>
deleteVlanBindingsFromL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
Delete vlan bindings from l2 gateway device.org.opendaylight.yangtools.yang.common.Uint64
getDpidFromInterface(java.lang.String interfaceName)
Gets the dpid from interface.@NonNull java.util.Collection<DpnInterfaces>
getElanDpns(java.lang.String elanName)
static java.lang.String
getElanFromLogicalSwitch(java.lang.String logicalSwitchName)
Gets the elan name from logical switch name.@Nullable ElanInstance
getElanInstanceForUcastLocalMac(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMac)
java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs>
getElanMacTableEntriesMacs(java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
Gets the elan mac table entries as remote ucast macs.static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface
getInterfaceFromConfigDS(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey, org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface>
getInterfaceIdentifier(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey)
static java.lang.String
getL2GatewayConnectionJobKey(java.lang.String logicalSwitchName)
Gets the l2 gateway connection job key.java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>
getL2GwDeviceLocalMacs(java.lang.String elanName, L2GatewayDevice l2gwDevice)
Gets the l2 gw device local macs.void
getL2GwDeviceLocalMacsAndRunCallback(java.lang.String elanName, L2GatewayDevice l2gwDevice, java.util.function.Function<java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>,java.lang.Void> function)
long
getLogicalSwitchDeleteDelaySecs()
static java.lang.String
getLogicalSwitchFromElan(java.lang.String elanName)
Gets the logical switch name from elan name.static java.lang.String
getNodeIdFromDpnId(java.math.BigInteger dpnId)
static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs>
getOtherDevicesMacs(java.lang.String elanName, L2GatewayDevice l2GatewayDeviceToBeConfigured, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
Gets the l2 gateway devices ucast local macs as remote ucast macs.java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>
getRemoteUcastMacs(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String logicalSwitch, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
Gets the remote ucast macs from hwvtep node filtering based on logical switch.java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>>
installDmacFlowsOnDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, L2GatewayDevice l2gwDevice, ElanInstance elan, java.lang.String interfaceName)
Install dmac flows on dpn.void
installElanL2gwDevicesLocalMacsInDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, ElanInstance elan, java.lang.String interfaceName)
Install elan l2gw devices local macs in dpn.com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo>
installElanMacsInL2GatewayDevice(java.lang.String elanName, L2GatewayDevice l2GatewayDevice)
Install ELAN macs in L2 Gateway device.
This includes installing ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.void
installL2gwDeviceMacsInDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId l2gwDeviceNodeId, ElanInstance elan, java.lang.String interfaceName)
Install external device local macs in dpn.void
installL2GwUcastMacInElan(ElanInstance elan, L2GatewayDevice extL2GwDevice, java.lang.String macToBeAdded, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMacs, @Nullable java.lang.String interfaceName)
org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs
readRemoteMcastMac(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
Gets the remote mcast mac.void
removeMacsFromElanExternalDevices(ElanInstance elanInstance, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> macAddresses)
Removes the given MAC Addresses from all the External Devices belonging to the specified ELAN.void
scheduleAddDpnMacInExtDevices(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses)
com.google.common.util.concurrent.FluentFuture<? extends @NonNull org.opendaylight.mdsal.common.api.CommitInfo>
scheduleAddDpnMacsInExtDevice(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses, L2GatewayDevice externalDevice)
void
scheduleDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)
void
scheduleDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName, boolean clearUcast)
void
unInstallL2GwUcastMacFromElanDpns(ElanInstance elan, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
Uninstall l2gw macs from other DPNs in the elan instance provided.void
unInstallL2GwUcastMacFromL2gwDevices(java.lang.String elanName, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
Uninstall l2gw macs from other l2gw devices in the elanName provided.com.google.common.util.concurrent.FluentFuture<?>
updateVlanBindingsInL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String psName, java.lang.String interfaceName, java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindings> vlanBindings)
Update vlan bindings in l2 gateway device.com.google.common.util.concurrent.FluentFuture<?>
updateVlanBindingsInL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
Update vlan bindings in l2 gateway device.
-
-
-
Constructor Detail
-
ElanL2GatewayUtils
@Inject public ElanL2GatewayUtils(org.opendaylight.mdsal.binding.api.DataBroker broker, ElanDmacUtils elanDmacUtils, ElanItmUtils elanItmUtils, ElanClusterUtils elanClusterUtils, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.OdlInterfaceRpcService interfaceManagerRpcService, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, ElanUtils elanUtils, Scheduler scheduler, ElanConfig elanConfig, ElanInstanceCache elanInstanceCache, ElanInstanceDpnsCache elanInstanceDpnsCache, ElanL2GatewayMulticastUtils elanL2GatewayMulticastUtils, org.opendaylight.infrautils.caches.CacheProvider cacheProvider)
-
-
Method Detail
-
close
@PreDestroy public void close()
-
getLogicalSwitchDeleteDelaySecs
public long getLogicalSwitchDeleteDelaySecs()
-
checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry
public static boolean checkIfPhyLocatorAlreadyExistsInRemoteMcastEntry(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs remoteMcastMac, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress expectedPhyLocatorIp)
Check if phy locator already exists in remote mcast entry.- Parameters:
nodeId
- the node idremoteMcastMac
- the remote mcast macexpectedPhyLocatorIp
- the expected phy locator ip- Returns:
- true, if successful
-
readRemoteMcastMac
public org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteMcastMacs readRemoteMcastMac(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
Gets the remote mcast mac.- Parameters:
nodeId
- the node idlogicalSwitchName
- the logical switch namedatastoreType
- the datastore type- Returns:
- the remote mcast mac
-
removeMacsFromElanExternalDevices
public void removeMacsFromElanExternalDevices(ElanInstance elanInstance, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> macAddresses)
Removes the given MAC Addresses from all the External Devices belonging to the specified ELAN.- Parameters:
elanInstance
- the elan instancemacAddresses
- the mac addresses
-
getElanInstanceForUcastLocalMac
public @Nullable ElanInstance getElanInstanceForUcastLocalMac(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMac)
-
installL2gwDeviceMacsInDpn
public void installL2gwDeviceMacsInDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId l2gwDeviceNodeId, ElanInstance elan, java.lang.String interfaceName)
Install external device local macs in dpn.- Parameters:
dpnId
- the dpn idl2gwDeviceNodeId
- the l2gw device node idelan
- the elaninterfaceName
- the interface name
-
installDmacFlowsOnDpn
public java.util.List<com.google.common.util.concurrent.ListenableFuture<java.lang.Void>> installDmacFlowsOnDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, L2GatewayDevice l2gwDevice, ElanInstance elan, java.lang.String interfaceName)
Install dmac flows on dpn.- Parameters:
dpnId
- the dpn idl2gwDevice
- the l2gw deviceelan
- the elaninterfaceName
- the interface name
-
installElanL2gwDevicesLocalMacsInDpn
public void installElanL2gwDevicesLocalMacsInDpn(org.opendaylight.yangtools.yang.common.Uint64 dpnId, ElanInstance elan, java.lang.String interfaceName)
Install elan l2gw devices local macs in dpn.- Parameters:
dpnId
- the dpn idelan
- the elaninterfaceName
- the interface name
-
installL2GwUcastMacInElan
public void installL2GwUcastMacInElan(ElanInstance elan, L2GatewayDevice extL2GwDevice, java.lang.String macToBeAdded, org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.LocalUcastMacs localUcastMacs, @Nullable java.lang.String interfaceName)
-
unInstallL2GwUcastMacFromL2gwDevices
public void unInstallL2GwUcastMacFromL2gwDevices(java.lang.String elanName, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
Uninstall l2gw macs from other l2gw devices in the elanName provided.- Parameters:
elanName
- - Elan Name for which other l2gw devices will be scanned.l2GwDevice
- - l2gwDevice whose macs are required to be cleared from other devices.macAddresses
- - Mac address to be cleared.
-
unInstallL2GwUcastMacFromElanDpns
public void unInstallL2GwUcastMacFromElanDpns(ElanInstance elan, L2GatewayDevice l2GwDevice, java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> macAddresses)
Uninstall l2gw macs from other DPNs in the elan instance provided.- Parameters:
elan
- - Elan Instance for which other DPNs will be scanned.l2GwDevice
- - l2gwDevice whose macs are required to be cleared from other devices.macAddresses
- - Mac address to be cleared.
-
deleteElanL2GwDevicesUcastLocalMacsFromDpn
public void deleteElanL2GwDevicesUcastLocalMacsFromDpn(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpnId)
Delete elan l2 gateway devices ucast local macs from dpn.- Parameters:
elanName
- the elan namedpnId
- the dpn id
-
getL2GwDeviceLocalMacsAndRunCallback
public void getL2GwDeviceLocalMacsAndRunCallback(java.lang.String elanName, L2GatewayDevice l2gwDevice, java.util.function.Function<java.util.Collection<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress>,java.lang.Void> function)
-
deleteElanMacsFromL2GatewayDevice
public com.google.common.util.concurrent.FluentFuture<? extends @NonNull org.opendaylight.mdsal.common.api.CommitInfo> deleteElanMacsFromL2GatewayDevice(java.lang.String hwvtepNodeId, java.lang.String elanName)
Delete elan macs from L2 gateway device.
This includes deleting ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.- Parameters:
hwvtepNodeId
- the hwvtepNodeIdelanName
- the elan name- Returns:
- the listenable future
-
getRemoteUcastMacs
public java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getRemoteUcastMacs(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String logicalSwitch, org.opendaylight.mdsal.common.api.LogicalDatastoreType datastoreType)
Gets the remote ucast macs from hwvtep node filtering based on logical switch.- Parameters:
hwvtepNodeId
- the hwvtep node idlogicalSwitch
- the logical switchdatastoreType
- the datastore type- Returns:
- the remote ucast macs
-
installElanMacsInL2GatewayDevice
public com.google.common.util.concurrent.FluentFuture<? extends org.opendaylight.mdsal.common.api.CommitInfo> installElanMacsInL2GatewayDevice(java.lang.String elanName, L2GatewayDevice l2GatewayDevice)
Install ELAN macs in L2 Gateway device.
This includes installing ELAN mac table entries plus external device UcastLocalMacs which are part of the same ELAN.- Parameters:
elanName
- the elan namel2GatewayDevice
- the l2 gateway device which has to be configured- Returns:
- the listenable future
-
getOtherDevicesMacs
public static java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getOtherDevicesMacs(java.lang.String elanName, L2GatewayDevice l2GatewayDeviceToBeConfigured, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
Gets the l2 gateway devices ucast local macs as remote ucast macs.- Parameters:
elanName
- the elan namel2GatewayDeviceToBeConfigured
- the l2 gateway device to be configuredhwVtepNodeId
- the hw vtep node Id to be configuredlogicalSwitchName
- the logical switch name- Returns:
- the l2 gateway devices macs as remote ucast macs
-
areMLAGDevices
public static boolean areMLAGDevices(L2GatewayDevice l2GatewayDevice, L2GatewayDevice otherL2GatewayDevice)
Are MLAG devices.- Parameters:
l2GatewayDevice
- the l2 gateway deviceotherL2GatewayDevice
- the other l2 gateway device- Returns:
- true, if both the specified l2 gateway devices are part of same MLAG
-
getElanMacTableEntriesMacs
public java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.global.attributes.RemoteUcastMacs> getElanMacTableEntriesMacs(java.lang.String elanName, org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwVtepNodeId, java.lang.String logicalSwitchName)
Gets the elan mac table entries as remote ucast macs.
Note: ELAN MAC table only contains internal switches MAC's. It doesn't contain external device MAC's.- Parameters:
elanName
- the elan namehwVtepNodeId
- the hw vtep node idlogicalSwitchName
- the logical switch name- Returns:
- the elan mac table entries as remote ucast macs
-
getDpidFromInterface
public org.opendaylight.yangtools.yang.common.Uint64 getDpidFromInterface(java.lang.String interfaceName)
Gets the dpid from interface.- Parameters:
interfaceName
- the interface name- Returns:
- the dpid from interface
-
updateVlanBindingsInL2GatewayDevice
public com.google.common.util.concurrent.FluentFuture<?> updateVlanBindingsInL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String psName, java.lang.String interfaceName, java.util.List<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.hwvtep.rev150901.hwvtep.physical.port.attributes.VlanBindings> vlanBindings)
Update vlan bindings in l2 gateway device.- Parameters:
nodeId
- the node idpsName
- the physical switch nameinterfaceName
- the interface in physical switchvlanBindings
- the vlan bindings to be configured- Returns:
- the listenable future
-
updateVlanBindingsInL2GatewayDevice
public com.google.common.util.concurrent.FluentFuture<?> updateVlanBindingsInL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, java.lang.String logicalSwitchName, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
Update vlan bindings in l2 gateway device.- Parameters:
nodeId
- the node idlogicalSwitchName
- the logical switch namehwVtepDevice
- the hardware devicedefaultVlanId
- the default vlan id- Returns:
- the listenable future
-
createPhysicalPortInstanceIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPoint> createPhysicalPortInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId physicalSwitchNodeId, java.lang.String phyPortName)
-
createInstanceIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node> createInstanceIdentifier(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId)
-
deleteVlanBindingsFromL2GatewayDevice
public com.google.common.util.concurrent.ListenableFuture<?> deleteVlanBindingsFromL2GatewayDevice(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.l2gateways.rev150712.l2gateway.attributes.Devices hwVtepDevice, java.lang.Integer defaultVlanId)
Delete vlan bindings from l2 gateway device.- Parameters:
nodeId
- the node idhwVtepDevice
- the hw vtep devicedefaultVlanId
- the default vlan id- Returns:
- the listenable future
-
getElanFromLogicalSwitch
public static java.lang.String getElanFromLogicalSwitch(java.lang.String logicalSwitchName)
Gets the elan name from logical switch name.- Parameters:
logicalSwitchName
- the logical switch name- Returns:
- the elan name from logical switch name
-
getLogicalSwitchFromElan
public static java.lang.String getLogicalSwitchFromElan(java.lang.String elanName)
Gets the logical switch name from elan name.- Parameters:
elanName
- the elan name- Returns:
- the logical switch from elan name
-
getL2GatewayConnectionJobKey
public static java.lang.String getL2GatewayConnectionJobKey(java.lang.String logicalSwitchName)
Gets the l2 gateway connection job key.- Parameters:
logicalSwitchName
- the logical switch name- Returns:
- the l2 gateway connection job key
-
getInterfaceIdentifier
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface> getInterfaceIdentifier(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey)
-
getInterfaceFromConfigDS
public static @Nullable org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.Interface getInterfaceFromConfigDS(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey interfaceKey, org.opendaylight.mdsal.binding.api.DataBroker dataBroker)
-
deleteL2GwDeviceUcastLocalMacsFromElan
public void deleteL2GwDeviceUcastLocalMacsFromElan(L2GatewayDevice l2GatewayDevice, java.lang.String elanName)
Delete l2 gateway device ucast local macs from elan.
Deletes macs from internal ELAN nodes and also on rest of external l2 gateway devices which are part of the ELAN.- Parameters:
l2GatewayDevice
- the l2 gateway device whose ucast local macs to be deleted from elanelanName
- the elan name
-
createItmTunnels
public static void createItmTunnels(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService itmRpcService, java.lang.String hwvtepId, java.lang.String psName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress tunnelIp)
-
getNodeIdFromDpnId
public static java.lang.String getNodeIdFromDpnId(java.math.BigInteger dpnId)
-
scheduleAddDpnMacInExtDevices
public void scheduleAddDpnMacInExtDevices(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses)
-
scheduleAddDpnMacsInExtDevice
public com.google.common.util.concurrent.FluentFuture<? extends @NonNull org.opendaylight.mdsal.common.api.CommitInfo> scheduleAddDpnMacsInExtDevice(java.lang.String elanName, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.PhysAddress> staticMacAddresses, L2GatewayDevice externalDevice)
-
scheduleDeleteLogicalSwitch
public void scheduleDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)
-
scheduleDeleteLogicalSwitch
public void scheduleDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName, boolean clearUcast)
-
cancelDeleteLogicalSwitch
public void cancelDeleteLogicalSwitch(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId hwvtepNodeId, java.lang.String lsName)
-
getElanDpns
public @NonNull java.util.Collection<DpnInterfaces> getElanDpns(java.lang.String elanName)
-
getL2GwDeviceLocalMacs
public java.util.List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress> getL2GwDeviceLocalMacs(java.lang.String elanName, L2GatewayDevice l2gwDevice)
Gets the l2 gw device local macs.- Parameters:
elanName
- name of the elanl2gwDevice
- the l2gw device- Returns:
- the l2 gw device local macs
-
-