Link
Oktopus

Routing API.

The operator uses this API by creating and modifying a routing object. Unlike the Session API, the Routing API defines node and link constraints and network-wide objectives. Moreover, it allows the operator to change how Oktopus calculates costs and consumes network resources by implementing cost and usage functions.

Add network link constraint.

  • Parameters

    • link (Link) – Network link object.

    • name – The name of the constraint.

    • value (int) – The value of the constraint.

Add custom link cost function.

  • Parameters

    • link (Link) – Network link object.

    • fn (function) – The custom link cost function.

Add custom link usage function.

  • Parameters

    • link (Link) – Network link object.

    • fn (function) – The custom link usage function.

add_node_constraint(node, srv, name, value)

Add network node constraint.

  • Parameters

    • node (Node) – Network node object.

    • srv (Service) – Network service function.

    • name – The name of the constraint.

    • value (int) – The value of the constraint.

add_node_cost_fn(node, srv, name, fn)

Add custom node cost function.

  • Parameters

    • node (Node) – Network node object.

    • srv – Service object.

    • name – Network service name.

    • fn (function) – The custom node cost function.

add_node_usage_fn(node, srv, name, fn)

Add custom node usage function.

  • Parameters

    • node (Node) – Network node object.

    • srv – Service object.

    • name – Network service name.

    • fn (function) – The custom node usage function.

add_objective(name)

Add network objective.

Current objective includes ‘minmaxlinkload’, ‘minroutingcost’ and ‘minmaxnodeload’, ‘mindelay’.

  • Parameters

    • name – The name of the objective.