Debian Codegraph @

ncclient/devices/iosxr.py

raw
1 """
2 Handler for Cisco IOS-XR device specific information.
3
4 Note that for proper import, the classname has to be:
5
6 "<Devicename>DeviceHandler"
7
8 ...where <Devicename> is something like "Default", "Nexus", etc.
9
10 All device-specific handlers derive from the DefaultDeviceHandler, which implements the
11 generic information needed for interaction with a Netconf server.
12
13 """
14
15
16 from .default import DefaultDeviceHandler
17
18 def iosxr_unknown_host_cb(host, fingerprint):
19 #This will ignore the unknown host check when connecting to IOS-XR devices
20 return True
21
22 class IosxrDeviceHandler(DefaultDeviceHandler):
23 """
24 Cisco IOS-XR handler for device specific information.
25
26 """
27 def __init__(self, device_params, ignore_errors=None):
28 super(IosxrDeviceHandler, self).__init__(device_params, ignore_errors)
29
30 def add_additional_ssh_connect_params(self, kwargs):
31 kwargs['unknown_host_cb'] = iosxr_unknown_host_cb
32
33 def perform_qualify_check(self):
34 return False