proc ModifyOspfRouteRanges { portList ospfRouteRanges } { # portList = One port or a list of ports in format of: "1/2 1/3 1/5" # ospfRouteRanges = A list of group counts for each port: "100 200 300" # For example: # If modifying one port, then: 1/1 200 # If modifying two ports, then: "1/1 1/2" "100 200" if {[llength $portList] != [llength $ospfRouteRanges]} { puts "\nError: ModifyOspfRouteRanges: The number of portList and ospfRouteRanges are not the same" return 1 } for {set index 0} {$index < [llength $portList]} {incr index} { set port [lindex $portList $index] set vport [GetVportMapping $port] foreach ospfRouteNumber [ixNet getList $vport/protocols/ospf router] { puts "\nindex=$index ospfRouterNumber= $ospfRouteNumber $vport" foreach ospfRouteRangeNumber [ixNet getList $ospfRouteNumber routeRange] { puts "\nModifyOspfRouteRanges: $port ospfRouteRanges=[lindex $ospfRouteRanges $index]" ixNet setAttribute $ospfRouteRangeNumber -numberOfRoutes [lindex $ospfRouteRanges $index] ixNet commit } } } return 0 }