<preamble_task> - Preamble Task Definition
<preamble_task> tag can be used in two places.
Firstly, under the
<proxy_parameters> tag it can be used to define commands that are run after a connection to a device is established but before a system task is run, i.e. user_add.
Here it is used to put a device into a more scripting friendly mode: turning of pagination of results, tell the device not to line wrap, etc.
<preamble_task> tag can be used under
<proxy_parameters> tag to define commands that are to be run before the connection is passed to the user.
A typical example of this might be elevating a user role using an
enable mode command.
The tag has the following attributes:
- Name (str) : This is the internal name of the task. This for legacy reasons the name of the task is
<preamble_task> tag contains a single
<commands> tag, which can then contain multiple
Any operation that can be done in a user task can be done in a preamble task.
Example: Putting a device into a scripting friendly mode
Here's a simple example of putting a device into a scripting friendly mode by setting the terminal length and width both to 0, meaning no limit.
<preamble_task> tag is used under the
1 2 3 4 5 6 7
Example: Putting a user proxy connection into admin mode
Used under the
<proxy_parameters> tag, here the command block checks if the user has the admin access token and if so then runs some commandsteps to enter enable mode:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15