-
Notifications
You must be signed in to change notification settings - Fork 312
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 support for multiple users in ad template #5994
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5994 +/- ##
========================================
Coverage 90.18% 90.18%
========================================
Files 180 180
Lines 15777 15777
========================================
Hits 14228 14228
Misses 1549 1549
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
UserPassword: | ||
Description: Cluster user Password. | ||
Description: Cluster user Password for all users. |
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.
minor I'd rephrase "Password for all the users specified in 'Users' parameter.
@@ -561,7 +565,8 @@ Resources: | |||
response_data['Message'] = 'Resource creation successful!' | |||
physical_resource_id = create_physical_resource_id() | |||
ds.reset_user_password(DirectoryId=directory_id, UserName='ReadOnlyUser', NewPassword=read_only_password) | |||
ds.reset_user_password(DirectoryId=directory_id, UserName=user_name, NewPassword=user_password) | |||
for name in user_names.split(","): |
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.
I suggest to sanitize user_names by trimming it to avoid the risk of having user names with blank spaces.
The reason why I'm suggesting this here in Python code but not in the bash code above is because in the bash code you implicitly sanitized it using sed replacement within bash arrays.
@@ -561,7 +565,9 @@ Resources: | |||
response_data['Message'] = 'Resource creation successful!' | |||
physical_resource_id = create_physical_resource_id() | |||
ds.reset_user_password(DirectoryId=directory_id, UserName='ReadOnlyUser', NewPassword=read_only_password) | |||
ds.reset_user_password(DirectoryId=directory_id, UserName=user_name, NewPassword=user_password) | |||
for name in user_names.split(","): | |||
name = name.strip() |
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.
Minor It's ok to strip here, but just for sharing: in this way you strip once per every username. If you strip user_names
when defining the loop instead you strip just once for all.
Description of changes
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.