ixClearOwnership
ixClearOwnership - clears ownership of all the ports in the list
SYNOPSIS
ixClearOwnership [portList] [takeType]
DESCRIPTION
The ixClearOwnership command clears ownership of all the ports in the list.
ARGUMENTS
portList
(By value) The list of ports in one of the following formats:
One of the following literal strings, or a reference to a variable with the $ (for example, $pl after set pl ...)
{{1 1 1}}
{{1 1 1} {1 1 2} {1 1 3} {1 1 4}}
{{1 1 *} {1 2 1} {1 2 2}}
{1,1,* 1,2,1 1,2,2}
A value of ""(default) clears ownership of all Tcl owned ports.
takeType
(By value) (Optional) Valid values:
force: take regardless of whether the port is owned by someone else
notForce: (default) do not force ownership
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 req 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 $::ixErrorInfo
return 1
}
# Get the chassis ID to use in port lists
set chas [ixGetChassisID $host]
set portList1 {{1 1 1}}
set portList2 {{1 1 1} {1 1 2} {1 1 3} {1 1 4}}
set portList3 {{1 1 *} {1 2 1} {1 2 2}}
# Login before taking ownership
if [ixLogin $username] {
ixPuts $::ixErrorInfo
return 1
}
if {[ixClearOwnership $portList1] != 0} {
ixPuts "Could not clear ownership for $portList1\n"
}
if {[ixClearOwnership $portList2] != 0} {
ixPuts "Could not clear ownership for $portList2\n"
}
if {[ixClearOwnership $portList3 notForce] != 0} {
ixPuts "Could not clear ownership for $portList3\n"
}
# Let go of the ports that we reserved
ixClearOwnership $portList
# Disconnect from the chassis we're using
ixDisconnectFromChassis $host
# If we're running on UNIX, disconnect from the TCL Server
if [isUNIX] {
ixDisconnectTclServer $host
}