mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
added config option to disable plugins
This commit is contained in:
@ -187,6 +187,18 @@ PREFER_IPV4 = False
|
|||||||
# this setting is derived from the installed location.
|
# this setting is derived from the installed location.
|
||||||
# SCRIPTS_ROOT = '/opt/netbox/netbox/scripts'
|
# SCRIPTS_ROOT = '/opt/netbox/netbox/scripts'
|
||||||
|
|
||||||
|
# Enable plugin support in netbox. This setting must be enabled for any installed plugins to function.
|
||||||
|
PLUGINS_ENABLED = False
|
||||||
|
|
||||||
|
# Plugins configuration settings. These settings are used by various plugins that the user may have installed.
|
||||||
|
# Each key in the dictionary is the name of an installed plugin and its value is a dictionary of settings.
|
||||||
|
# PLUGINS_CONFIG = {
|
||||||
|
# 'my_plugin': {
|
||||||
|
# 'foo': 'bar',
|
||||||
|
# 'buzz': 'bazz'
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
# By default, NetBox will store session data in the database. Alternatively, a file path can be specified here to use
|
# By default, NetBox will store session data in the database. Alternatively, a file path can be specified here to use
|
||||||
# local file storage instead. (This can be useful for enabling authentication on a standby instance with read-only
|
# local file storage instead. (This can be useful for enabling authentication on a standby instance with read-only
|
||||||
# database access.) Note that the user as which NetBox runs must have read and write permissions to this path.
|
# database access.) Note that the user as which NetBox runs must have read and write permissions to this path.
|
||||||
|
@ -95,6 +95,7 @@ NAPALM_TIMEOUT = getattr(configuration, 'NAPALM_TIMEOUT', 30)
|
|||||||
NAPALM_USERNAME = getattr(configuration, 'NAPALM_USERNAME', '')
|
NAPALM_USERNAME = getattr(configuration, 'NAPALM_USERNAME', '')
|
||||||
PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50)
|
PAGINATE_COUNT = getattr(configuration, 'PAGINATE_COUNT', 50)
|
||||||
PLUGINS_CONFIG = getattr(configuration, 'PLUGINS_CONFIG', {})
|
PLUGINS_CONFIG = getattr(configuration, 'PLUGINS_CONFIG', {})
|
||||||
|
PLUGINS_ENABLED = getattr(configuration, 'PLUGINS_ENABLED', False)
|
||||||
PREFER_IPV4 = getattr(configuration, 'PREFER_IPV4', False)
|
PREFER_IPV4 = getattr(configuration, 'PREFER_IPV4', False)
|
||||||
REPORTS_ROOT = getattr(configuration, 'REPORTS_ROOT', os.path.join(BASE_DIR, 'reports')).rstrip('/')
|
REPORTS_ROOT = getattr(configuration, 'REPORTS_ROOT', os.path.join(BASE_DIR, 'reports')).rstrip('/')
|
||||||
SCRIPTS_ROOT = getattr(configuration, 'SCRIPTS_ROOT', os.path.join(BASE_DIR, 'scripts')).rstrip('/')
|
SCRIPTS_ROOT = getattr(configuration, 'SCRIPTS_ROOT', os.path.join(BASE_DIR, 'scripts')).rstrip('/')
|
||||||
@ -601,7 +602,8 @@ if PAGINATE_COUNT not in PER_PAGE_DEFAULTS:
|
|||||||
#
|
#
|
||||||
|
|
||||||
PLUGINS = []
|
PLUGINS = []
|
||||||
for entry_point in iter_entry_points(group='netbox.plugin', name=None):
|
if PLUGINS_ENABLED:
|
||||||
|
for entry_point in iter_entry_points(group='netbox.plugin', name=None):
|
||||||
plugin = entry_point.module_name
|
plugin = entry_point.module_name
|
||||||
PLUGINS.append(plugin)
|
PLUGINS.append(plugin)
|
||||||
INSTALLED_APPS.append(plugin)
|
INSTALLED_APPS.append(plugin)
|
||||||
|
Reference in New Issue
Block a user