Skip to content

Commit

Permalink
[connection] Added default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Apr 7, 2019
1 parent e2c81f8 commit 445611f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions openwisp_controller/connection/settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
from django.conf import settings

CONNECTORS = getattr(settings, 'OPENWISP_CONNECTORS', (
DEFAULT_CONNECTORS = (
('openwisp_controller.connection.connectors.ssh.Ssh', 'SSH'),
))
)

UPDATE_STRATEGIES = getattr(settings, 'OPENWISP_UPDATE_STRATEGIES', (
CONNECTORS = getattr(settings, 'OPENWISP_CONNECTORS', DEFAULT_CONNECTORS)

DEFAULT_UPDATE_STRATEGIES = (
('openwisp_controller.connection.connectors.openwrt.ssh.OpenWrt', 'OpenWRT SSH'),
))
)

UPDATE_STRATEGIES = getattr(settings, 'OPENWISP_UPDATE_STRATEGIES', DEFAULT_UPDATE_STRATEGIES)

CONFIG_UPDATE_MAPPING = getattr(settings, 'OPENWISP_CONFIG_UPDATE_MAPPING', {
'netjsonconfig.OpenWrt': UPDATE_STRATEGIES[0][0],
'netjsonconfig.OpenWrt': DEFAULT_UPDATE_STRATEGIES[0][0],
})

0 comments on commit 445611f

Please sign in to comment.