Compare commits

...

2 Commits

Author SHA1 Message Date
Jeremy Stretch
7f2b744a53 Closes #18528: Introduce HOSTNAME config parameter (#19894)
Some checks failed
CI / build (20.x, 3.10) (push) Has been cancelled
CI / build (20.x, 3.11) (push) Has been cancelled
CI / build (20.x, 3.12) (push) Has been cancelled
2025-07-17 10:09:30 -07:00
Jeremy Stretch
733dd81f0e Closes #19738: Deprecate the direct assignment of a VLAN to a site (#19904) 2025-07-17 08:45:56 -05:00
4 changed files with 24 additions and 2 deletions

View File

@@ -72,6 +72,16 @@ Email is sent from NetBox only for critical events or if configured for [logging
---
## HOSTNAME
!!! info "This parameter was introduced in NetBox v4.4."
Default: System hostname
The hostname displayed in the user interface identifying the system on which NetBox is running. If not defined, this defaults to the system hostname as reported by Python's `platform.node()`.
---
## HTTP_PROXIES
Default: `None`

View File

@@ -25,6 +25,9 @@ The user-defined functional [role](./role.md) assigned to the VLAN.
### VLAN Group or Site
!!! warning "Site assignment is deprecated"
The assignment of individual VLANs directly to a site has been deprecated. This ability will be removed in a future NetBox release. Users are strongly encouraged to utilize VLAN groups, which have the added benefit of supporting the assignment of a VLAN to multiple sites.
The [VLAN group](./vlangroup.md) or [site](../dcim/site.md) to which the VLAN is assigned.
### Q-in-Q Role

View File

@@ -20,6 +20,7 @@ from utilities.forms.fields import (
from utilities.forms.rendering import FieldSet, InlineFields, ObjectAttribute, TabbedGroups
from utilities.forms.utils import get_field_value
from utilities.forms.widgets import DatePicker, HTMXSelect
from django.utils.safestring import mark_safe
from utilities.templatetags.builtins.filters import bettertitle
from virtualization.models import VMInterface
@@ -680,7 +681,15 @@ class VLANForm(TenancyForm, NetBoxModelForm):
queryset=Site.objects.all(),
required=False,
null_option='None',
selector=True
selector=True,
help_text=mark_safe(
'<span class="text-warning"><i class="mdi mdi-alert"></i> {text}</span>'.format(
text=_(
'The direct assignment of VLANs to a site is deprecated and will be removed in a future release. '
'Users are encouraged to utilize VLAN groups for this purpose.'
)
)
)
)
role = DynamicModelChoiceField(
label=_('Role'),

View File

@@ -27,7 +27,6 @@ from utilities.string import trailing_slash
RELEASE = load_release_data()
VERSION = RELEASE.full_version # Retained for backward compatibility
HOSTNAME = platform.node()
# Set the base directory two levels up
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
@@ -125,6 +124,7 @@ EXEMPT_VIEW_PERMISSIONS = getattr(configuration, 'EXEMPT_VIEW_PERMISSIONS', [])
FIELD_CHOICES = getattr(configuration, 'FIELD_CHOICES', {})
FILE_UPLOAD_MAX_MEMORY_SIZE = getattr(configuration, 'FILE_UPLOAD_MAX_MEMORY_SIZE', 2621440)
GRAPHQL_MAX_ALIASES = getattr(configuration, 'GRAPHQL_MAX_ALIASES', 10)
HOSTNAME = getattr(configuration, 'HOSTNAME', platform.node())
HTTP_PROXIES = getattr(configuration, 'HTTP_PROXIES', {})
INTERNAL_IPS = getattr(configuration, 'INTERNAL_IPS', ('127.0.0.1', '::1'))
ISOLATED_DEPLOYMENT = getattr(configuration, 'ISOLATED_DEPLOYMENT', False)