fnss.netconfig.capacities.get_capacities — FNSS 0.7.0 documentation

# fnss.netconfig.capacities.get_capacities

`get_capacities`(topology)

  Returns a dictionary with all link capacities.

  Parameters: | topology : Topology The topology whose link delays are requested
  Returns: | capacities : dict Dictionary of link capacities keyed by link.

  Examples

      >>> import fnss
      >>> topology = fnss.Topology()
      >>> topology.add_path([1,2,3])
      >>> fnss.set_capacities_constant(topology, 10, 'Mbps')
      >>> capacity = get_capacities(topology)
      >>> capacity[(1,2)]
      10