From fb81398423de656d9f3a7899b9d6cb2875a6e459 Mon Sep 17 00:00:00 2001 From: Sergey Sannikov Date: Wed, 30 Sep 2026 00:11:59 +0400 Subject: [PATCH] vmware: name vcf-sdk as the tag sync dependency The tag sync option group and the import failure warning still named vsphere-automation-sdk. That package is archived and its runtime imports pkg_resources unconditionally, which no longer exists on Python 3.12+ with setuptools >= 82, so following the old name ends with "Tag syncing will be disabled" (#569). The README and the Dockerfile already use vcf-sdk, whose runtime (9.1.1.0) imports without pkg_resources. Name it in the option description and in the warning, and tell the user what to install. --- module/sources/vmware/config.py | 2 +- module/sources/vmware/connection.py | 4 +++- settings-example.ini | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/module/sources/vmware/config.py b/module/sources/vmware/config.py index 6b0b0d9..72e32ac 100644 --- a/module/sources/vmware/config.py +++ b/module/sources/vmware/config.py @@ -363,7 +363,7 @@ def __init__(self): ConfigOptionGroup(title="tag source", description="""\ sync tags assigned to clusters, hosts and VMs in vCenter to NetBox - INFO: this requires the installation of the 'vsphere-automation-sdk', + INFO: this requires the installation of the 'vcf-sdk' package, see docs about installation possible values: * object : the host or VM itself * parent_folder_1 : the direct folder this object is organized in (1 level up) diff --git a/module/sources/vmware/connection.py b/module/sources/vmware/connection.py index d3474c9..27ea23c 100644 --- a/module/sources/vmware/connection.py +++ b/module/sources/vmware/connection.py @@ -605,7 +605,9 @@ def create_api_session(self): return False if vsphere_automation_sdk_available is False: - log.warning(f"Unable to import Python 'vsphere-automation-sdk'. Tag syncing will be disabled.") + log.warning("Unable to import the Python 'vcf-sdk' package (successor of the archived " + "'vsphere-automation-sdk', which no longer imports on Python 3.12+ with " + "setuptools >= 82), run 'pip install --upgrade vcf-sdk'. Tag syncing will be disabled.") return False log.debug(f"Starting vCenter API connection to '{self.settings.host_fqdn}'") diff --git a/settings-example.ini b/settings-example.ini index 59d9ab8..02b14bb 100644 --- a/settings-example.ini +++ b/settings-example.ini @@ -376,7 +376,7 @@ password = super-secret ; tag source options ; sync tags assigned to clusters, hosts and VMs in vCenter to NetBox -; INFO: this requires the installation of the 'vsphere-automation-sdk', +; INFO: this requires the installation of the 'vcf-sdk' package, ; see docs about installation possible values: ; * object : the host or VM itself ; * parent_folder_1 : the direct folder this object is organized in (1 level up)