Beispiel #1
0
 def _make_switch_device(self):
     patcher = mock.patch.object(
         netmiko_devices.netmiko, 'platforms', new=['base'])
     patcher.start()
     self.addCleanup(patcher.stop)
     device_cfg = {'device_type': 'netmiko_base'}
     return netmiko_devices.NetmikoSwitch(device_cfg)
 def _make_switch_device(self, extra_cfg={}):
     patcher = mock.patch.object(netmiko_devices.netmiko,
                                 'platforms',
                                 new=['base'])
     patcher.start()
     self.addCleanup(patcher.stop)
     device_cfg = {'device_type': 'netmiko_base', 'ip': 'host'}
     device_cfg.update(extra_cfg)
     return netmiko_devices.NetmikoSwitch(device_cfg)