community.vmware
community.vmware copied to clipboard
adds vCenter global permissions module
SUMMARY
Adds a new module for managing global permissions .
Fixes https://github.com/ansible-collections/community.vmware/issues/437
ISSUE TYPE
- Feature Pull Request
COMPONENT NAME
vmware_vcenter_global_permission
ADDITIONAL INFORMATION
This PR is still missing tests and documentation for the new module. I just wanted to have it opened asap to get some feedback. The missing parts will be committed later this week.
Build failed.
:x: ansible-tox-linters FAILURE in 3m 57s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 05s :x: ansible-test-sanity-docker-devel FAILURE in 10m 54s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 7m 17s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 07s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 7m 08s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 54s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 18m 26s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 19m 23s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 38m 02s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 SUCCESS in 56m 18s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 53s
Hi @digifuchsi,
I'm surprise you need to parse the HTML output like this. Could you use pyvmomi instead?
Hi @goneri,
I would have loved not to do that, but nobody could tell me another (API based) solution. :( As far as my test have shown pyvmomi does not have the functionality to set global permissions.
If someone knows a better way I will instantly change the module as I do not like that HTML parsing at all.
Actually, now I think about it, I recently faced the same problem and my solution is based on Selenium which is less elegant than yours https://github.com/goneri/vcenter-ldap-role-manager
Well, thank you for your module, I will be happy to get ride of my script. We will need some integration tests to be sure we don't face any regression in the future. unit-tests would also be nice.
I didn't find an API to manage global permissions, either. I think there is a PowerCLI commandlet, but I didn't find anything in the vSphere SOAP or REST API.
@Tomorrow9 Do you know an API that we could use here? Having to fall back to a kind of screen scraping is a bit... well, unsophisticated ;-P
Sounds like no one found an API we can use for it. :(
I will work on the module tomorrow to add some tests and documentation. If I got time left I will fix all the failing checks as well.