- Replace the Tkinter app with a PySide6 UI: sidebar navigation, central profile switcher, autosave, light/dark theme, background tasks with progress and cancel, toasts and a filterable activity log - Split logic into netbox_sync.core (config, NetBox, VMware/Proxmox, VM import, switches) and netbox_sync.ui - Replace the three-dialog import chain with a four-step import wizard; support the global VRF and match VMs per cluster - Expose the previously unreachable VRF/prefix batch tool - Switch sync: no silent LLDP config changes, TOFU host key checks, platform auto-detection, Comware name normalization, fixed AOS-S and Comware LLDP parsing, FQDN/management-IP cable matching, dry-run preview, interface types only set on create - Add PyInstaller onedir spec, Inno Setup installer and build.ps1 - Add pytest suite with an in-memory NetBox fake - Stop tracking the built exe Co-Authored-By: Claude Opus 5.5 <[email protected]>
12 lines
384 B
Python
12 lines
384 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def resource_path(name):
|
|
"""Locate bundled files both from source and inside a PyInstaller build."""
|
|
base = Path(getattr(sys, "_MEIPASS", Path(__file__).resolve().parents[1]))
|
|
candidate = base / "resources" / name
|
|
if candidate.exists():
|
|
return candidate
|
|
return Path(__file__).resolve().parents[1] / "resources" / name
|