DanSheps / netbox-config-backup

A configuration backup system using napalm
Apache License 2.0
89 stars 7 forks source link

mikrotik support #65

Closed SerhiiZahuba closed 9 months ago

SerhiiZahuba commented 1 year ago

Plugin version

1.4.3

NetBox version

3.5.1

Feature type

New functionality

Proposed functionality

Please check the possibility to add Mikrotik backup.

Use case

Please check the possibility to add Mikrotik backup. As I pointed out in https://github.com/DanSheps/netbox-config-backup/discussions/40 the napalm-ros module already has support for getting the device config

print(device.get_config())

image image

import napalm from napalm_ros import ros router_ip = '' router_port = 8728 router_user = 'admin' router_pass = '' driver = napalm.get_network_driver('ros') print('Connecting to', router_ip, "on port", router_port, "as", router_user) device = driver(hostname=router_ip, username=router_user, password=router_pass, optional_args={'port': router_port}) device.open() print(device.get_config())

Database changes

No response

External dependencies

No response

DanSheps commented 9 months ago

This should just be a configuration on the end user side, I don't believe there is anything in the plugin that prevents you from choosing ros for the driver.