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

vmware.vmware_rest: Generate action_groups #78

Merged

Conversation

mariolenz
Copy link
Contributor

SUMMARY

Fixes #75

Generate action_groups for vmware.vmware_rest.

edit: Tested in ansible-collections/vmware.vmware_rest#461

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/action/generate_cloud_modules.py

ADDITIONAL INFORMATION

Follow-up to #76 which I've closed accidentally and can't reopen again.

@mariolenz
Copy link
Contributor Author

@GomathiselviS Could you please review this? I've refactored the code a bit because it wasn't really feasible for a unit test... I mean, it wasn't a self-contained unit but part of a larger block of code. I hope it's OK now.

cc @alinabuzachis @NilashishC

Copy link
Collaborator

@GomathiselviS GomathiselviS left a 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. I've recommended adding a log message for clarity.

@mariolenz
Copy link
Contributor Author

Looks good to me. I've recommended adding a log message for clarity.

done

@GomathiselviS GomathiselviS merged commit e775adc into ansible-community:main Jan 11, 2024
4 checks passed
@mariolenz mariolenz deleted the vmware_rest-action_groups branch January 11, 2024 16:47
@mariolenz
Copy link
Contributor Author

mariolenz commented Jan 11, 2024

I think the aws collection could make use of this, too. Maybe changing:

yaml_dict = {
"requires_ansible": """>=2.11.0""",
"action_groups": {"aws": []},
"plugin_routing": {"modules": {}},
}
for m in module_list:
yaml_dict["action_groups"]["aws"].append(m)

to something like:

yaml_dict = generate_runtime_yml("2.11.0", "aws", module_list)
yaml_dict["plugin_routing"] = {"modules": {}}

or:

yaml_dict = generate_runtime_yml(args.get("requires_ansible"), "aws", module_list)
yaml_dict["plugin_routing"] = {"modules": {}}

The latter would mean that requires_ansible should be also valid for aws, though.

BTW: This is jus a suggestion from my side. I won't implement this, I don't have anything to do with this collection 😏

@Yannik
Copy link

Yannik commented Jan 11, 2024

@mariolenz Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate action_groups in runtime.yml
4 participants