proc ModifyIgmpHostVersionNgpf { deviceGroupName igmpVersion } { # Modifies all the igmp hosts in the given Device Group to # the given $igmpVersion. # # deviceGroupName: The exact spelling of the Device Group (Case sensitive) # igmpVersion: version1, version2, or version3 (Case sensitive) foreach topology [ixNet getList [ixNet getRoot] topology] { foreach deviceGroup [ixNet getList $topology deviceGroup] { set currentDgName [ixNet getAttribute $deviceGroup -name] if {$deviceGroupName == $currentDgName} { foreach ethernet [ixNet getList $deviceGroup ethernet] { foreach ipv4 [ixNet getList $ethernet ipv4] { foreach igmpHost [ixNet getList $ipv4 igmpHost] { set multiValue [ixNet getAttribute $igmpHost -versionType] puts "\nModifyIgmpHostVersionNgpf: $deviceGroup: igmpVersion:$igmpVersion" catch {ixNet setAttribute $multiValue/singleValue -value $igmpVersion} errMsg if {$errMsg != "::ixNet::OK"} { puts "\nError ModifyIgmpHostVersionNgpf: $errMsg" return 1 } ixNet commit } } } } } } return 0 }