Skip to content

Merge v0.0.5 into main#28

Merged
emersonfelipesp merged 15 commits into
mainfrom
v0.0.5
Mar 31, 2026
Merged

Merge v0.0.5 into main#28
emersonfelipesp merged 15 commits into
mainfrom
v0.0.5

Conversation

@emersonfelipesp

Copy link
Copy Markdown
Owner

CI is green for latest v0.0.5 commit. Merging branch into main as requested.

emersonfelipesp and others added 14 commits March 31, 2026 12:55
Introduce NetBox-ID scoped VM sync and stream routes that reuse the existing VM synchronization pipeline while filtering resources to a single VM. Add focused API route tests for success, missing VM, no-match, and stream completion behavior.
…tamps

Adds a datetime custom field 'proxmox_last_updated' that is set on all
objects the plugin creates or updates during synchronization. This allows
users to filter objects by when Proxmox last modified them.

The field is applied to: virtual machines, devices, clusters, cluster types,
device types, device roles, manufacturers, sites, VM interfaces, IP
addresses, and virtual disks.

Closes #242
Use guest-agent network interfaces when available for QEMU VM sync, and safely fall back to VM config parsing when the guest agent is disabled or not running.
Make VM interface sync prefer QEMU guest-agent interface names by default while preserving a query-parameter toggle to disable it, and add regression coverage for default, disabled, and fallback behavior.
- Set the first non-DHCP IP of the first VM interface as primary_ip4
  on the NetBox virtual machine; skip silently if no IP is available
  and emit a streaming warning instead of raising an exception.
- Set the first IP of the first device interface as primary_ip4 on the
  NetBox device during node interface sync.
- Never overwrite primary_ip4/primary_ip6 when it is already set in
  NetBox so that user-defined values take precedence on every sync.
- Create a NetBox VLAN for VM interfaces that carry a Proxmox VLAN tag
  (net0: ...,tag=100) and assign it as untagged_vlan with mode=access.
- Create a NetBox VLAN for node interfaces of type vlan that expose a
  vlan_id and assign it as untagged_vlan with mode=access.
- Add NetBoxVlanSyncState Pydantic schema to models.py for idempotent
  VLAN reconciliation.
- Add untagged_vlan and mode fields to NetBoxInterfaceSyncState and
  NetBoxVirtualMachineInterfaceSyncState.
- Add rest_patch_async helper to netbox_rest.py for targeted PATCH
  operations on a single NetBox record by ID.

Closes #86 and Closes #283
Introduce proxbox-api storage sync (standard + SSE) and update custom-field tests so VM type metadata is explicitly validated for QEMU/LXC filtering in the plugin UI.
Persist refreshed generated NetBox OpenAPI and Proxmox runtime route cache outputs so branch v0.0.5 contains all current working tree changes.
Include versioned v* branches in push and pull_request triggers so linting, compile checks, and tests run for maintenance branch commits like v0.0.5.
Use valid NetBox content-type identifiers for proxmox_last_updated custom field object_types so full sync no longer fails during custom field reconciliation.
…ster Proxmox fetches

- Expand /full-update and /full-update/stream to include storage, virtual-disks, backups, and snapshots in addition to devices and virtual-machines.

- Keep stage orchestration deterministic while preserving SSE progress and terminal complete semantics.

- Parallelize Proxmox discovery/fetch work across clusters/endpoints using bounded concurrency.

- Keep NetBox write pressure controlled via existing reconcile/batch flows; avoid unbounded write fan-out.

- Add fetch_max_concurrency query plumbing across storage/backup/snapshot/full-update routes to accept UI-configured values.

- Maintain env-based default (PROXBOX_FETCH_MAX_CONCURRENCY) as fallback when query value is absent.

- Extend and update route tests for expanded full-update payload/stream behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove deleted generated cache artifact from version control to keep repository state consistent.

- Align committed tree with current generated route registration behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update duplicate-site reconcile test expectation to include custom_fields={} in POST payload.

- Matches current rest_reconcile_async payload normalization behavior used in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@emersonfelipesp emersonfelipesp self-assigned this Mar 31, 2026
@emersonfelipesp emersonfelipesp added the enhancement New feature or request label Mar 31, 2026
The v0.0.5 -> main PR was blocked by Docker pre-release jobs failing\nat 131 files already formatted inside the container test script.\n\nThis commit applies Ruff formatting to the three reported files:\n- proxbox_api/routes/virtualization/virtual_machines/backups_vm.py\n- proxbox_api/routes/virtualization/virtual_machines/storages_vm.py\n- proxbox_api/services/sync/snapshots.py\n\nNo functional changes; formatting-only to satisfy required checks.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@emersonfelipesp
emersonfelipesp merged commit 3d59bbe into main Mar 31, 2026
15 checks passed
@emersonfelipesp
emersonfelipesp deleted the v0.0.5 branch March 31, 2026 18:02
emersonfelipesp added a commit that referenced this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant