=head1 NAME Net::CLI::Interact::Manual::Phrasebook - List of Supported CLIs =head1 INTRODUCTION The bundled phrasebook includes support for a variety of network device CLIs. Many were contributed by users of the module. If you set up a new CLI dictionary, please consider contributing it back! The phrasebook specification is given in L. For each supported CLI, there is a name which must be passed in the C option to L's C method. After that, you can call the included Macros, and the module will use the included Prompt to match the current state of the CLI. More information is available in the L and L. Below is a list of all current bundled CLI dictionaries. Each lists its name, the available Prompts, Macros and Continuations, and from which other CLI dictionaries it inherits. IOS # Cisco IOS CatOS # for older, pre-IOS Cisco devices PIXOS # for PIX OS-based devices PIXOS7 # Slightly different commands from other PIXOS versions FWSM # currently the same as 'PIXOS' FWSM3 # for FWSM Release 3.x devices (slightly different to FWSM 2.x) JunOS # Juniper JUNOS support HP # HP support Nortel # Nortel support ExtremeOS # Extreme Networks support Foundry # Foundry/Brocade device support Bash # GNU Bourne-Again SHell (i.e. most linux systems) =head1 PERSONALITIES =head2 Bash This personality goes by the name of C. Prompts are C, C, C and C. The C prompt works either for an initial SSH connection, or a C request. Macros are C, C, and C. The C macro issues a C request to become the root user. =head2 Cisco This personality goes by the name of C and provides a basis for many other CLI dictionaries. Prompts are C, C, C, C, and C. Macros are C, C, C, C, and C. =head2 CatOS This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Prompt. Additionally it also provides the C Macro to set the terminal page size. =head2 ExtremeOS This personality goes by the name of C and inherits from the C dictionary. Additional Prompts are C, C, C, C, and C. Additional Macros are C, C, and C. =head2 Foundry / Brocade This personality goes by the name of C and inherits from the C dictionary. Before connecting to the device you probably want to set the output separator to be: $nci->transport->ors("\r\n"); For users of L this should be: $session_obj->nci->transport->ors("\r\n"); =head2 IOS This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Macro to set the terminal page size. =head2 HP This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C and C Prompts. Additionally it provides C and C Macros. =head2 JunOS This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C, C, and C Prompts. Additionally it also provides the C and C Macros. =head2 Nortel This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Prompt. =head2 PIXOS This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Macro to set the terminal page size. It can be used in its own right for Cisco PIX firewalls, but is also used as a base for other dictionaries. =head2 PIXOS 7 This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Macro to set the terminal page size. =head2 FWSM This personality goes by the name of C and inherits from the C dictionary. It provides no further functionality, as Cisco FWSM software version 1 and 2 was the same as the PIX OS. =head2 FWSM 3 This personality goes by the name of C and inherits from the C dictionary. Additionally it provides the C Macro to set the terminal page size. =head1 SUPPORTING A NEW DEVICE In order to support a new device, particularly for the L module, there is a basic set of prompts and macros you must create. =head2 Required Prompts With SSH, no C prompt is required, but for other transports you should include a prompt named C which matches the "C" prompt presented by the device. # example only! prompt user match /[Uu]sername/ With all transports you must provide a C prompt which matches the "C" prompt presented by the device. # example only! prompt pass match /[Pp]assword: ?$/ The last essential prompt is of course a simple command line prompt match, and this should be named C. # example only! prompt generic match /> ?$/ =head2 Desirable Prompt and Macros To cleanly disconnect from your device session, you might want to include a macro named C with the relevant command. Note there is no need for a C statement in this macro, as the device should have detached! # example only! macro disconnect send exit For paging support, include either only a C macro, or two macros named C and C, depending on what the device requires. In all cases, there must be one substitution ("C<%s>") which is where the number of page lines will be inserted into the command. # example only! macro paging send terminal length %s For privileged mode (super-user) support, include a prompt named C first, and then include macros named C and C to enter and leave the mode, respectively. Note that both macros will require explicit match statements, because the prompt encountered I issuing the command will be different to that encountered before. # example only! prompt privileged match /# ?$/ macro begin_privileged send enable match user or pass or privileged macro end_privileged send disable match generic Similarly for configure mode, include a prompt named C first, and then include macros named C and C to enter and leave the mode, respectively. Note that both macros will require explicit match statements, because the prompt encountered I issuing the command will be different to that encountered before. # example only! prompt configure match /\(config[^)]*\)# ?$/ macro begin_configure send configure terminal match configure macro end_configure send exit match privileged =cut