netbox_4_2: init (#376100)
This commit is contained in:
commit
48ecb73067
@ -26,6 +26,13 @@
|
||||
It should generally be replaced with `rustPlatform.fetchCargoVendor`, but `rustPlatform.importCargoLock` may also be appropriate in some circumstances.
|
||||
`rustPlatform.buildRustPackage` users must set `useFetchCargoVendor` to `true` and regenerate the `cargoHash`.
|
||||
|
||||
- NetBox was updated to `>= 4.2.0`. Have a look at the breaking changes
|
||||
of the [4.1 release](https://github.com/netbox-community/netbox/releases/tag/v4.1.0)
|
||||
and the [4.2 release](https://github.com/netbox-community/netbox/releases/tag/v4.2.0),
|
||||
make the required changes to your database, if needed, then upgrade by setting `services.netbox.package = pkgs.netbox_4_2;` in your configuration.
|
||||
|
||||
- NetBox version 4.0.X available as `netbox_4_0` was removed. Please upgrade to `4.2`.
|
||||
|
||||
- Default ICU version updated from 74 to 76
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
@ -102,7 +102,9 @@ in
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default =
|
||||
if lib.versionAtLeast config.system.stateVersion "24.11" then
|
||||
if lib.versionAtLeast config.system.stateVersion "25.05" then
|
||||
pkgs.netbox_4_2
|
||||
else if lib.versionAtLeast config.system.stateVersion "24.11" then
|
||||
pkgs.netbox_4_1
|
||||
else if lib.versionAtLeast config.system.stateVersion "24.05" then
|
||||
pkgs.netbox_3_7
|
||||
|
@ -736,8 +736,8 @@ in {
|
||||
networking.networkmanager = handleTest ./networking/networkmanager.nix {};
|
||||
netbox_3_6 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_6; };
|
||||
netbox_3_7 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_3_7; };
|
||||
netbox_4_0 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_0; };
|
||||
netbox_4_1 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_1; };
|
||||
netbox_4_2 = handleTest ./web-apps/netbox.nix { netbox = pkgs.netbox_4_2; };
|
||||
netbox-upgrade = handleTest ./web-apps/netbox-upgrade.nix {};
|
||||
# TODO: put in networking.nix after the test becomes more complete
|
||||
networkingProxy = handleTest ./networking-proxy.nix {};
|
||||
|
@ -1,81 +0,0 @@
|
||||
diff --git a/netbox/extras/forms/bulk_import.py b/netbox/extras/forms/bulk_import.py
|
||||
index f2cf0b721..a17b6712d 100644
|
||||
--- a/netbox/extras/forms/bulk_import.py
|
||||
+++ b/netbox/extras/forms/bulk_import.py
|
||||
@@ -194,7 +194,7 @@ class Meta:
|
||||
model = EventRule
|
||||
fields = (
|
||||
'name', 'description', 'enabled', 'conditions', 'object_types', 'type_create', 'type_update',
|
||||
- 'type_delete', 'type_job_start', 'type_job_end', 'action_type', 'action_object', 'comments', 'tags'
|
||||
+ 'type_delete', 'type_job_start', 'type_job_end', 'action_type', 'comments', 'tags'
|
||||
)
|
||||
|
||||
def clean(self):
|
||||
diff --git a/netbox/extras/migrations/0002_squashed_0059.py b/netbox/extras/migrations/0002_squashed_0059.py
|
||||
index 98bed255a..a403a0e19 100644
|
||||
--- a/netbox/extras/migrations/0002_squashed_0059.py
|
||||
+++ b/netbox/extras/migrations/0002_squashed_0059.py
|
||||
@@ -131,10 +131,6 @@ class Migration(migrations.Migration):
|
||||
name='webhook',
|
||||
unique_together={('payload_url', 'type_create', 'type_update', 'type_delete')},
|
||||
),
|
||||
- migrations.AlterIndexTogether(
|
||||
- name='taggeditem',
|
||||
- index_together={('content_type', 'object_id')},
|
||||
- ),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='exporttemplate',
|
||||
unique_together={('content_type', 'name')},
|
||||
diff --git a/netbox/extras/migrations/0087_squashed_0098.py b/netbox/extras/migrations/0087_squashed_0098.py
|
||||
index 55f276ecd..bbe7f79f5 100644
|
||||
--- a/netbox/extras/migrations/0087_squashed_0098.py
|
||||
+++ b/netbox/extras/migrations/0087_squashed_0098.py
|
||||
@@ -98,10 +98,9 @@ class Migration(migrations.Migration):
|
||||
name='object_types',
|
||||
field=models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype'),
|
||||
),
|
||||
- migrations.RenameIndex(
|
||||
+ migrations.AddIndex(
|
||||
model_name='taggeditem',
|
||||
- new_name='extras_tagg_content_717743_idx',
|
||||
- old_fields=('content_type', 'object_id'),
|
||||
+ index=models.Index(fields=['content_type', 'object_id'], name='extras_tagg_content_717743_idx'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Bookmark',
|
||||
diff --git a/netbox/ipam/forms/model_forms.py b/netbox/ipam/forms/model_forms.py
|
||||
index f5e3bca30..4f96bac71 100644
|
||||
--- a/netbox/ipam/forms/model_forms.py
|
||||
+++ b/netbox/ipam/forms/model_forms.py
|
||||
@@ -588,7 +588,7 @@ class VLANGroupForm(NetBoxModelForm):
|
||||
class Meta:
|
||||
model = VLANGroup
|
||||
fields = [
|
||||
- 'name', 'slug', 'description', 'min_vid', 'max_vid', 'scope_type', 'scope', 'tags',
|
||||
+ 'name', 'slug', 'description', 'min_vid', 'max_vid', 'scope_type', 'tags',
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
diff --git a/netbox/vpn/forms/model_forms.py b/netbox/vpn/forms/model_forms.py
|
||||
index a17ca9a5e..dee98afd3 100644
|
||||
--- a/netbox/vpn/forms/model_forms.py
|
||||
+++ b/netbox/vpn/forms/model_forms.py
|
||||
@@ -258,7 +258,7 @@ class TunnelTerminationForm(NetBoxModelForm):
|
||||
class Meta:
|
||||
model = TunnelTermination
|
||||
fields = [
|
||||
- 'tunnel', 'role', 'termination', 'outside_ip', 'tags',
|
||||
+ 'tunnel', 'role', 'outside_ip', 'tags',
|
||||
]
|
||||
|
||||
def __init__(self, *args, initial=None, **kwargs):
|
||||
diff --git a/requirements.txt b/requirements.txt
|
||||
index 09f23871c..57f167dae 100644
|
||||
--- a/requirements.txt
|
||||
+++ b/requirements.txt
|
||||
@@ -1,4 +1,4 @@
|
||||
-Django==5.0.9
|
||||
+Django==5.1.2
|
||||
django-cors-headers==4.4.0
|
||||
django-debug-toolbar==4.4.6
|
||||
django-filter==24.2
|
@ -14,7 +14,7 @@ let
|
||||
in
|
||||
py.pkgs.buildPythonApplication rec {
|
||||
pname = "netbox";
|
||||
version = "4.0.11";
|
||||
version = "4.2.3";
|
||||
|
||||
format = "other";
|
||||
|
||||
@ -22,13 +22,11 @@ py.pkgs.buildPythonApplication rec {
|
||||
owner = "netbox-community";
|
||||
repo = "netbox";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-0yEz7v5RL1+cqbGDyuyEsywFonJQfPdVIQdL0qLyc04=";
|
||||
hash = "sha256-vdH/R88Vtu+xRLjETK0h+E4WoYRoseP0r+wROi8nMcM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./custom-static-root.patch
|
||||
# From https://github.com/netbox-community/netbox/pull/17620
|
||||
./django-5.1.patch
|
||||
];
|
||||
|
||||
propagatedBuildInputs =
|
||||
@ -111,7 +109,8 @@ py.pkgs.buildPythonApplication rec {
|
||||
pythonPath = py.pkgs.makePythonPath propagatedBuildInputs;
|
||||
inherit (py.pkgs) gunicorn;
|
||||
tests = {
|
||||
netbox = nixosTests.netbox_4_0;
|
||||
netbox = nixosTests.netbox_4_2;
|
||||
inherit (nixosTests) netbox-upgrade;
|
||||
};
|
||||
};
|
||||
|
||||
@ -124,8 +123,5 @@ py.pkgs.buildPythonApplication rec {
|
||||
minijackson
|
||||
raitobezarius
|
||||
];
|
||||
knownVulnerabilities = [
|
||||
"Netbox version ${version} is EOL; please upgrade by following the current release notes instructions."
|
||||
];
|
||||
};
|
||||
}
|
@ -4258,7 +4258,7 @@ with pkgs;
|
||||
inherit (callPackage ../servers/web-apps/netbox { }) netbox_3_7;
|
||||
|
||||
# Not in aliases because it wouldn't get picked up by callPackage
|
||||
netbox = netbox_4_1;
|
||||
netbox = netbox_4_2;
|
||||
|
||||
netcat = libressl.nc.overrideAttrs (old: {
|
||||
meta = old.meta // {
|
||||
|
Loading…
Reference in New Issue
Block a user