Script Control Commands

script-control

Syntax

script-control

Context

config>system

Description

This command enables the context to configure CLI script parameters.

script

Syntax

[no] script script-name [owner script-owner]

Context

config>system>script-control

Description

This command assigns a name and optional owner to a script text file that contains a list of CLI commands to be executed. The owner is an arbitrary string; it is not associated with an actual CLI user.

Multiple owners can be associated with a script name, and each script name/owner combination is unique.

The scripts are not authorized against the owner but can be configured to execute under a particular user context in order for authorization to be performed. See the 7705 SAR System Management Guide, ‟CLI Script Authorization Commands”, for information.

The no form of the command deletes the script name.

Default

no script

Parameters

script-name

the name of the script, up to 32 characters in length

script-owner

the name of the script owner, up to 32 characters in length

Default

‟TiMOS CLI”

location

Syntax

location file-url

no location

Context

config>system>script-control>script

Description

This command specifies the location of the script text file, either on the local compact flash or on a remote FTP server.

The no form of the command removes the location.

Default

no location

Parameters

file-url

the local or remote URL for the file location (see Table: URL Types and Syntax for parameter descriptions)

script-policy

Syntax

[no] script-policy policy-name [owner policy-owner]

Context

config>system>script-control

Description

This command configures a script policy. The script policy is assigned a name and optional owner. The owner is an arbitrary string; it is not associated with an actual CLI user.

Multiple owners can be associated with a script policy, and each script policy name/owner combination is unique.

A script policy cannot be shut down while a running history exists for that policy. The script policy must be shut down before the script file location can be changed.

Default

no script-policy

Parameters

policy-name

the name of the script policy, up to 32 characters in length

policy-owner

the name of the script policy owner, up to 32 characters in length

Default

‟TiMOS CLI”

expire-time

Syntax

expire-time {seconds | forever}

Context

config>system>script-control>script-policy

Description

This command configures the maximum length of time to keep the run history status entry from a script run.

Default

expire-time 3600

Parameters

seconds

length of time to keep the run history status entry, in seconds

Values

0 to 21474836

forever

specifies to keep the run history status entry indefinitely

lifetime

Syntax

lifetime {seconds | forever}

Context

config>system>script-control>script-policy

Description

This command configures the maximum length of time that a script may run.

Default

lifetime 3600

Parameters

seconds

the maximum length of time that a script may run, in seconds

Values

0 to 21474836

forever

specifies to allow a script to run indefinitely

max-completed

Syntax

max-completed unsigned

Context

config>system>script-control>script-policy

Description

This command specifies the maximum number of script run history status entries to keep.

The system maintains the script run history table, which has a maximum size of 255 entries. Entries are removed from this table when the max-completed or expire-time thresholds are crossed. If the table reaches the maximum value, no further scripts are run until older run history entries expire (because of the expire-time setting), or entries are manually cleared.

Default

max-completed 1

Parameters

unsigned

the maximum number of script run history status entries to keep

Values

1 to 1500

results

Syntax

results file-url

no results

Context

config>system>script-control>script-policy

Description

This command specifies the location where the system stores the results of the script run, either on a local compact flash or on an FTP server.

When a script is run, the results are stored in the specified location, and a date and time suffix is added to the filename in the format yyyymmdd-hhmmss.μμμμμμ.out. The microseconds are padded to 6 characters with leading zeros.

The no form of the command removes the file location from the configuration. Scripts do not execute if there is no results file location defined.

Default

no results

Parameters

file-url

the local or remote URL for the results file location (see Table: URL Types and Syntax for parameter descriptions)

script

Syntax

script script-name [owner script-owner]

no script

Context

config>system>script-control>script-policy

Description

This command associates the script defined under the config>system>script-control context with this script policy.

The no form of the command removes the script from the script policy.

Default

no script

Parameters

script-name

the name of the defined script

script-owner

the name of the defined script owner associated with the script name