Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Configuration Options

Credential Sets

...

Code Block
languageperl
%hash = ( 
 'empty' => { username => '', password => '' },
 'set1' => { username => 'testuser2', password => 'testpass2' }
);

 


Connections

Connections define which devices/nodes opConfig can connect to.  Each connection has 2 common hashes that help layout how the connection will be treated.  The definition of connection_info is fairly rigid, any other extra hash can be defined and information in that hash can be used to filter commands to run on that device in the command sets.  More will be explained on this later.

...

The info in os_info is defined by the discovery function of opConfig.  The settings defined in it are used to filter command sets as will be seen in the command sets section.

 


When opConfig does it's own discovery, it maps the operating system into a personality, here is that map:

Code Block
languageperl
my $os_personality_map = {
 'AlterPath' => 'unknown',
 'CatOS' => 'catos',
 'Cat2820' => 'catos',
 'Cat1900' => 'catos',
 'Darwin' => 'bash',
 'ExtremeXOS' => 'extremexos',
 'FastHub' => 'unknown',
 'Foundry' => 'foundry',
 'HP' => 'hp', 
 'IOS' => 'ios',
 'junos' => 'unknown',
 'NAMOS' => 'unknown',
 'NetScout' => 'unknown',
 'Nokia' => 'unknown',
 'nortel' => 'unknown',
 'ONS' => 'unknown',
 'PIX' => 'pixos',
 'fwsm' =>'fwsm',
 'fwsm3' => 'fwsm3',
 'pixos7' => 'pixos7', 
 'Solaris' => 'bash',
 'SwitchProbe' => 'unknown',
 'Linux' => 'bash',
 'VPN' => 'unknown',
 'Windows' => 'unknown',
 'Z_Unknown_Unix' => 'csh'
};

...


Command Sets

Each command set defines information used to filter out which devices/nodes the commands will be run on.  It also defines the actual commands to be run and if the commands should be grouped together into a single session/connection or be run on their own.

...

Code Block
languageperl
'IOS_DAILY' => {
 'os_info' => {
   'version' => '/12.2|12.4|15.0/',
   'os' => 'IOS'
 },
 'aging_info' => {
   'age' => 'forever'
 },
 'scheduling_info' => {
   'run_commands_on_separate_connection' => 'false'
 },
 commands => [
 {
   'tags' => 'config,version,troubleshooting, detect-change',
   'command' => 'show version',
   'privileged' => 'false',
   'multipage' => 'true',
   'run_command_on_separate_connection' => 'false',
   'command_filters' => [
     '/uptime is/'
   ]
 }
}} 

 


Defining which connections should be used by a command set

...

Code Block
languageperl
#to run all commands in a command set define this key to be true
'scheduling_info' => {
 'run_commands_on_separate_connection' => 'true'
},

# to run just a specific command on it's own
commands => [
 {
 'command' => 'show version',
 'run_command_on_separate_connection' => 'true',
 }]

...


Aging

Aging is not currently in use, look for more info about this in later versions

...