nautobot / nautobot-app-golden-config

Golden Configuration App for Nautobot.
https://docs.nautobot.com/projects/golden-config/en/latest/
Other
100 stars 57 forks source link

Fix network_driver_mapper #639

Closed mzbroch closed 1 year ago

mzbroch commented 1 year ago

Replace obj.platform.network_driver_mapper with 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():