-
Notifications
You must be signed in to change notification settings - Fork 42
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 container repository add/remove content commands #422
Comments
Nice overview. How about doing a similar thing as I did for the OSTree plugin (pulp/pulp-cli-ostree@b2d2a09)? Instead of doing:
You could do:
Where you specify the content type directly and a user will be able to distinguish between specific content types just in time. Furthermore, the uniqueness of tags is defined like this: https://github.com/pulp/pulp_container/blob/b0231b24c939b48c12e72d805e5f46c50d17c7e0/pulp_container/app/models.py#L200. Thus, it is necessary to specify a tagged manifest as well when performing such a command. |
Not a bad idea, but one issue is that we want to be consistent with command structures across plugins. Right now ansible, file and python all use the content subgroup commands, but they don't have many content types like container and rpm (which also doesn't have full support yet). I think this is something we should discuss at the CLI meeting to agree on a standard so users don't have to memorize different command syntaxes for different plugins. (Edit) I do like your idea and wanted to add some extra thoughts I had thinking about it. Currently if an object has multiple types we use the
would become
The content command factory could be updated to generate commands like this. |
Right now, the pulp-cli/pulpcore/cli/common/generic.py Line 786 in 3ac28b4
all entry if we want to proceed further with the --type option.
Also, I wanted to create a command like this:
But, it is not possible to create a new subcommand for the subcommand
Furthermore, this command respects the generic pulp-cli/pulpcore/cli/common/generic.py Line 874 in 3ac28b4
|
It is possible, chaining commands are something different.
Yes, that is cumbersome since it is not how I intended the command factory to be used. That's the problem with trying to create a generic factory, it doesn't cover every use case. |
Summary
Container has special commands for adding/removing & copying content to container repositories. The content command group could be used, but it will need to use the polymorphic feature since these commands are only available for
container container repositories
.Examples
pulp container repository content add --repository foo --name "tag_name"
pulp container repository content add --repository foo --digest "manifest_digest"
pulp container repository content remove --repository foo --href "content_href"
pulp container repository content modify --repository foo --add-content '["content_href1", "content_href2"]
pulp container repository copy -t all --source foo --dest bar
copy everythingpulp container repository copy -t tags --source foo --source-version 2 --dest bar
copy all tags from version 2 of foopulp container repository copy -t manifests --source foo --dest bar --digests '["digest1", "digest2"]
copy manifests w/ digest1 & digest2The text was updated successfully, but these errors were encountered: