Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/netbox-community/netbox
Browse files Browse the repository at this point in the history
…into 14044-bulkrename-nameless-devices
  • Loading branch information
DanSheps committed Oct 17, 2024
2 parents f5e1b5a + 33bc132 commit f7368bc
Show file tree
Hide file tree
Showing 732 changed files with 117,894 additions and 176,649 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v4.0.9
placeholder: v4.1.4
validations:
required: true
- type: dropdown
Expand All @@ -24,6 +24,21 @@ body:
- Data model extension
- New functionality
- Change to existing functionality
- Other
validations:
required: true
- type: dropdown
attributes:
label: Triage priority
description: >
Issue triage may be prioritized in some cases. Select whichever of the following
conditions applies, if any.
options:
- I volunteer to perform this work (if approved)
- I'm a NetBox Labs customer
- This is a very minor change
- N/A
default: 3
validations:
required: true
- type: textarea
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,25 @@ body:
- Self-hosted
validations:
required: true
- type: dropdown
attributes:
label: Triage priority
description: >
Issue triage may be prioritized in some cases. Select whichever of the following
conditions applies, if any.
options:
- I volunteer to perform this work (if approved)
- I'm a NetBox Labs customer
- This is preventing me from using NetBox
- N/A
default: 3
validations:
required: true
- type: input
attributes:
label: NetBox Version
description: What version of NetBox are you currently running?
placeholder: v4.0.9
placeholder: v4.1.4
validations:
required: true
- type: dropdown
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pycodestyle coverage tblib
pip install ruff coverage tblib
- name: Build documentation
run: mkdocs build
Expand All @@ -85,7 +85,7 @@ jobs:
run: python netbox/manage.py makemigrations --check

- name: Check PEP8 compliance
run: pycodestyle --ignore=W504,E501 --exclude=node_modules netbox/
run: ruff check netbox/

- name: Check UI ESLint, TypeScript, and Prettier Compliance
run: yarn --cwd netbox/project-static validate
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/stale@v9
with:
# General parameters
operations-per-run: 100
operations-per-run: 200
remove-stale-when-updated: false

# Issue parameters
Expand All @@ -43,8 +43,9 @@ jobs:
# Pull request parameters
close-pr-message: >
This PR has been automatically closed due to lack of activity.
days-before-pr-stale: 15
days-before-pr-stale: 30
days-before-pr-close: 15
exempt-pr-labels: 'status: blocked'
stale-pr-label: 'pending closure'
stale-pr-message: >
This PR has been automatically marked as stale because it has not had
Expand Down
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
hooks:
- id: ruff
name: "Ruff linter"
args: [ netbox/ ]
- repo: local
hooks:
- id: django-check
name: "Django system check"
description: "Run Django's internal check for common problems"
entry: python netbox/manage.py check
language: system
pass_filenames: false
types: [python]
- id: django-makemigrations
name: "Django migrations check"
description: "Check for any missing Django migrations"
entry: python netbox/manage.py makemigrations --check
language: system
pass_filenames: false
types: [python]
- id: mkdocs-build
name: "Build documentation"
description: "Build the documentation with mkdocs"
files: 'docs/'
entry: mkdocs build
language: system
pass_filenames: false
- id: yarn-validate
name: "Yarn validate"
description: "Check UI ESLint, TypeScript, and Prettier compliance"
files: 'netbox/project-static/'
entry: yarn --cwd netbox/project-static validate
language: system
pass_filenames: false
- id: verify-bundles
name: "Verify static asset bundles"
description: "Ensure that any modified static assets have been compiled"
files: 'netbox/project-static/'
entry: scripts/verify-bundles.sh
language: system
pass_filenames: false
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<a href="https://github.com/netbox-community/netbox/stargazers"><img src="https://img.shields.io/github/stars/netbox-community/netbox?style=flat" alt="GitHub stars" /></a>
<a href="https://explore.transifex.com/netbox-community/netbox/"><img src="https://img.shields.io/badge/languages-15-blue" alt="Languages supported" /></a>
<a href="https://github.com/netbox-community/netbox/actions/workflows/ci.yml"><img src="https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master" alt="CI status" /></a>
<p></p>
<p>
<strong><a href="https://github.com/netbox-community/netbox/">NetBox Community</a></strong> |
<strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong> |
<strong><a href="https://netboxlabs.com/netbox-enterprise/">NetBox Enterprise</a></strong>
</p>
</div>

NetBox exists to empower network engineers. Since its release in 2016, it has become the go-to solution for modeling and documenting network infrastructure for thousands of organizations worldwide. As a successor to legacy IPAM and DCIM applications, NetBox provides a cohesive, extensive, and accessible data model for all things networked. By providing a single robust user interface and programmable APIs for everything from cable maps to device configurations, NetBox serves as the central source of truth for the modern network.
Expand Down Expand Up @@ -81,11 +85,6 @@ NetBox automatically logs the creation, modification, and deletion of all manage
* The [official documentation](https://docs.netbox.dev) offers a comprehensive introduction.
* Check out [our wiki](https://github.com/netbox-community/netbox/wiki/Community-Contributions) for even more projects to get the most out of NetBox!

<p align="center">
<a href="https://netboxlabs.com/netbox-cloud/"><img src="docs/media/misc/netbox_cloud.png" alt="NetBox Cloud" /></a><br />
Looking for a managed solution? Check out <strong><a href="https://netboxlabs.com/netbox-cloud/">NetBox Cloud</a></strong> or <strong><a href="https://netboxlabs.com/netbox-enterprise/">NetBox Enterprise</a></strong>!
</p>

## Get Involved

* Follow [@NetBoxOfficial](https://twitter.com/NetBoxOfficial) on Twitter!
Expand Down
4 changes: 0 additions & 4 deletions base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ Jinja2
# https://python-markdown.github.io/changelog/
Markdown

# File inclusion plugin for Python-Markdown
# https://github.com/cmacmackin/markdown-include
markdown-include

# MkDocs Material theme (for documentation build)
# https://squidfunk.github.io/mkdocs-material/changelog/
mkdocs-material
Expand Down
2 changes: 1 addition & 1 deletion contrib/apache.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Alias /static /opt/netbox/netbox/static

<Directory /opt/netbox/netbox/static>
Options Indexes FollowSymLinks MultiViews
Options FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
Expand Down
24 changes: 24 additions & 0 deletions contrib/generated_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"left-to-right",
"right-to-left",
"side-to-rear",
"rear-to-side",
"bottom-to-top",
"top-to-bottom",
"passive",
"mixed"
]
Expand Down Expand Up @@ -149,6 +152,7 @@
"nema-l15-60p",
"nema-l21-20p",
"nema-l21-30p",
"nema-l22-20p",
"nema-l22-30p",
"cs6361c",
"cs6365c",
Expand Down Expand Up @@ -262,6 +266,7 @@
"nema-l15-60r",
"nema-l21-20r",
"nema-l21-30r",
"nema-l22-20r",
"nema-l22-30r",
"CS6360C",
"CS6364C",
Expand All @@ -288,6 +293,7 @@
"molex-micro-fit-2x2",
"molex-micro-fit-2x4",
"dc-terminal",
"eaton-c39",
"hdot-cx",
"saf-d-grid",
"neutrik-powercon-20a",
Expand Down Expand Up @@ -328,6 +334,7 @@
"5gbase-t",
"10gbase-t",
"10gbase-cx4",
"100base-x-sfp",
"1000base-x-gbic",
"1000base-x-sfp",
"10gbase-x-sfpp",
Expand Down Expand Up @@ -379,6 +386,7 @@
"ieee802.11ay",
"ieee802.11be",
"ieee802.15.1",
"ieee802.15.4",
"other-wireless",
"gsm",
"cdma",
Expand Down Expand Up @@ -518,6 +526,14 @@
"urm-p4",
"urm-p8",
"splice",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
Expand Down Expand Up @@ -575,6 +591,14 @@
"urm-p4",
"urm-p8",
"splice",
"usb-a",
"usb-b",
"usb-c",
"usb-mini-a",
"usb-mini-b",
"usb-micro-a",
"usb-micro-b",
"usb-micro-ab",
"other"
]
}
Expand Down
18 changes: 18 additions & 0 deletions docs/_theme/partials/copyright.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="md-copyright">
{% if config.copyright %}
<div class="md-copyright__highlight">
{{ config.copyright }}
</div>
{% endif %}
{% if not config.extra.generator == false %}
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
{% endif %}
</div>
{% if not config.extra.build_public %}
<div class="md-copyright">
ℹ️ Documentation is being served locally
</div>
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Microsoft Azure AD
# Microsoft Entra ID

This guide explains how to configure single sign-on (SSO) support for NetBox using [Microsoft Azure Active Directory (AD)](https://azure.microsoft.com/en-us/services/active-directory/) as an authentication backend.
This guide explains how to configure single sign-on (SSO) support for NetBox using [Microsoft Entra ID](https://www.microsoft.com/en-us/security/business/identity-access/microsoft-entra-id) as an authentication backend.

## Azure AD Configuration
## Entra ID Configuration

### 1. Create a test user (optional)

Expand All @@ -16,7 +16,7 @@ Under the Azure Active Directory dashboard, navigate to **Add > App registration

Enter a name for the registration (e.g. "NetBox") and ensure that the "single tenant" option is selected.

Under "Redirect URI", select "Web" for the platform and enter the path to your NetBox installation, ending with `/oauth/complete/azuread-oauth2/`. Note that this URI **must** begin with `https://` unless you are referencing localhost (for development purposes).
Under "Redirect URI", select "Web" for the platform and enter the path to your NetBox installation, ending with `/oauth/complete/entraid-oauth2/`. Note that this URI **must** begin with `https://` unless you are referencing localhost (for development purposes).

![App registration parameters](../../media/authentication/azure_ad_app_registration.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Default: False

This setting enables debugging. Debugging should be enabled only during development or troubleshooting. Note that only
clients which access NetBox from a recognized [internal IP address](#internal_ips) will see debugging tools in the user
clients which access NetBox from a recognized [internal IP address](./system.md#internal_ips) will see debugging tools in the user
interface.

!!! warning
Expand Down
17 changes: 17 additions & 0 deletions docs/configuration/graphql-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GraphQL API Parameters

## GRAPHQL_ENABLED

!!! tip "Dynamic Configuration Parameter"

Default: True

Setting this to False will disable the GraphQL API.

---

## GRAPHQL_MAX_ALIASES

Default: 10

The maximum number of queries that a GraphQL API request may contain.
2 changes: 1 addition & 1 deletion docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Some configuration parameters are primarily controlled via NetBox's admin interf
* [`CUSTOM_VALIDATORS`](./data-validation.md#custom_validators)
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
* [`GRAPHQL_ENABLED`](./graphql-api.md#graphql_enabled)
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
* [`MAPS_URL`](./miscellaneous.md#maps_url)
Expand Down
10 changes: 0 additions & 10 deletions docs/configuration/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ The maximum amount (in bytes) of uploaded data that will be held in memory befor

---

## GRAPHQL_ENABLED

!!! tip "Dynamic Configuration Parameter"

Default: True

Setting this to False will disable the GraphQL API.

---

## JOB_RETENTION

!!! tip "Dynamic Configuration Parameter"
Expand Down
20 changes: 15 additions & 5 deletions docs/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,29 @@ A list of permitted URL schemes referenced when rendering links within NetBox. N

## AUTH_PASSWORD_VALIDATORS

This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. These rules are applied whenever a user's password is created or updated to ensure that it meets minimum criteria such as length or complexity. The default configuration is shown below.

```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"OPTIONS": {
"min_length": 12,
},
},
{
"NAME": "utilities.password_validation.AlphanumericPasswordValidator",
},
]
```

The default configuration enforces the follow criteria:

* A password must be at least 12 characters in length.
* A password must have at least one uppercase letter, one lowercase letter, and one numeric digit.

Although it is not recommended, the default validation rules can be disabled by setting `AUTH_PASSWORD_VALIDATORS = []` in the configuration file. For more detail on customizing password validation, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).

---

## CORS_ORIGIN_ALLOW_ALL
Expand Down
Loading

0 comments on commit f7368bc

Please sign in to comment.