Closed mzbroch closed 1 year ago
Replace obj.platform.network_driver_mapper with network_driver_mappings
obj.platform.network_driver_mapper
network_driver_mappings
In [11]: Platform.objects.all()[5].network_driver_mappings Out[11]: {'ansible': 'cisco.nxos.nxos', 'hier_config': 'nxos', 'napalm': 'nxos', 'netmiko': 'cisco_nxos', 'netutils_parser': 'cisco_nxos', 'ntc_templates': 'cisco_nxos', 'pyats': 'nxos', 'pyntc': 'cisco_nxos_nxapi', 'scrapli': 'cisco_nxos'} In [12]: Platform.objects.all()[5].network_driver Out[12]: 'cisco_nxos'
if obj.platform.network_driver_mapper["netmiko"] not in parser_map.keys():
Replace
obj.platform.network_driver_mapper
withnetwork_driver_mappings