From 07df622b595efad174b7b88d755c8f10b7018041 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 5 Jan 2023 21:42:14 +0100 Subject: [PATCH 1/6] NetBox should always be referred to as NetBox [DATALAD RUNCMD] === Do not change lines below === { "chain": [], "cmd": "git ls-files -z . | xargs --null -I '()' find './()' -type f -not -name 'style-guide.md' -print0 | xargs --null sed --in-place --regexp-extended 's/\\bNetbox\\b/NetBox/g;'", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- README.md | 2 +- contrib/gunicorn.py | 2 +- docs/reference/markdown.md | 4 ++-- netbox/extras/management/commands/runscript.py | 2 +- netbox/project-static/styles/netbox.scss | 2 +- netbox/templates/base/layout.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 654b290ee..f44ce725f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ employed by thousands of organizations around the world. ## About NetBox -![Screenshot of Netbox UI](docs/media/screenshots/netbox-ui.png "NetBox UI") +![Screenshot of NetBox UI](docs/media/screenshots/netbox-ui.png "NetBox UI") Myriad infrastructure components can be modeled in NetBox, including: diff --git a/contrib/gunicorn.py b/contrib/gunicorn.py index 363dbc2ff..89d6943b4 100644 --- a/contrib/gunicorn.py +++ b/contrib/gunicorn.py @@ -1,4 +1,4 @@ -# The IP address (typically localhost) and port that the Netbox WSGI process should listen on +# The IP address (typically localhost) and port that the NetBox WSGI process should listen on bind = '127.0.0.1:8001' # Number of gunicorn workers to spawn. This should typically be 2n+1, where diff --git a/docs/reference/markdown.md b/docs/reference/markdown.md index 896d5dcf7..7f280686d 100644 --- a/docs/reference/markdown.md +++ b/docs/reference/markdown.md @@ -168,7 +168,7 @@ Some text to show that the reference links can follow later. ## Images ``` -Here's the Netbox logo (hover to see the title text): +Here's the NetBox logo (hover to see the title text): Inline-style: ![alt text](/static/netbox_logo.png "Logo Title Text 1") @@ -179,7 +179,7 @@ Reference-style: [logo]: /static/netbox_logo.png "Logo Title Text 2" ``` -Here's the Netbox logo (hover to see the title text): +Here's the NetBox logo (hover to see the title text): Inline-style: ![alt text](/static/netbox_logo.png "Logo Title Text 1") diff --git a/netbox/extras/management/commands/runscript.py b/netbox/extras/management/commands/runscript.py index 2296ce1ff..ae49d53be 100644 --- a/netbox/extras/management/commands/runscript.py +++ b/netbox/extras/management/commands/runscript.py @@ -20,7 +20,7 @@ from utilities.utils import NetBoxFakeRequest class Command(BaseCommand): - help = "Run a script in Netbox" + help = "Run a script in NetBox" def add_arguments(self, parser): parser.add_argument( diff --git a/netbox/project-static/styles/netbox.scss b/netbox/project-static/styles/netbox.scss index 8ff224172..e486bc7db 100644 --- a/netbox/project-static/styles/netbox.scss +++ b/netbox/project-static/styles/netbox.scss @@ -1,4 +1,4 @@ -// Netbox-specific Styles and Overrides. +// NetBox-specific Styles and Overrides. @use 'sass:map'; @use 'sass:math'; diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index e060110fb..2fc6d0d98 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -21,7 +21,7 @@ Blocks: {# Body #}
- {# Netbox Logo, only visible when printing #} + {# NetBox Logo, only visible when printing #}
NetBox logo
From 128ccb43304adebdefbb3cd21e9cc2fbd4adce25 Mon Sep 17 00:00:00 2001 From: Patrick Kerwood Date: Thu, 11 Aug 2022 21:41:32 +0200 Subject: [PATCH 2/6] feat: added setting redis certificate authority path --- netbox/netbox/configuration_example.py | 4 ++++ netbox/netbox/settings.py | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/netbox/netbox/configuration_example.py b/netbox/netbox/configuration_example.py index 262b52d4f..14fcde022 100644 --- a/netbox/netbox/configuration_example.py +++ b/netbox/netbox/configuration_example.py @@ -38,6 +38,8 @@ REDIS = { # Set this to True to skip TLS certificate verification # This can expose the connection to attacks, be careful # 'INSECURE_SKIP_TLS_VERIFY': False, + # Set a path to a certificate authority, typically used with a self signed certificate. + # 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt', }, 'caching': { 'HOST': 'localhost', @@ -52,6 +54,8 @@ REDIS = { # Set this to True to skip TLS certificate verification # This can expose the connection to attacks, be careful # 'INSECURE_SKIP_TLS_VERIFY': False, + # Set a path to a certificate authority, typically used with a self signed certificate. + # 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt', } } diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index e47a7fe91..1b47520be 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -235,6 +235,7 @@ TASKS_REDIS_PASSWORD = TASKS_REDIS.get('PASSWORD', '') TASKS_REDIS_DATABASE = TASKS_REDIS.get('DATABASE', 0) TASKS_REDIS_SSL = TASKS_REDIS.get('SSL', False) TASKS_REDIS_SKIP_TLS_VERIFY = TASKS_REDIS.get('INSECURE_SKIP_TLS_VERIFY', False) +TASKS_REDIS_CA_CERT_PATH = TASKS_REDIS.get('CA_CERT_PATH', False) # Caching if 'caching' not in REDIS: @@ -251,6 +252,7 @@ CACHING_REDIS_SENTINELS = REDIS['caching'].get('SENTINELS', []) CACHING_REDIS_SENTINEL_SERVICE = REDIS['caching'].get('SENTINEL_SERVICE', 'default') CACHING_REDIS_PROTO = 'rediss' if REDIS['caching'].get('SSL', False) else 'redis' CACHING_REDIS_SKIP_TLS_VERIFY = REDIS['caching'].get('INSECURE_SKIP_TLS_VERIFY', False) +CACHING_REDIS_CA_CERT_PATH = REDIS['caching'].get('CA_CERT_PATH', False) CACHES = { 'default': { @@ -262,6 +264,8 @@ CACHES = { } } } + + if CACHING_REDIS_SENTINELS: DJANGO_REDIS_CONNECTION_FACTORY = 'django_redis.pool.SentinelConnectionFactory' CACHES['default']['LOCATION'] = f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_SENTINEL_SERVICE}/{CACHING_REDIS_DATABASE}' @@ -270,7 +274,9 @@ if CACHING_REDIS_SENTINELS: if CACHING_REDIS_SKIP_TLS_VERIFY: CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {}) CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS']['ssl_cert_reqs'] = False - +if CACHING_REDIS_CA_CERT_PATH: + CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {}) + CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS']['ssl_ca_certs'] = CACHING_REDIS_CA_CERT_PATH # # Sessions @@ -648,6 +654,10 @@ RQ_PARAMS.update({ 'DEFAULT_TIMEOUT': RQ_DEFAULT_TIMEOUT, }) +if TASKS_REDIS_CA_CERT_PATH: + RQ_PARAMS.setdefault('REDIS_CLIENT_KWARGS', {}) + RQ_PARAMS['REDIS_CLIENT_KWARGS']['ssl_ca_certs'] = TASKS_REDIS_CA_CERT_PATH + RQ_QUEUES = { RQ_QUEUE_HIGH: RQ_PARAMS, RQ_QUEUE_DEFAULT: RQ_PARAMS, From 5af73e9bf7e2a9fcb4fb08a47a3d64bb1fa5311b Mon Sep 17 00:00:00 2001 From: "Daniel W. Anner" Date: Thu, 5 Jan 2023 16:26:26 -0500 Subject: [PATCH 3/6] #11371 - Add various 100Mb Interface Types (#11377) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added 100base-fx (aka fast ethernet over fiber optic) * Added 100BASE-T1 (single pair fast ethernet) as well as 100BASE‑LFX (fast ethernet over fiber, non standard) * Update choices.py Updated the placing of the 100base-fx and lfx choices * Update netbox/dcim/choices.py Co-authored-by: Jeremy Stretch --- netbox/dcim/choices.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 32dbbb62a..bcc3b404b 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -785,7 +785,10 @@ class InterfaceTypeChoices(ChoiceSet): TYPE_LAG = 'lag' # Ethernet + TYPE_100ME_FX = '100base-fx' + TYPE_100ME_LFX = '100base-lfx' TYPE_100ME_FIXED = '100base-tx' + TYPE_100ME_T1 = '100base-t1' TYPE_1GE_FIXED = '1000base-t' TYPE_1GE_GBIC = '1000base-x-gbic' TYPE_1GE_SFP = '1000base-x-sfp' @@ -918,7 +921,10 @@ class InterfaceTypeChoices(ChoiceSet): ( 'Ethernet (fixed)', ( + (TYPE_100ME_FX, '100BASE-FX (10/100ME FIBER)'), + (TYPE_100ME_LFX, '100BASE-LFX (10/100ME FIBER)'), (TYPE_100ME_FIXED, '100BASE-TX (10/100ME)'), + (TYPE_100ME_T1, '100BASE-T1 (10/100ME Single Pair)'), (TYPE_1GE_FIXED, '1000BASE-T (1GE)'), (TYPE_2GE_FIXED, '2.5GBASE-T (2.5GE)'), (TYPE_5GE_FIXED, '5GBASE-T (5GE)'), From 35273cc87f9f35aaccadcce7cc3ea00696fbc11b Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Thu, 5 Jan 2023 18:26:48 -0300 Subject: [PATCH 4/6] Add ExportTemplatesMixin to JournalEntry model (#11251) * Add ExportTemplatesMixin to JournalEntry model * Move mixin ahead of base class Co-authored-by: Jeremy Stretch --- netbox/extras/models/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/models/models.py b/netbox/extras/models/models.py index 699baa11b..607c5d4a0 100644 --- a/netbox/extras/models/models.py +++ b/netbox/extras/models/models.py @@ -514,7 +514,7 @@ class ImageAttachment(WebhooksMixin, ChangeLoggedModel): return objectchange -class JournalEntry(CustomFieldsMixin, CustomLinksMixin, TagsMixin, WebhooksMixin, ChangeLoggedModel): +class JournalEntry(CustomFieldsMixin, CustomLinksMixin, TagsMixin, WebhooksMixin, ExportTemplatesMixin, ChangeLoggedModel): """ A historical remark concerning an object; collectively, these form an object's journal. The journal is used to preserve historical context around an object, and complements NetBox's built-in change logging. For example, you From 69be24cd5f09e2b03de4502e7d3105fd53897500 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 5 Jan 2023 16:29:17 -0500 Subject: [PATCH 5/6] Changelog for #9996, #11150, #11245, #11371, #11403 --- docs/release-notes/version-3.4.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/release-notes/version-3.4.md b/docs/release-notes/version-3.4.md index 3abb894df..84882dd58 100644 --- a/docs/release-notes/version-3.4.md +++ b/docs/release-notes/version-3.4.md @@ -2,6 +2,17 @@ ## v3.4.3 (FUTURE) +### Enhancements + +* [#9996](https://github.com/netbox-community/netbox/issues/9996) - Introduce `CA_CERT_PATH` parameter to define SSL CA path for Redis servers +* [#11150](https://github.com/netbox-community/netbox/issues/11150) - Add primary IPv4/v6 address filters for devices +* [#11245](https://github.com/netbox-community/netbox/issues/11245) - Enable export templates for journal entries +* [#11371](https://github.com/netbox-community/netbox/issues/11371) - Introduce additional 100M Ethernet interface types + +### Bug Fixes + +* [#11403](https://github.com/netbox-community/netbox/issues/11403) - Fix exception when scheduling a job in the past + --- ## v3.4.2 (2023-01-03) From b88fcb66258b9895fb7e3008e8a052939e09a9a2 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 5 Jan 2023 16:38:29 -0500 Subject: [PATCH 6/6] Closes #11406: Correct example JSON --- docs/models/extras/savedfilter.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/models/extras/savedfilter.md b/docs/models/extras/savedfilter.md index 68278403e..c03a8b0c2 100644 --- a/docs/models/extras/savedfilter.md +++ b/docs/models/extras/savedfilter.md @@ -40,8 +40,8 @@ is represented in JSON as ```json { - 'tag': ['alpha', 'bravo'], - 'status': 'active', - 'region_id': 51 + "tag": ["alpha", "bravo"], + "status": "active", + "region_id": 51 } ```