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

Add import export support of python content #580

Closed
wants to merge 2 commits into from

Conversation

tjmullicani
Copy link
Contributor

fixes #579

Copy link
Contributor

@gerrod3 gerrod3 left a 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.

Comment on lines +7 to +9
"""
Resource for import/export of python_pythonpackagecontent entities.
"""
Copy link
Contributor

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

Copy link
Contributor

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:

https://docs.pulpproject.org/pulpcore/plugin_dev/plugin-writer/concepts/subclassing/import-export.html

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.

@lubosmj
Copy link
Member

lubosmj commented Jan 4, 2023

@tjmullicani, any updates on your side regarding the requested set_up_queryset change?

@stale
Copy link

stale bot commented May 15, 2023

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!

@stale stale bot added the stale label May 15, 2023
@stale
Copy link

stale bot commented Jun 14, 2023

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.

@stale stale bot closed this Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add import export support of python content
4 participants