...
Code Block | ||||
---|---|---|---|---|
| ||||
10 => { 'IF' => { 'sysDescr' => qr/IOS XR/, }, 'SET' => { 'connection_info.personality' => 'ios', 'os_info.os' => 'IOS-XR', ### These two lines then SET SSH as the transport and the credential_set to use for username and password or SSH keys. 'connection_info.transport' => 'SSH', 'connection_info.credential_set' => 'default_username_password', ### ---- }, 'CAPTURE' => [ ......... ### One could also set ALL devices to use SSH etc with the following - ## Note: this # Cisco IOS XR Software (Cisco IOS XRv Series), Version 5.1.1 is rule 1 and does not Break so continues to apply the OS_Rules 1 => { # Cisco IOS XR Software (Cisco ASR9K Series); Version 5.2.4[Default]\n\nCopyright (c) 2015 by Cisco Systems; Inc. 'IF' => { [ 'sysDescr' => qr/Version (\d+\.\d+\.\d+)/ => 'os_info.version' ]\S/, ## Matches any sysDescr that is not blank or just a space # the train is the major version }, 'SET' => [ 'os{ 'connection_info.versiontransport' => qr/^(\d+\.\d+)\.\d+$/ => 'os_info.major' ], [ 'os_info.major' => qr/(.+)/ => "os_info.train" ], ]'SSH', 'connection_info.credential_set' => 'default_username_password', }, BREAK => 'truefalse', }, |
Checking operation
...