...
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 is rule 1 and does not #Break Ciscoso IOScontinues XRto Softwareapply (Cisco IOS XRv Series), Version 5.1.1the OS_Rules 1 => { 'IF' # Cisco IOS XR Software (Cisco ASR9K Series); Version 5.2.4[Default]\n\nCopyright (c) 2015 by Cisco Systems; Inc. => { [ '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.version' => qr/^(\d+\.\d+)\.\d+$/transport' => 'os_info.major' ], [ 'os_info.major' => qr/(.+)/ => "os_info.train" ], ]SSH', 'connection_info.credential_set' => 'default_username_password', }, BREAK => 'truefalse', }, |
Checking operationÂ
...