Closed mariolenz closed 8 months ago
@alinabuzachis @GomathiselviS What do you think about this?
@mariolenz Thanks for implementing this feature. It will be immensely beneficial.
It looks good.
The generator currently rewrites the files if they already exist instead of managing the differences by writing or deleting them. We aimed to address this issue, but due to other pressing priorities, it hasn't been resolved yet. Do you think it's feasible to check the contents of the runtime.yml, if it exists, and selectively apply only the differences?
The generator currently rewrites the files if they already exist instead of managing the differences by writing or deleting them. We aimed to address this issue, but due to other pressing priorities, it hasn't been resolved yet. Do you think it's feasible to check the contents of the runtime.yml, if it exists, and selectively apply only the differences?
After thinking this through, I would keep re-generating the file every time. If there effectively are no changes, git will ignore the file when you commit so there's no change, really.
But if you want to "manage the differences" someone has to code this. This code can be buggy and needs to be maintained. Code that doesn't exist can't contain any bugs and nobody has to maintain it ;-)
I don't see any benefit over rewriting the file every time. It's probably even more efficient in terms of CPU cycles and other resources.
@GomathiselviS If this OK for you I'd like to keep this WIP until #77 is merged.
@mariolenz Please add unit testcase to test the generation of action_groups.
Please add unit testcase to test the generation of action_groups.
@GomathiselviS I have absolutely no idea how to do this. Any help would be very much appreciated.
Maybe I can more or less copy&paste the unit test for generating action_groups in generate_amazon_cloud
but I seem unable to find it :-/
Please add unit testcase to test the generation of action_groups.
@GomathiselviS I have absolutely no idea how to do this. Any help would be very much appreciated.
Maybe I can more or less copy&paste the unit test for generating action_groups in
generate_amazon_cloud
but I seem unable to find it :-/
Take a look at the following file: test_generator.py. It contains testcases that might serve as a reference for adding a 'generate_action_group' testcase. If you require further information, feel free to ask.
@GomathiselviS I've closed this accidentally. Could you please reopen it again? Or should I create a new PR?
@GomathiselviS I've closed this accidentally. Could you please reopen it again? Or should I create a new PR?
@GomathiselviS I've created #78
SUMMARY
Fixes #75
Generate action_groups for
vmware.vmware_rest
.edit: Tested in ansible-collections/vmware.vmware_rest#461
ISSUE TYPE
COMPONENT NAME
plugins/action/generate_cloud_modules.py
ADDITIONAL INFORMATION
Same code as for the Amazon collection in
generate_amazon_cloud
.This has already been requested twice by users: ansible-collections/vmware.vmware_rest#361 ansible-collections/vmware.vmware_rest#440