What is a personality?
A personality tells opConfig (or more precisely, the lower-level module Net::Appliance::Session) how to interact with a device, how to know when the connection is ready for the username or password, how to enter privileged mode, what state the current connection is in, and so on.
Personalities are defined by phrasebooks, the name of the folder containing the phrasebook defines the name of the personality.
What is a phrasebook?
A phrasebook is a file named "pb
" that contains a list of prompts and macros, and the name of the directory the phrasebook resides in will be its personality name. Phrasebooks may be built up hierarchically from data in multiple subdirectories; e.g. a phrasebook "deeper down" in the hierarchy has the ability to override settings loaded from the parent other directories "higher up".
...
Macro | |
---|---|
macro begin_privileged | commands to send to enter privileged mode, followed by the prompt to expect |
macro end_privileged | commands to send to exit privileged mode, followed by the prompt to expect |
macro disconnect | commands to send to end the terminal session |
macro paging | commands to change the pager |
Creating a new phrasebook
To create a new phrasebook, make a new directory in the phrasebooks directory hierarchy located at /usr/local/omk/conf/phrasebooks
, and place a text file named pb inside of it. You now have a new personality/phrasebook with the name of the new directory that was created. If the directory was created at the base of the hierarchy the pb is truly empty and defines nothing, if it was in a subdirectory then the pb currently has the contents of the base directories pb.
...
Node creation in opConfig is documented HERE: opConfig Configuration Guideadding nodes and credentials#AddingorModifyingNodes
Second - Set the personality to the new personality created.
...