Class PathManagerProvider

java.lang.Object
org.opendaylight.bgpcep.pcep.server.provider.PathManagerProvider
All Implemented Interfaces:
AutoCloseable, EventListener, ConnectedGraphTrigger, org.opendaylight.mdsal.binding.api.TransactionChainListener

public final class PathManagerProvider extends Object implements org.opendaylight.mdsal.binding.api.TransactionChainListener, AutoCloseable, ConnectedGraphTrigger
This Class implements the Path Manager in charge of Managed TE Node and Managed TE Path.
Author:
Olivier Dugeon
  • Constructor Summary

    Constructors
    Constructor
    Description
    PathManagerProvider(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey> topology, NetworkTopologyPcepService ntps, DefaultPceServerProvider pceServerProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    checkManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
    Check if a Managed TE Node is controlled by the Path Manager.
    void
    Remove the Path Manager Server and destroy the transaction chain.
    createManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, PcepNodeConfig pccNode)
    Create new Managed TE Node.
    createManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp cfgLsp)
    Create a new Managed TE Path.
    void
    deleteManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId)
    Delete Managed TE Node.
    void
    deleteManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
    Remove TE Path to existing Managed Node if TE Path has been initiated by the PCE server.
    void
    disableManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
    Call when a PCC disconnect from the PCE to disable the corresponding Managed TE Node.
    void
    onTransactionChainFailed(org.opendaylight.mdsal.binding.api.TransactionChain transactionChain, org.opendaylight.mdsal.binding.api.Transaction transaction, Throwable cause)
     
    void
    onTransactionChainSuccessful(org.opendaylight.mdsal.binding.api.TransactionChain transactionChain)
     
    registerManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
    Register a PCC as a new Managed TE Node.
    registerTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp rptPath, PathType ptype)
    Register Reported LSP as a TE Path for the PCC identified by its Node ID.
    protected void
    Reset the transaction chain only so that the PingPong transaction chain will become usable again.
    void
    setTePathFailed(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
    Indicate that the TE Path is failed following reception of a PCE Error message.
    void
    syncManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
    Synchronized Managed TE Node.
    void
    unregisterTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
    Remove TE Path from Operational Data Store and Path Manager.
    void
    verifyEdge(Collection<ConnectedEdgeTrigger> triggers, @Nullable ConnectedEdge current, @Nullable Edge next)
    This method verifies the next Edge attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.
    void
    verifyVertex(Collection<ConnectedVertexTrigger> triggers, @Nullable ConnectedVertex current, @Nullable Vertex next)
    This method verifies the next Vertex attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PathManagerProvider

      public PathManagerProvider(org.opendaylight.mdsal.binding.api.DataBroker dataBroker, org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier<org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.Topology,org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.TopologyKey> topology, NetworkTopologyPcepService ntps, DefaultPceServerProvider pceServerProvider)
  • Method Details

    • close

      @PreDestroy public void close()
      Remove the Path Manager Server and destroy the transaction chain.
      Specified by:
      close in interface AutoCloseable
    • resetTransactionChain

      protected void resetTransactionChain()
      Reset the transaction chain only so that the PingPong transaction chain will become usable again. However, there will be data loss if we do not apply the previous failed transaction again
    • onTransactionChainFailed

      public void onTransactionChainFailed(org.opendaylight.mdsal.binding.api.TransactionChain transactionChain, org.opendaylight.mdsal.binding.api.Transaction transaction, Throwable cause)
      Specified by:
      onTransactionChainFailed in interface org.opendaylight.mdsal.binding.api.TransactionChainListener
    • onTransactionChainSuccessful

      public void onTransactionChainSuccessful(org.opendaylight.mdsal.binding.api.TransactionChain transactionChain)
      Specified by:
      onTransactionChainSuccessful in interface org.opendaylight.mdsal.binding.api.TransactionChainListener
    • createManagedTePath

      public ConfiguredLsp createManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp cfgLsp)
      Create a new Managed TE Path.
      Parameters:
      id - Managed TE Node Identifier to which the TE path is attached.
      cfgLsp - TE Path.
      Returns:
      new or updated TE Path i.e. original TE Path augmented by a valid computed route.
    • deleteManagedTePath

      public void deleteManagedTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
      Remove TE Path to existing Managed Node if TE Path has been initiated by the PCE server.
      Parameters:
      id - Managed Node ID where the TE Path is stored
      key - TE Path, as Key, to be removed
    • registerTePath

      public ManagedTePath registerTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLsp rptPath, PathType ptype)
      Register Reported LSP as a TE Path for the PCC identified by its Node ID.
      Parameters:
      id - Node ID of the Managed Node (PCC) which report this LSP
      rptPath - Reported TE Path
      Returns:
      Newly created or Updated Managed TE Path
    • unregisterTePath

      public void unregisterTePath(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
      Remove TE Path from Operational Data Store and Path Manager.
      Parameters:
      id - Node ID of the Managed Node which own this TE Path
      key - TE Path name
    • setTePathFailed

      public void setTePathFailed(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id, ConfiguredLspKey key)
      Indicate that the TE Path is failed following reception of a PCE Error message.
      Parameters:
      id - Node ID of the Managed Node which own this TE Path
      key - TE Path name
    • checkManagedTeNode

      public boolean checkManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
      Check if a Managed TE Node is controlled by the Path Manager.
      Parameters:
      id - Node ID of the Managed TE Node
      Returns:
      True if Managed TE Node exist, false otherwise
    • createManagedTeNode

      public ManagedTeNode createManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId, PcepNodeConfig pccNode)
      Create new Managed TE Node. This method is called by a new Managed Node is created in the Configuration Data Store. All TE Path associated to this Managed Node are also created. A new Managed Node, with TE Paths augmented with valid computed routes, is stored in the Operational Data Store.
      Parameters:
      nodeId - Managed TE Node Identifier
      pccNode - Path Computation Client
      Returns:
      New Managed TE Node.
    • registerManagedTeNode

      public ManagedTeNode registerManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
      Register a PCC as a new Managed TE Node. This method is called by the PCEP Topology Listener when a new PCC connects to the PCE Server.
      Parameters:
      id - Node ID of the PCC
      Returns:
      current or new Managed TE Node
    • syncManagedTeNode

      public void syncManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
      Synchronized Managed TE Node. Once PCC finished initial report of all LSP, its state change to Synchronized. This function update the Managed TE Node status, and then parse all reported LSPs to determine if: - There is missing LSPs that need to be setup - There is LSPs that need to be updated
      Parameters:
      id - Node ID of the Managed TE Node
    • deleteManagedTeNode

      public void deleteManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId nodeId)
      Delete Managed TE Node. This method is called when a Managed Node is removed from the Configuration Data Store. All initiated Managed TE Path own by this PCC are removed and corresponding Managed Node is removed from the Operational Data Store if it is not connected.
      Parameters:
      nodeId - Managed Node Identifier
    • disableManagedTeNode

      public void disableManagedTeNode(org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId id)
      Call when a PCC disconnect from the PCE to disable the corresponding Managed TE Node.
      Parameters:
      id - Managed Node ID
    • verifyVertex

      public void verifyVertex(Collection<ConnectedVertexTrigger> triggers, @Nullable ConnectedVertex current, @Nullable Vertex next)
      Description copied from interface: ConnectedGraphTrigger
      This method verifies the next Vertex attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.

      If current Vertex is null, this means that the Connected Vertex will be added in the Connected Graph. If next Connected Vertex is null, this means that the Connected Vertex will be deleted from the Connected Graph. Otherwise, this is an update of Vertex attributes.

      Specified by:
      verifyVertex in interface ConnectedGraphTrigger
      current - Next Connected Vertex to be installed in the Connected Graph
      next - Current Vertex installed in the Connected Graph
    • verifyEdge

      public void verifyEdge(Collection<ConnectedEdgeTrigger> triggers, @Nullable ConnectedEdge current, @Nullable Edge next)
      Description copied from interface: ConnectedGraphTrigger
      This method verifies the next Edge attributes against the current one to determine if is necessary to launch correction which are left at the discretion of the class which implements this method.

      If current Edge is null, this means that the Connected Edge will be added in the Connected Graph. If next Connected Edge is null, this means that the Edge will be deleted from the Connected Graph. Otherwise, this is an update of Edge attributes.

      Specified by:
      verifyEdge in interface ConnectedGraphTrigger
      current - Next Edge to be installed in the Connected Graph
      next - Current Edge installed in the Connected Graph