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

Extend govc functionality with FindGroupsInGroup method #2945

Closed
abonat opened this issue Sep 13, 2022 · 2 comments · Fixed by #2946
Closed

Extend govc functionality with FindGroupsInGroup method #2945

abonat opened this issue Sep 13, 2022 · 2 comments · Fixed by #2946

Comments

@abonat
Copy link

abonat commented Sep 13, 2022

The issue:
I did:
govc sso.group.update -g -a dnsadmins@corp.local SyncUsers
And just seeking for an Ansible compatible way to validate if the group dnsadmins@corp.local is a member of the group SyncUsers@vsphere.local For example Ansible module to report 'changed' state correctly

So:
$ govc sso.group.ls SyncUsers
SyncUsers hstoyanov@corp.local
It reports only the members, which are users and skips the groups.

As a solution:
To use the FindGroupsInGroup in govc
I did some coding and now I have this:
govmomi/govc$ go run . sso.group.lsgroups -json syncusers [ { "Id": { "Name": "DnsAdmins", "Domain": "corp.local" }, "Alias": { "Name": "DnsAdmins", "Domain": "SAPHEC" }, "Details": { "Description": "DNS Administrators Group" } } ]
As an additional:
Both the CLI govc sso.group.ls -json SyncUsers and govc sso.group.lsgroups -json syncusers output the same json format and it's easy to combine the dicts in Ansible or Python

@github-actions
Copy link
Contributor

Howdy 🖐   abonat ! Thank you for your interest in this project. We value your feedback and will respond soon.

If you want to contribute to this project, please make yourself familiar with the CONTRIBUTION guidelines.

@abonat
Copy link
Author

abonat commented Sep 13, 2022

I will push my PR soon

abonat pushed a commit to abonat/govmomi that referenced this issue Sep 13, 2022
abonat pushed a commit to abonat/govmomi that referenced this issue Sep 13, 2022
abonat pushed a commit to abonat/govmomi that referenced this issue Sep 18, 2022
…oup method

govc: Add feature in sso.group.ls to list users using FindUsersInGroup method

Closes: vmware#2945
abonat pushed a commit to abonat/govmomi that referenced this issue Sep 18, 2022
priyanka19-98 pushed a commit to priyanka19-98/govmomi that referenced this issue Jan 17, 2024
priyanka19-98 pushed a commit to priyanka19-98/govmomi that referenced this issue Jan 17, 2024
…oup method

govc: Add feature in sso.group.ls to list users using FindUsersInGroup method

Closes: vmware#2945
priyanka19-98 pushed a commit to priyanka19-98/govmomi that referenced this issue Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant