C Device Scripts

Appendix C

Introduction

When using the Device Scripting feature of PerleVIEW, you need to provide a script which will be deployed to each of the selected devices. This script will be composed of “CLI” (Command Line Interface) commands.

PerleVIEW provides a “slot macro” that will enable you to replace any CLI command which contains slot# as a parameter with the following macros ({CM100}, {CM1000}, {CM110}, {CM1110ANY}, {CM100MM}, {CM1000MM}, {CM1110}, {CM1110SFP}, {CM10G}, {CM10GT}, {EX-1CM} or {CM4GPT}).You can insert the “slot macro” in your script so that if the object (i.e. CM-100) exists in multiple slots on a given device, the command line will be repeated multiple times with each line having the “slot macro” replaced with the slot number corresponding to each slot the module is in.

For example:

set slot 1 cm-1110 module link-mode smart-link-passthrough would be:

set slot {CM1110ANY} cm-1110 module link-mode smart-link-passthrough

For a listing of the CLI commands available, please see the “MCR-MGT Management Module CLI Guide.

This appendix will describe commands for which the behavior when deployed via the PerleVIEW Device Scripting feature is slightly modified than that which is described in the guide.

Commands which are not supported will be discarded by the device.

The following commands are graphical in nature and will therefore not be supported in the Device Scripting mode of operation.

menu, screen, help

The following commands would cause the device to immediately reboot and therefore would not allow the Device Scripting function to terminate gracefully. They are not supported.

reboot, reset factory, chassis reset,

The following commands are interactive in nature and will therefore not be supported in the Device Scripting mode of operation.

admin, “?”, “tab”, “ESC”

Most of the commands which require the entry of a password will prompt the user for the password and then ask the user to re-enter the password to ensure that they typed it in correctly. If these commands are used within the Device Scripting feature of PerleVIEW, the interactive prompting for password would fail. To allow the command to be used in an automated scripting mode, commands which issue a prompt for passwords will be modified to add an additional parameter for the password. The command will fail if the password parameter is not included when used in conjunction with the Device Scripting function. When included, the password parameter will be used to include the password on the command line instead of having the device prompt for it. The following commands have been modified to include the new password parameter.

Command:add user

141

Page 141
Image 141
Perle Systems 5500320-12 manual Device Scripts, Introduction