serviceManager
serviceManager - manage a multiuser session
SYNOPSIS
serviceManager sub-command options
DESCRIPTION
Most intelligent Ixia ports run the Linux Operating system. Software may be developed for these ports using the guidelines documented in the Ixia Linux SDK Guide. Such software must be combined in a set of files called a package and downloaded to a set of ports. Refer to serviceManager for an overview of this command and details about package formats. Note this command is only valid in Windows based environments.
The port command's isValidFeature sub-command may be used to determine if a given port runs Linux. Use the following sequence:
if [port isValidFeature $chas $card $port portFeatureIxRouter] {
... port runs Linux ...
}
STANDARD OPTIONS
none
COMMANDS
The serviceManager command is invoked with the following sub-commands. If no sub-command is specified, returns a list of all sub-commands available.
serviceManager deletePackage packageList portGroupId
Causes the packages included in packageList to be deleted from the ports included in portGroupId. The packageList is a space or comma separated list of package names. For example: `package1,package2'. The portGroupId is the ID used in the construction of a port group in the portGroup create command. Specific errors are:
- No connection to a chassis
- Invalid port list
serviceManager downloadPackage packageList portGroupId
Causes the packages included in packageList to be downloaded and started by the ports included in portGroupId. The packageList is a space or comma separated list of package names. For example: `package1,package2'. The portGroupId is the ID used in the construction of a port group in the portGroup create command. Specific errors are:
- No connection to a chassis
- Invalid port list
- One or more packages could not be found
- One or more packages were in improper format
serviceManager getInstalledPackages chassisID cardID portID
Returns a comma separated list of packages installed on the port. Specific errors are:
- No connection to a chassis
- Invalid port
EXAMPLES
package require IxTclHal
set host localhost
set username user
# Assume card 1 is a card that supports Linux
set card 1
set port 1
# We'll use this port group
set portGroup 4242
# Package to be downloaded
set packageList [list "sample"]
# If we're on Unix, connect through Tcl Server
if [isUNIX] {
if [ixConnectToTclServer $host] {
ixPuts "Could not connect to $host"
return 1
}
}
package require IxTclServices
# Connect to the chassis
if [ixConnectToChassis $host] {
ixPuts $::ixErrorInfo
return 1
}
# Get resulting ID
set chas [ixGetChassisID $host]
# Make sure that there's nothing in the port group
# Then put the single port in it
portGroup destroy $portGroup
if [portGroup create $portGroup] {
ixPuts "Could not create port group"
return 1
}
if [portGroup add $portGroup $chas $card $port] {
ixPuts "Could not add port group"
return 1
}
# Make sure that this port runs Linux
if {[port isValidFeature $chas $card $port \
portFeatureIxRouter] == 0} {
ixPuts "$chas:$card does not have a local CPU"
return 1
}
# Download the package to the prt
if [serviceManager downloadPackage $packageList $portGroup] {
ixPuts "Could not download package"
return 1
}
# Check that it's there
ixPuts -nonewline "Installed packages are: "
ixPuts [serviceManager getInstalledPackages $chas $card $port]
# And then remove it and check again
if [serviceManager deletePackage $packageList $portGroup] {
ixPuts "Could not delete package"
return 1
}
ixPuts -nonewline "Installed packages are: "
ixPuts [serviceManager getInstalledPackages $chas $card $port]