-
Notifications
You must be signed in to change notification settings - Fork 45
[Filter][2165]filter_for_data_set_name #2390
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
base: dev
Are you sure you want to change the base?
Conversation
richp405
left a comment
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.
This can't be merged until the pep8 and bandit issues are resolved.
It looks like a decent change, but non-standard... should be an easy couple of fixes.
fernandofloresg
left a comment
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.
Requested one change and asked a question
| from ansible.errors import AnsibleFilterError | ||
|
|
||
|
|
||
| def generate_data_set_name(value, generations=1): |
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.
At first sight generations might seem to be referring to a different thing, it will be better to use something like count or num_names
|
|
||
| EXAMPLES: | | ||
| # Get only one data set name. | ||
| clean_output: "{{ hlq | ibm.ibm_zos_core.generate_data_set_name}}" |
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.
What is the result if I do this ?
{{ ibm.ibm_zos_core.generate_data_set_name }}
Asking because I would expect to have either an error or a randomly generated hlq, when using mvstmp it uses the result of whoami command
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 think in this case we cannot generate a valid HLQ even having the ansible user, so we could fail in case no HLQ is provided
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 adding this!!
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.
Please update the copyright year
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.
Looks good, would only add one testing when is empty (if possible even)
richp405
left a comment
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.
Looks good to me.


SUMMARY
Filter to get data set names Fixes #2165
ISSUE TYPE
COMPONENT NAME
Generate data set name from the components use on the tests data set helpers
