-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add datasource_vcd_org_group; Add group_names, is_external attribute to org_user; Add user_names attribute to org_group #798
Add datasource_vcd_org_group; Add group_names, is_external attribute to org_user; Add user_names attribute to org_group #798
Conversation
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Needs testing.
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all these fixes and improvements!
I had another manual run after data source fix and it works!
Signed-off-by: abarreiro <abarreiro@vmware.com>
Will do another run of the tests to be sure all is OK before merging |
Tests passed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did some through manual testing an it worked very well 💯
Also run acceptance tests and passed!
Great work @adambarreiro ! Keep it up!
Approved!
…ider-vcd into vcd-org-group-datasource
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro <abarreiro@vmware.com>
Re-tested with renaming of attributes, all OK. |
Signed-off-by: abarreiro <abarreiro@vmware.com>
Signed-off-by: abarreiro abarreiro@vmware.com
Description
This PR modifies some behaviour, described below, of the vcd_org_group and vcd_org_user resources and datasources. It also introduces the new vcd_org_group datasource.
The proposed changes enhance the vcd_org_group type by adding the
user_names
attribute. This attribute contains a set of names of all the users that belong to the group. However, and this is a bit of a quirk, this set is only populated whenever the user is created after the group.That's why, if someone wants the set to be populated, she should add:
The behaviour is exactly the same as the attribute
group_references
from the vcd_org_user resource, which was added in the same way.As a side change, this PR also adds the scenario where a vcd_org_user is not created but imported from an LDAP ("Import" is a VCD UI term). To import a user from the LDAP, the
is_external
attribute has been added. To use these kind of users, one must not declare any other attribute exceptname
andis_external=true
, they will be fetched from the LDAP.Last but not least, the default values for
deployed_vm_quota
andstored_vm_quota
from the vcd_org_user have been removed. Reason is that these fields cannot be computed and default'ed at the same time. Now, if not declared, local users will have unlimited quota, and imported users (LDAP users) will have no quota at all.Detailed changelist
is_external
attribute to get users that were imported from an LDAP.group_names
attribute with the set of group names to which the imported user belongs.user_names
attribute with the set of user names that belong to this group. This attribute is only filled when user is created after the group.is_external
flag to import users from LDAP. Whenis_external
istrue
, no password nor other attributes are needed because they're picked from LDAP. This makes other attributes beComputed
.deployed_vm_quota
andstored_vm_quota
for the reason above.