-
Notifications
You must be signed in to change notification settings - Fork 77
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
Add import export support of python content #580
Conversation
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 opening an issue and PR, this is a good feature! Left a comment for an addition needed to make sure the feature works correctly.
Also, if it is not too much to ask for, can you add tests for this feature? We have some examples here: https://github.com/pulp/pulp_ansible/blob/main/pulp_ansible/tests/functional/api/test_export_import.py, but the basic premise is you set up a repository -> sync some content -> export the repository -> import into another repository -> check content is all good.
""" | ||
Resource for import/export of python_pythonpackagecontent entities. | ||
""" |
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 is mostly correct, but it is missing the set_up_queryset
method implementation. https://docs.pulpproject.org/pulpcore/plugins/plugin-writer/concepts/subclassing/import-export.html#basecontentresource
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.
The link above is now:
set_up_queryset()
is The Thing that tells the import/export machinery how to find all the entities associated with a specific RepositoryVersion, and hence what to export. In this specific model-resource, it would a filter that would return all PythonPackageContent
in a specified repo-version.
@tjmullicani, any updates on your side regarding the requested |
This pull request has been marked 'stale' due to lack of recent activity. If there is no further activity, the PR will be closed in another 30 days. Thank you for your contribution! |
This pull request has been closed due to inactivity. If you feel this is in error, please reopen the pull request or file a new PR with the relevant details. |
fixes #579