proc CreateNewDeviceGroupNgpfHlt { deviceGroupParams } { # How to use this from a script: # set deviceGroup1(topo1,-topology_handle) $topology1(portHandle) # set deviceGroup1(topo1,-device_group_multiplier) 5 # set deviceGroup1(topo1,-device_group_name) "Ipv4 Tx-1" # set deviceGroup1(topo1,-device_group_enabled) 1 # set deviceGroup1(topo1,protocolName) "Ethernet" # set topo1DeviceGroup1Keys [CreateNewDeviceGroupNgpfHlt ::deviceGroup1] # set deviceGroup1(topo1,groupHandle) [keylget topo1DeviceGroup1Keys device_group_handle] upvar $deviceGroupParams params puts "\nCreateNewDeviceGroupNgpfHlt" foreach {properties values} [array get params *] { set property [lindex [split $properties ,] end] # Using regexp to parse out $property with a dash because only dashes # in front of a parameter is a hlt parameter. if {[regexp -- "-" $property]} { append paramList "$property $values " } } set topoDeviceGroupStatus [eval ::ixiangpf::topology_config $paramList] if {[keylget topoDeviceGroupStatus status] != $::SUCCESS} { puts "\nError CreateNewDeviceGroupNgpfHlt: $topoDeviceGroupStatus" return 1 } return $topoDeviceGroupStatus }