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

move some ansible-free code to apypie #1789

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Oct 28, 2024

No description provided.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this some of the notes I made while reading this. I realize it's very much a work in progress and should result in a real PR to apypie itself before updating the vendored copy.

Comment on lines 1038 to 1039
PER_PAGE = 2 << 31
payload = {'per_page': PER_PAGE}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Foreman supports per_page=all, but Katello has its own mechanism using full_result=true. I started Katello/katello#11126 to unify this, but I don't think that's ready to be merged any time soon.


if search is not None:
params['search'] = search
params['per_page'] = PER_PAGE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The constant definition is now unused.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not correct ;)

plugins/modules/activation_key.py:from ansible_collections.theforeman.foreman.plugins.module_utils.foreman_helper import KatelloEntityAnsibleModule, PER_PAGE

plugins/module_utils/_apypie.py Outdated Show resolved Hide resolved
plugins/module_utils/foreman_helper.py Outdated Show resolved Hide resolved
@evgeni evgeni force-pushed the the-refactoring branch 3 times, most recently from efd64bc to 8121f36 Compare October 30, 2024 07:32
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.

2 participants