Is the aiohttp Package Necessary with the vmware.vmware Collection?

Hello Community, :waving_hand:
I am new at this space and this is my first post here.
Also I am new at Ansible, I know a little bit but I don’t have experience.

Now I have a tiny question:
The collection vmware.vmware requires the installation of the Python package aiohttp (see requirements.txt). Also the collection vmware.vmware_rest. In the collection vmware.vmware_rest I found the following code in the file vmware_rest.py to load aiohttp:

try:
    aiohttp = importlib.import_module("aiohttp")
except ImportError:
    raise ModuleFailureException(missing_required_lib("aiohttp"))

But I can’t find an equivalent in the vmware.vmware collection.

The use is documented in two modules:

  • vmware.vmware-main\plugins\modules\deploy_content_library_ovf.py
  • vmware.vmware-main\plugins\modules\deploy_content_library_template.py

I could not find any other use for it.

Could it be that aiohttp is not needed at all in the vmware.vmware collection, or am I overlooking something?

I tried different modules (not the ones mentioned above, because I have no content library) and everything works fine without aiohttp package.

Thanks for hints and tips.
Best regards
Stefan

Hello!

The VMware.vmware collection does not have any collection dependencies
See the galaxy.yml, vmware.vmware/galaxy.yml at main · ansible-collections/vmware.vmware · GitHub

As for aiohttp, I am not sure you need it, not do I know why it is still listed in the requirements.txt. It is used in the VMware.vmware_rest collection (which is used in the integration tests for VMware.vmware), so that may be why it is listed there.

You can always try not installing it, and seeing if Ansible complains

1 Like

Hello @mikemorency,
thanks for your fast reply and your explanation. :+1:
Good to know that the vmware.vmware_rest collection is used in the integration test, I did not check that.
Best regards
Stefan