Support NetBox 4.7.2 and restore deleted migrations
Raise max_version to 4.7.99; NetBox 4.7.2 skipped the plugin. Restore migrations 0003-0006, which were deleted while the model still uses their fields, so fresh installations get all columns. Existing installations already have them recorded as applied. Bump version to 0.3.2. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
d739e91339
commit
6dc00ebd78
7 files changed
+260
-3
No files matched your search
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## 0.3.2
|
||||
|
||||
- Raised `max_version` to `4.7.99`; verified against NetBox 4.7.2 (the plugin was skipped on 4.7.2 before).
|
||||
- Restored migrations `0003`–`0006`, which had been deleted while the model still uses their fields
|
||||
(`provider`, `auth_method`, `token_name`, timeouts, retries, `sync_lxc_containers`). Fresh
|
||||
installations were missing these columns. Existing installations already have them recorded as
|
||||
applied, so nothing changes there.
|
||||
|
||||
## 0.3.1
|
||||
|
||||
- Fixed Django migration dependencies for NetBox 4.6.5 through 4.6.8.
|
||||
|
||||
@@ -5,11 +5,11 @@ class VMwareImporterConfig(PluginConfig):
|
||||
name = "netbox_vmware_importer"
|
||||
verbose_name = "NetBox VMware Importer"
|
||||
description = "Synchronize VMware vSphere virtual machines into NetBox."
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
author = "Codex & Claude"
|
||||
base_url = "vmware-importer"
|
||||
min_version = "4.6.5"
|
||||
max_version = "4.7.1"
|
||||
max_version = "4.7.99"
|
||||
|
||||
def ready(self):
|
||||
super().ready()
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("netbox_vmware_importer", "0002_align_netbox_46_model_state"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="host",
|
||||
field=models.CharField(help_text="vCenter, ESXi, or Proxmox VE hostname or IP address", max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="validate_ssl",
|
||||
field=models.BooleanField(default=False, help_text="Validate the endpoint TLS certificate."),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="cluster",
|
||||
field=models.ForeignKey(
|
||||
help_text="NetBox cluster into which hypervisor VMs will be synchronized.",
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name="vmware_import_endpoints",
|
||||
to="virtualization.cluster",
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="provider",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("vmware", "VMware vSphere"),
|
||||
("proxmox", "Proxmox VE"),
|
||||
],
|
||||
default="vmware",
|
||||
max_length=30,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="auth_method",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("password", "Username/password"),
|
||||
("api_token", "API token"),
|
||||
],
|
||||
default="password",
|
||||
max_length=30,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="token_name",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text="Proxmox API token ID, e.g. netbox-import. The token secret is stored in the password field.",
|
||||
max_length=100,
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="sync_lxc_containers",
|
||||
field=models.BooleanField(default=True, verbose_name="Sync Proxmox LXC containers"),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("netbox_vmware_importer", "0003_add_proxmox_endpoint_fields"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="request_timeout_seconds",
|
||||
field=models.PositiveIntegerField(
|
||||
default=120,
|
||||
help_text="HTTP/API read timeout in seconds.",
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(5),
|
||||
django.core.validators.MaxValueValidator(600),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,51 @@
|
||||
import decimal
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("netbox_vmware_importer", "0004_add_endpoint_api_timeout"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="connect_timeout_seconds",
|
||||
field=models.PositiveIntegerField(
|
||||
default=10,
|
||||
help_text="TCP/TLS connection timeout in seconds.",
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(1),
|
||||
django.core.validators.MaxValueValidator(120),
|
||||
],
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="max_retries",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
default=0,
|
||||
help_text="Retries for safe Proxmox GET requests when the endpoint returns transient errors.",
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(0),
|
||||
django.core.validators.MaxValueValidator(10),
|
||||
],
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="vcenterendpoint",
|
||||
name="retry_backoff_seconds",
|
||||
field=models.DecimalField(
|
||||
decimal_places=2,
|
||||
default=decimal.Decimal("0.50"),
|
||||
help_text="Exponential retry backoff base delay in seconds.",
|
||||
max_digits=5,
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(decimal.Decimal("0.00")),
|
||||
django.core.validators.MaxValueValidator(decimal.Decimal("60.00")),
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,106 @@
|
||||
import decimal
|
||||
|
||||
import django.core.validators
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("netbox_vmware_importer", "0005_add_proxmox_connection_tuning"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="vcenterendpoint",
|
||||
options={
|
||||
"ordering": ("name",),
|
||||
"verbose_name": "VMware endpoint",
|
||||
"verbose_name_plural": "VMware endpoints",
|
||||
},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="provider",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("vmware", "VMware vSphere"),
|
||||
("proxmox", "Proxmox VE (legacy)"),
|
||||
],
|
||||
default="vmware",
|
||||
max_length=30,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="auth_method",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("password", "Username/password"),
|
||||
("api_token", "API token (legacy)"),
|
||||
],
|
||||
default="password",
|
||||
max_length=30,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="host",
|
||||
field=models.CharField(help_text="vCenter or ESXi hostname or IP address", max_length=255),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="validate_ssl",
|
||||
field=models.BooleanField(default=False, help_text="Validate the VMware endpoint certificate."),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="cluster",
|
||||
field=models.ForeignKey(
|
||||
help_text="NetBox cluster into which VMware VMs will be synchronized.",
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
related_name="vmware_import_endpoints",
|
||||
to="virtualization.cluster",
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="token_name",
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text="Legacy Proxmox API token ID. Kept only for deleting old endpoints.",
|
||||
max_length=100,
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="max_retries",
|
||||
field=models.PositiveSmallIntegerField(
|
||||
default=0,
|
||||
help_text="Legacy connection retry setting. Kept only for compatibility with older plugin versions.",
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(0),
|
||||
django.core.validators.MaxValueValidator(10),
|
||||
],
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="retry_backoff_seconds",
|
||||
field=models.DecimalField(
|
||||
decimal_places=2,
|
||||
default=decimal.Decimal("0.50"),
|
||||
help_text="Exponential retry backoff base delay in seconds.",
|
||||
max_digits=5,
|
||||
validators=[
|
||||
django.core.validators.MinValueValidator(decimal.Decimal("0.00")),
|
||||
django.core.validators.MaxValueValidator(decimal.Decimal("60.00")),
|
||||
],
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="vcenterendpoint",
|
||||
name="sync_lxc_containers",
|
||||
field=models.BooleanField(default=True, verbose_name="Sync legacy Proxmox LXC containers"),
|
||||
),
|
||||
]
|
||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "netbox-vmware-importer"
|
||||
version = "0.3.1"
|
||||
version = "0.3.2"
|
||||
description = "NetBox plugin to synchronize VMware vSphere virtual machines into NetBox."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12"
|
||||
|
||||
Reference in new issue
Block a user