ixWriteConfigToHardware
ixWriteConfigToHardware - writes streams, filters, protocol configuration on ports in hardware
SYNOPSIS
ixWriteConfigToHardware portList [-verbose | -noVerbose]
[-writeProtocolServer | -noProtocolServer]
DESCRIPTION
The ixWriteConfigToHardware command commits the configuration of streams, filters, and protocol information on a group of ports to hardware. This command is useful when a large number of ports are involved.
ARGUMENTS
portList
(By reference) The list of ports in one of the following formats:
one2oneArray, one2manyArray, many2oneArray, many2manyArray
Or a reference to a list. For example, pl after
set pl {{1 1 1} {1 1 2} {1 1 3} {1 1 4}} -or-
set pl {1,1,1 1,1,2 1,1,3 1,1,4}
-verbose | -noVerbose
(Optional). Either noVerbose (default) or verbose, which appends a status message to the log file.
-writeProtocolServer | -noProtocolServer
(Optional) -writeProtocolServer stops the protocol server and writes all associated objects (default). -noProtocolServer has no effect on the protocol server and does not update any protocol server objects.
RETURNS
0
No error; the command was successfully delivered to the IxServer.
1
Error; the command was delivered to the IxServer but it could not process the message.
EXAMPLES
package require IxTclHal
set host galaxy
set username user
# Check if we're running on UNIX - connect to the TCL Server
# which must be running on the chassis
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
# Now connect to the chassis
if [ixConnectToChassis $host]
{
ixPuts $::ixErrorInforeturn 1
}
# Get the chassis ID to use in port lists
set chas [ixGetChassisID $host]
set cardA 1
set portA 1
set cardB 1
set portB 2
# Examples of four ways to make a port list
set portList1 [list $chas,$cardA,$portA]
set portList2 [list $chas,$cardA,$portA $chas,$cardB,$portB]
set portList3 [list [list $chas $cardA $portA] [list $chas $cardB $portB]]
set portList4 [list [list $chas,$cardA,$portA] [list $chas,$cardB,$portB]]
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
# Take ownership of the ports we'll use
if [ixTakeOwnership $portList4] {
ixPuts $::ixErrorInfo
return 1
}
map new -type one2one
map config -type one2one
map add $chas $cardA $portA $chas $cardB $portB
map add $chas $cardB $portB $chas $cardA $portA
port setDefault
port set $chas $cardA $portA
port set $chas $cardB $portB
if {[ixWriteConfigToHardware portList1] != 0} {
ixPuts "Could not write config to $portList1"
}
if {[ixWriteConfigToHardware portList2] != 0} {
ixPuts "Could not write config to $portList2"
}
if {[ixWriteConfigToHardware portList3] != 0} {
ixPuts "Could not write config to $portList3"
}
if {[ixWriteConfigToHardware portList4] != 0} {
ixPuts "Could not write config to $portList4"
}
if {[ixWriteConfigToHardware one2oneArray] != 0} {
ixPuts "Could not write config to one2oneArray"
}
# Let go of the ports that we reserved
ixClearOwnership $portList4
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}