public final class InterVpnLinkUtil extends Object
Modifier and Type | Method and Description |
---|---|
static FirstEndpointState |
buildFirstEndpointState(FirstEndpointState original,
com.google.common.base.Optional<List<BigInteger>> new1stEndpointDpns,
com.google.common.base.Optional<Long> new1stEndpointLportTag) |
static FirstEndpointState |
buildFirstEndpointState(String vpnName,
List<BigInteger> dpnList,
long lportTag) |
static String |
buildInterVpnLinkIfaceName(String vpnName,
BigInteger dpnId) |
static InterVpnLinkState |
buildIvlStateFromOriginal(InterVpnLinkState original,
com.google.common.base.Optional<FirstEndpointState> new1stEndpointState,
com.google.common.base.Optional<SecondEndpointState> new2ndEndpointState,
com.google.common.base.Optional<String> errDescription)
Creates an InterVpnLinkState out of an existing one and modifying only the desired attributes.
|
static org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow |
buildLPortDispatcherFlow(String interVpnLinkName,
long vpnId,
int lportTag)
Builds a Flow to be installed into LPortDispatcher table, that matches on
SI=2 + vpnLinkEndpointPseudoPortTag and sends to FIB.
|
static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> |
buildLportDispatcherTableInstructions(long vpnId) |
static SecondEndpointState |
buildSecondEndpointState(SecondEndpointState original,
com.google.common.base.Optional<List<BigInteger>> new2ndEndpointDpns,
com.google.common.base.Optional<Long> new2ndEndpointLportTag) |
static SecondEndpointState |
buildSecondEndpointState(String vpnName,
List<BigInteger> dpnList,
long lportTag) |
static List<InterVpnLink> |
getAllInterVpnLinks(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
Retrieves all configured InterVpnLinks.
|
static List<InterVpnLinkState> |
getAllInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
Retrieves the States of all InterVpnLinks.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<InterVpnLink> |
getInterVpnLinkPath(String interVpnLinkName)
Retrieves the Instance Identifier that points to an InterVpnLink object
in MD-SAL.
|
static com.google.common.base.Optional<InterVpnLinkState> |
getInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
String interVpnLinkName)
Retrieves the State of an InterVpnLink.
|
static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<InterVpnLinkState> |
getInterVpnLinkStateIid(String vpnLinkName)
Retrieves the Instance Identifier that points to an InterVpnLinkState object
in MD-SAL.
|
static String |
getLportDispatcherFlowRef(String interVpnLinkName,
Integer lportTag)
Builds a flowRef to be assigned to the flow to be installed into
LPortDispatcher table.
|
static void |
handleStaticRoute(InterVpnLinkDataComposite interVpnLink,
String vpnName,
String destination,
String nexthop,
int label,
org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
IFibManager fibManager,
IBgpManager bgpManager) |
static List<com.google.common.util.concurrent.ListenableFuture<Void>> |
installLPortDispatcherTableFlow(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
String interVpnLinkName,
List<BigInteger> dpnList,
String vpnUuidOtherEndpoint,
Long lportTagOfOtherEndpoint)
Installs a Flow in LPortDispatcher table that matches on SI=2 and
the lportTag of one InterVpnLink's endpoint and sets the vrfTag of the
other endpoint and sends to FIB table.
|
static void |
removeIVpnLinkIfaceFromVpnFootprint(VpnFootprintService vpnFootprintService,
String vpnName,
String rd,
BigInteger dpnId)
Updates VpnToDpn map by removing the fake VpnInterface related to an
InterVpnLink in the corresponding DPNs.
|
static void |
updateInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker,
String vpnLinkName,
InterVpnLinkState.State state,
FirstEndpointState newFirstEndpointState,
SecondEndpointState newSecondEndpointState,
InterVpnLinkCache interVpnLinkCache)
Updates inter-VPN link state.
|
static void |
updateVpnFootprint(VpnFootprintService vpnFootprintService,
String vpnName,
String primaryRd,
List<BigInteger> dpnList)
Updates VpnToDpn map by adding a fake VpnInterface related to an
InterVpnLink in the corresponding DPNs.
|
public static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<InterVpnLink> getInterVpnLinkPath(String interVpnLinkName)
interVpnLinkName
- The name of the InterVpnLinkpublic static org.opendaylight.yangtools.yang.binding.InstanceIdentifier<InterVpnLinkState> getInterVpnLinkStateIid(String vpnLinkName)
vpnLinkName
- The name of the InterVpnLinkpublic static String buildInterVpnLinkIfaceName(String vpnName, BigInteger dpnId)
public static void updateVpnFootprint(VpnFootprintService vpnFootprintService, String vpnName, String primaryRd, List<BigInteger> dpnList)
vpnFootprintService
- VpnFootprintService service referencevpnName
- Name of the VPN to which the fake interfaces belongdpnList
- List of DPNs where the fake InterVpnLink interface must be addedpublic static void removeIVpnLinkIfaceFromVpnFootprint(VpnFootprintService vpnFootprintService, String vpnName, String rd, BigInteger dpnId)
vpnFootprintService
- VpnFootprintService service referencevpnName
- Name of the VPN to which the fake interfaces belongdpnId
- DPN where the fake InterVpnLink interface must be removed frompublic static FirstEndpointState buildFirstEndpointState(FirstEndpointState original, com.google.common.base.Optional<List<BigInteger>> new1stEndpointDpns, com.google.common.base.Optional<Long> new1stEndpointLportTag)
public static FirstEndpointState buildFirstEndpointState(String vpnName, List<BigInteger> dpnList, long lportTag)
public static SecondEndpointState buildSecondEndpointState(SecondEndpointState original, com.google.common.base.Optional<List<BigInteger>> new2ndEndpointDpns, com.google.common.base.Optional<Long> new2ndEndpointLportTag)
public static SecondEndpointState buildSecondEndpointState(String vpnName, List<BigInteger> dpnList, long lportTag)
public static InterVpnLinkState buildIvlStateFromOriginal(InterVpnLinkState original, com.google.common.base.Optional<FirstEndpointState> new1stEndpointState, com.google.common.base.Optional<SecondEndpointState> new2ndEndpointState, com.google.common.base.Optional<String> errDescription)
original
- InterVpnLinkState to start from.new1stEndpointState
- Sets this FirstEndpointState if presentnew2ndEndpointState
- Sets this SecondEndpointState if presenterrDescription
- Sets this ErrorDescription if presentpublic static void updateInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, String vpnLinkName, InterVpnLinkState.State state, FirstEndpointState newFirstEndpointState, SecondEndpointState newSecondEndpointState, InterVpnLinkCache interVpnLinkCache)
broker
- dataBroker service referencevpnLinkName
- The name of the InterVpnLinkstate
- Sets the state of the InterVpnLink to Active or ErrornewFirstEndpointState
- Updates the lportTag and/or DPNs of the 1st endpoint of the InterVpnLinknewSecondEndpointState
- Updates the lportTag and/or DPNs of the 2nd endpoint of the InterVpnLinkinterVpnLinkCache
- the InterVpnLinkCachepublic static List<com.google.common.util.concurrent.ListenableFuture<Void>> installLPortDispatcherTableFlow(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, String interVpnLinkName, List<BigInteger> dpnList, String vpnUuidOtherEndpoint, Long lportTagOfOtherEndpoint)
broker
- dataBroker service referencemdsalManager
- MDSAL API accessorinterVpnLinkName
- Name of the InterVpnLink.dpnList
- The list of DPNs where this flow must be installedvpnUuidOtherEndpoint
- UUID of the other endpoint of the InterVpnLinklportTagOfOtherEndpoint
- Dataplane identifier of the other endpoint of the InterVpnLinkpublic static org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow buildLPortDispatcherFlow(String interVpnLinkName, long vpnId, int lportTag)
interVpnLinkName
- The name of the InterVpnLinkvpnId
- Dataplane identifier of the VPN, the Vrf Tag.lportTag
- DataPlane identifier of the LogicalPort.public static String getLportDispatcherFlowRef(String interVpnLinkName, Integer lportTag)
interVpnLinkName
- The name of the InterVpnLinklportTag
- Dataplane identifier of the LogicalPortpublic static List<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> buildLportDispatcherTableInstructions(long vpnId)
public static List<InterVpnLinkState> getAllInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
broker
- dataBroker service referencepublic static com.google.common.base.Optional<InterVpnLinkState> getInterVpnLinkState(org.opendaylight.controller.md.sal.binding.api.DataBroker broker, String interVpnLinkName)
broker
- dataBroker service referenceinterVpnLinkName
- The name of the InterVpnLinkpublic static List<InterVpnLink> getAllInterVpnLinks(org.opendaylight.controller.md.sal.binding.api.DataBroker broker)
broker
- dataBroker service referencepublic static void handleStaticRoute(InterVpnLinkDataComposite interVpnLink, String vpnName, String destination, String nexthop, int label, org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, IFibManager fibManager, IBgpManager bgpManager) throws Exception
Exception
Copyright © 2019 OpenDaylight. All rights reserved.