proc ModifyMldGroupRanges { portList mldGroupRanges } { # portList = One port or a list of ports in format of: "1/2 1/3 1/5" # mldGroupCount = 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 $mldGroupRanges]} { puts "\nError: ModifyMldGroupRanges: The number of portList and mldGroupRanges 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 mldHostNumber [ixNet getList $vport/protocols/mld host] { puts "\nindex=$index mldHostNumber= $mldHostNumber $vport" foreach mldHostGroupNumber [ixNet getList $mldHostNumber groupRange] { puts "\nModifyMldGroupRanges: $port mldGroupRanges=[lindex $mldGroupRanges $index]" ixNet setAttribute $mldHostGroupNumber -groupCount [lindex $mldGroupRanges $index] ixNet commit } } } return 0 }