Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Support for pyVmomi < 8.0.3 and vSAN Management SDK #56

Open
mariolenz opened this issue Jul 31, 2024 · 4 comments
Open

Drop Support for pyVmomi < 8.0.3 and vSAN Management SDK #56

mariolenz opened this issue Jul 31, 2024 · 4 comments
Milestone

Comments

@mariolenz
Copy link
Collaborator

SUMMARY

Drop Support for pyVmomi < 8.0.3 and vSAN Management SDK for Python:

Starting with vSphere 8.0 Update 3 release version, the vSAN Management SDK for Python is integrated into the Python SDK for the VMware vSphere API (pyVmomi). From the Python Package Index (PyPi), you can download a single package to manage vSAN, vCenter, and ESXi.

vSAN Management SDK for Python

ISSUE TYPE
  • Documentation Report
COMPONENT NAME

requirements.txt
README.md

@mariolenz mariolenz added this to the 2.0.0 milestone Jul 31, 2024
@FilipeNas
Copy link

To support offline environments where we mirror / proxy the packages the requirements.txt should not have an external dependency with internet.

I suggest using the same file as the referred git repo.
vsphere-automation-sdk-python requirements.txt.

This will support offline installations, ansible-builder and PEP 508.

If you allow me, I can make a PR improve this.

@mariolenz
Copy link
Collaborator Author

I suggest using the same file as the referred git repo. vsphere-automation-sdk-python requirements.txt.

I think there are more dependencies in this file than this collection really needs. I wouldn't do this. I think this should be enough:

pyVmomi>=8.0.3.0.1
vmware-vcenter
vmware-vapi-common-client

If you allow me, I can make a PR improve this.

The problem is that changing the pyVmomi requirement from >=6.7.1 to >=8.0.3.0.1 might be considered a breaking change by some people. Especially since vmware-vcenter and vmware-vapi-common-client require Python 3.8+. I don't know, but it's possible that some people are using this collection with older Python version. That's why I tend to do this in the next major version, not now.

Can't you just ignore the requirements.txt for now? AFAIK galaxy doesn't use, anyway.

@FilipeNas
Copy link

FilipeNas commented Nov 13, 2024

OK got it.
Please take it in consideration in the next major release.

What i did to overcome this issue (In ansible builder) was:
Install the latest SDK version, then collection manually.

  append_final:
    - ARG ANSIBLE_HUB_TOKEN_READER
    - ENV ANSIBLE_GALAXY_SERVER_LIST=rh-certified
    - ENV ANSIBLE_GALAXY_SERVER_RH-CERTIFIED_URL="https://<ANSIBLE_HUB_URL>/api/galaxy/content/rh-certified/"
    - ENV ANSIBLE_GALAXY_SERVER_RH-CERTIFIED_TOKEN=$ANSIBLE_HUB_TOKEN_READER
      # Artifactory as a Git mirror, select the latest release of SDK, and run pip install the source code /release as zip
    - RUN vmware_version=$(curl "https://$JFROG_PLATFORM_USERNAME:$JFROG_PLATFORM_PASSWORD@<ARTIFACTORY_URL>/artifactory/github/vmware/vsphere-automation-sdk-python/releases/latest" | grep -o '/releases/tag/v[^"]*' | sed 's|.*/tag/||' | head -n 1) && $PYCMD -m pip install https://${JFROG_PLATFORM_USERNAME}:${JFROG_PLATFORM_PASSWORD}@<ARTIFACTORY_URL>/artifactory/api/vcs/downloadTag/github/vmware/vsphere-automation-sdk-python/${vmware_version}?ext=zip
    - RUN ansible-galaxy collection install community.vmware -p /usr/share/ansible/collections/ansible_collections
    - RUN $PYCMD -m pip cache purge && rm -f /etc/yum.repos.d/* && dnf clean all && rm -f /root/.config/pip/pip.conf

@mariolenz
Copy link
Collaborator Author

OK got it. Please take it in consideration in the next major release.

We did, that's why this issue is part of the 2.0.0 Milestone ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants