Script Control Commands

script-control

Syntax

script-control

Context

config>system

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

Commands in this context configure command script parameters.

script-policy

Syntax

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

Context

config>system>script-control

config>system>cron>schedule

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

This command is used to configure the CLI script policy.

Parameters

policy-name

Specifies the name of the policy. Can be up to 32 characters.

owner policy-owner

Specifies the name of the policy owner, up to 32 characters. The owner is an arbitrary name and not necessarily a username. Commands in the scripts are not authorized against the owner. The configure system security cli-script authorization x cli-user command determines the user context against which commands in the scripts are authorized.

Default

‟TiMOS CLI”

expire-time

Syntax

expire-time {seconds | forever}

Context

config>system>script-control>script-policy

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

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

Default

expire-time 3600

Parameters

seconds

Specifies the 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

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

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

Default

lifetime 3600

Parameters

seconds

Specifies the maximum amount 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

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

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

Default

max-completed 1

Parameters

unsigned

Specifies the maximum number of script run history status entries to keep.

Values

1 to 1500

Default

1

results

Syntax

results file-url

no results

Context

config>system>script-control>script-policy

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

This command configures the location where the system writes the output of an event script’s execution.

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

Default

no results

Parameters

file-url

Specifies the location to send CLI output from script runs. The file-url is a location, directory, and filename prefix to which a data and timestamp suffix is added when the results files are created during a script run, as follows: file-url_YYYYMMDD-hhmmss.uuuuuu.out where:

YYYYMMDD — date hhmmss — hours, minutes, and seconds uuuuuu — microseconds (padded to 6 characters with leading zeros)

Values

file-url — local-url | remote-url

local-url — [cflash-id/] [file-path]

200 chars maximum, including cflash-id

directory length 99 characters maximum each

remote url — [{ftp:// | tftp://}login:password@remote-location/][file-path] 255 characters maximum directory length 99 characters maximum each

remote-location — [hostname | ipv4-address | ipv6-address]

ipv4-addressa.b.c.d

ipv6-address — x:x:x:x:x:x:x:x[-interface]

  • x:x:x:x:x:x:d.d.d.d[-interface]
  • x — 0 to FFFF (hexadecimal)
  • d — 0 to 255 (decimal)

interface — 32 characters maximum, for link local addresses

cflash-id — cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, cf2-B:, cf3:, cf3-A:, cf3-B:

script

Syntax

script script-name [owner script-owner]

no script

Context

config>system>script-control>script-policy

config>system>script-control

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

This command configures a script to be run.

The no form of this command removes the script.

Default

no script

Parameters

script-name

Specifies the name of the script, up to 32 characters.

script-owner

Specifies the name of the script owner, up to 32 characters.

The owner is an arbitrary name and not necessarily a username. Commands in the scripts are not authorized against the owner. The configure system security cli-script authorization x cli-user command determines the user context against which commands in the scripts are authorized.

Default

‟TiMOS CLI”

location

Syntax

location file-url

no location

Context

config>system>script-control>script

Platforms

7210 SAS-D, 7210 SAS-Dxp, 7210 SAS-K 2F1C2T, 7210 SAS-K 2F6C4T, and 7210 SAS-K 3SFP+ 8C

Description

This command identifies the location of a script to be scheduled.

The no form of this command removes the location.

Default

no location

Parameters

file-url

Specifies the location to search for scripts.

Values

file-url — local-url | remote-url

local-url — [cflash-id/] [file-path]

200 chars maximum, including cflash-id

directory length 99 characters maximum each

remote url — [{ftp:// | tftp://}login:password@remote-location/][file-path] 255 characters maximum directory length 99 characters maximum each

remote-location — [hostname | ipv4-address | ipv6-address]

ipv4-addressa.b.c.d

ipv6-address — x:x:x:x:x:x:x:x[-interface]

  • x:x:x:x:x:x:d.d.d.d[-interface]
  • x — 0 to FFFF (hexadecimal)
  • d — 0 to 255 (decimal)

interface — 32 characters maximum, for link local addresses

cflash-id — cf1:, cf1-A:, cf1-B:, cf2:, cf2-A:, cf2-B:, cf3:, cf3-A:, cf3-B: