From 43bcd75e87d6dc7eb33c838a0736161d7422ff3f Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 2 Sep 2021 07:52:11 +0200 Subject: [PATCH] update netbox to 3.0.1 --- bundles/netbox/files/configuration.py | 21 ++++++++++++++++++--- bundles/netbox/metadata.py | 6 ++++++ nodes/rx300.py | 2 +- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/bundles/netbox/files/configuration.py b/bundles/netbox/files/configuration.py index e10dd1c..bbece50 100644 --- a/bundles/netbox/files/configuration.py +++ b/bundles/netbox/files/configuration.py @@ -39,11 +39,10 @@ ADMINS = [ BANNER_TOP = '' BANNER_BOTTOM = '' +BANNER_LOGIN = '' BASE_PATH = '' -CACHE_TIMEOUT = 0 - CHANGELOG_RETENTION = ${node.metadata.get('netbox/changelog_retention_days', 90)} CORS_ORIGIN_ALLOW_ALL = False @@ -54,6 +53,8 @@ CORS_ORIGIN_WHITELIST = [ ] CORS_ORIGIN_REGEX_WHITELIST = [] +CUSTOM_VALIDATORS = {} + DEBUG = False EMAIL = { @@ -67,6 +68,10 @@ EMAIL = { ENFORCE_GLOBAL_UNIQUE = True +EXEMPT_VIEW_PERMISSIONS = [] + +GRAPHQL_ENABLED = True + LOGGING = { 'version': 1, 'disable_existing_loggers': False, @@ -81,7 +86,9 @@ LOGGING = { }, } +LOGIN_PERSISTENCE = True LOGIN_REQUIRED = False +LOGIN_TIMEOUT = 14 * 24*60*60 MAINTENANCE_MODE = False @@ -96,17 +103,25 @@ NAPALM_ARGS = {} PAGINATE_COUNT = 100 -PLUGINS = {} +PLUGINS = [] PREFER_IPV4 = False +RACK_ELEVATION_DEFAULT_UNIT_HEIGHT = 22 +RACK_ELEVATION_DEFAULT_UNIT_WIDTH = 220 + # We use icinga for that. RELEASE_CHECK_URL = None REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend' +RQ_DEFAULT_TIMEOUT = 300 + SCRIPTS_ROOT = '/opt/netbox/scripts' +SESSION_COOKIE_NAME = 'sessionid' +SESSION_FILE_PATH = None + TIME_ZONE = 'UTC' DATE_FORMAT = 'N j, Y' diff --git a/bundles/netbox/metadata.py b/bundles/netbox/metadata.py index 098f8b4..12ae9c7 100644 --- a/bundles/netbox/metadata.py +++ b/bundles/netbox/metadata.py @@ -21,6 +21,12 @@ defaults = { # and database }, }, + 'cron': { + 'netbox': '{m} {h} * * * netbox /opt/netbox/venv/bin/python /opt/netbox/src/netbox/manage.py housekeeping'.format( + m=node.magic_number%60, + h=node.magic_number%4, + ), + }, 'postgresql': { 'databases': { 'netbox': { diff --git a/nodes/rx300.py b/nodes/rx300.py index f9391d1..65cc03a 100644 --- a/nodes/rx300.py +++ b/nodes/rx300.py @@ -268,7 +268,7 @@ nodes['rx300'] = { }, 'netbox': { 'domain': 'netbox.franzi.business', - 'version': 'v2.11.11', + 'version': 'v3.0.1', 'changelog_retention_days': 360, 'admins': { 'kunsi': 'hostmaster@kunbox.net',