-
Notifications
You must be signed in to change notification settings - Fork 24.1k
[WIP]Reuse get_collector_names method for network facts gathering #58817
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
[WIP]Reuse get_collector_names method for network facts gathering #58817
Conversation
d169ac2 to
e4cacd4
Compare
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.
net_res_choices and resource_facts_type can be passed directly get_collector_names instead of seperately crearting those two varaible or instead net_res_choices can be renamed as valid_subsets and resource_facts_type to gather_subset
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.
Same as above
e4cacd4 to
2b1448e
Compare
ganeshrn
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.
Thank you!
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2b1448e to
605f26f
Compare
| resource_facts_type = self._gather_network_resources | ||
|
|
||
| restorun_subsets = self.gen_runable(resource_facts_type, frozenset(net_res_choices)) | ||
| restorun_subsets = get_collector_names(valid_subsets=net_res_choices, |
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 should be frozenset(net_res_choices)
|
Code is migrated to https://github.com/ansible-collections/ansible.netcommon/blob/main/plugins/module_utils/network/common/facts/facts.py. Closing for now. Thanks. |
Signed-off-by: Trishna Guha trishnaguha17@gmail.com
SUMMARY
Reuse
get_collector_namesmethod for network facts gatheringCOMPONENT NAME
module_utils/network/common/facts/facts.py