diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..879cfbe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +## 0.3.1 + +- Fixed Django migration dependencies for NetBox 4.6.5 through 4.6.8. +- Replaced dynamic `__latest__` dependencies in published migrations with fixed NetBox 4.6 squashed migration names. +- Documented the migration-history issue and the safe upgrade path for affected installations. + +### Safe Upgrade Path + +If `python manage.py migrate` fails with `InconsistentMigrationHistory` because `netbox_vmware_importer.0001_initial` is applied before a newer NetBox core migration, upgrade the plugin package to version `0.3.1` first and then run migrations normally: + +```bash +cd /opt/netbox +source venv/bin/activate + +pip install --upgrade --force-reinstall --no-cache-dir git+https://git.mrblake.cc/MrBlake/NetBox-VM-Import.git + +cd /opt/netbox/netbox +python manage.py migrate --plan +python manage.py migrate +python manage.py check + +sudo systemctl restart netbox netbox-rq +``` + +No manual edits to the `django_migrations` table and no `--fake` migration should be necessary. Take a database backup before any NetBox or plugin upgrade. + +## 0.3.0 + +- Removed Proxmox sync support. +- Kept legacy Proxmox endpoints visible so administrators can delete old records safely. +- Restricted the plugin UI and sync jobs to VMware vSphere/vCenter endpoints. diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index e057b47..4cfeab0 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -19,3 +19,4 @@ | 0.2.5 | 4.4.0 | 4.6.x | | 0.2.6 | 4.4.0 | 4.6.x | | 0.3.0 | 4.4.0 | 4.6.x | +| 0.3.1 | 4.6.5 | 4.6.8 | diff --git a/README.md b/README.md index e01dfb1..ff7e25e 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ NetBox plugin zum Synchronisieren von VMware vSphere/vCenter VMs nach NetBox. +## Kompatibilitaet + +Version `0.3.1` ist fuer NetBox `4.6.5` bis `4.6.8` freigegeben. + ## Funktionen - vCenter/ESXi-Ziele direkt in der NetBox-Weboberflaeche pflegen @@ -41,6 +45,10 @@ python manage.py migrate netbox_vmware_importer sudo systemctl restart netbox netbox-rq ``` +## Upgrade-Hinweis + +Version `0.3.1` behebt instabile Django-Migration-Dependencies aus frueheren Releases. Wenn `python manage.py migrate` mit `InconsistentMigrationHistory` fuer `netbox_vmware_importer.0001_initial` fehlschlaegt, zuerst das Plugin auf `0.3.1` aktualisieren und danach `python manage.py migrate --plan` sowie `python manage.py migrate` normal ausfuehren. Manuelle Aenderungen an `django_migrations` oder `--fake` sollten nicht notwendig sein. + ## Nutzung 1. In NetBox unter `VMware Import > Endpoints` ein Ziel anlegen. diff --git a/netbox_vmware_importer/__init__.py b/netbox_vmware_importer/__init__.py index dc559d7..87c0330 100644 --- a/netbox_vmware_importer/__init__.py +++ b/netbox_vmware_importer/__init__.py @@ -5,10 +5,11 @@ class VMwareImporterConfig(PluginConfig): name = "netbox_vmware_importer" verbose_name = "VMware Importer" description = "Synchronize VMware vSphere virtual machines into NetBox." - version = "0.3.0" + version = "0.3.1" author = "Internal NetBox Team" base_url = "vmware-importer" - min_version = "4.4.0" + min_version = "4.6.5" + max_version = "4.6.8" def ready(self): super().ready() diff --git a/netbox_vmware_importer/migrations/0001_initial.py b/netbox_vmware_importer/migrations/0001_initial.py index ad0dc19..2c98696 100644 --- a/netbox_vmware_importer/migrations/0001_initial.py +++ b/netbox_vmware_importer/migrations/0001_initial.py @@ -7,9 +7,9 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ("dcim", "__latest__"), - ("tenancy", "__latest__"), - ("virtualization", "__latest__"), + ("dcim", "0001_squashed"), + ("tenancy", "0001_squashed_0012"), + ("virtualization", "0001_squashed_0022"), ] operations = [ diff --git a/netbox_vmware_importer/migrations/0002_align_netbox_46_model_state.py b/netbox_vmware_importer/migrations/0002_align_netbox_46_model_state.py index 33c8142..350a7a7 100644 --- a/netbox_vmware_importer/migrations/0002_align_netbox_46_model_state.py +++ b/netbox_vmware_importer/migrations/0002_align_netbox_46_model_state.py @@ -5,7 +5,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ("extras", "__latest__"), + ("extras", "0001_squashed"), ("netbox_vmware_importer", "0001_initial"), ] diff --git a/pyproject.toml b/pyproject.toml index 08a71a2..5855449 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-vmware-importer" -version = "0.3.0" +version = "0.3.1" description = "NetBox plugin to synchronize VMware vSphere virtual machines into NetBox." readme = "README.md" requires-python = ">=3.12"