proc GetVportMappingToPhyPort { portList} { # Search all vport for the port number. # Port format = [list [$ixChassisIp $card $port] ...] set vportList [ixNet getList [ixNet getRoot] vport] if {$vportList == ""} { return 0 } set vportPhyPortList {} foreach vport $vportList { set connectedTo [ixNet getAttribute $vport -connectedTo] set chassis [lindex [lindex [split [lindex [split $connectedTo /] 2] :] end] 0] set card [lindex [split [lindex [split $connectedTo /] 3] :] end] set portNum [lindex [split [lindex [split $connectedTo /] 4] :] end] set port "$chassis $card $portNum" puts "GetVportMapping: $portList $port" #if {$portList == $port} { # append vportPhyPortList "$vport " #} if {[lsearch -regexp $portList $port] != -1} { append vportPhyPortList "$vport " } } return $vportPhyPortList }