You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We tried to use the SDK (v8.0.3.0) in a runner in SaltStack, but always just got an error message.
Error message: ModuleNotFoundError: No module named 'vmware.vapi'; 'vmware' is not a package
It turned out that the __init__.py is missing in the vmware-vcenter package.
I could fix it by just adding a blank __init__.py to /opt/saltstack/salt/extras-3.10/vmware/__init__.py.
In older versions of the SDK the __init__.py exists and the error doesn't appear.
Reproduction steps
Install SaltStack (in our case version 3006.8)
Write a runner module for SaltStack and try to import anything from vmware (like from vmware.vapi.vsphere.client import VsphereClient)
Try to execute the runner (e.g. salt-run mymodule.myfunction)
Describe the bug
We tried to use the SDK (v8.0.3.0) in a runner in SaltStack, but always just got an error message.
Error message:
ModuleNotFoundError: No module named 'vmware.vapi'; 'vmware' is not a packageIt turned out that the
__init__.pyis missing in thevmware-vcenterpackage.I could fix it by just adding a blank
__init__.pyto/opt/saltstack/salt/extras-3.10/vmware/__init__.py.In older versions of the SDK the
__init__.pyexists and the error doesn't appear.Reproduction steps
vmware(likefrom vmware.vapi.vsphere.client import VsphereClient)salt-run mymodule.myfunction)Expected behavior
The runner can import the external module.
Additional context
No response