From 8bc77c1bc08fed47a238869a60f7631d8f4ffcfa Mon Sep 17 00:00:00 2001 From: erin Date: Fri, 27 Mar 2020 21:30:26 -0700 Subject: [PATCH] Add RELEASE_CHECK_URL to configuration and default env. --- configuration/configuration.py | 9 +++++++++ env/netbox.env | 1 + 2 files changed, 10 insertions(+) diff --git a/configuration/configuration.py b/configuration/configuration.py index af121d9..94534ae 100644 --- a/configuration/configuration.py +++ b/configuration/configuration.py @@ -170,6 +170,15 @@ PAGINATE_COUNT = int(os.environ.get('PAGINATE_COUNT', 50)) # When determining the primary IP address for a device, IPv6 is preferred over IPv4 by default. Set this to True to # prefer IPv4 instead. PREFER_IPV4 = os.environ.get('PREFER_IPV4', 'False').lower() == 'true' + +# This determines how often the GitHub API is called to check the latest release of NetBox. Must be at least 1 hour. +RELEASE_CHECK_TIMEOUT = os.environ.get('RELEASE_CHECK_TIMEOUT', 24 * 3600) + +# This repository is used to check whether there is a new release of NetBox available. Set to None to disable the +# version check or use the URL below to check for release in the official NetBox repository. +# https://api.github.com/repos/netbox-community/netbox/releases +RELEASE_CHECK_URL = os.environ.get('RELEASE_CHECK_URL', None) + # The file path where custom reports will be stored. A trailing slash is not needed. Note that the default value of # this setting is derived from the installed location. REPORTS_ROOT = os.environ.get('REPORTS_ROOT', '/etc/netbox/reports') diff --git a/env/netbox.env b/env/netbox.env index aaa7482..7f5e849 100644 --- a/env/netbox.env +++ b/env/netbox.env @@ -30,3 +30,4 @@ SUPERUSER_EMAIL=admin@example.com SUPERUSER_PASSWORD=admin SUPERUSER_API_TOKEN=0123456789abcdef0123456789abcdef01234567 WEBHOOKS_ENABLED=true +RELEASE_CHECK_URL=https://api.github.com/repos/netbox-community/netbox/releases