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 some handy pulp rpm commands #205

Closed
wants to merge 3 commits into from
Closed

Conversation

vonsch
Copy link
Contributor

@vonsch vonsch commented Apr 14, 2021

  • pulp rpm content-package list for listing rpm content (packages)
  • pulp rpm content-package upload for uploading rpm content (packages)
  • pulp rpm repository modify for adding/removing rpm content from repositories

vonsch added 2 commits April 14, 2021 16:53
Upload of rpm content from command-line is handy sometimes. Example
of usage:

pulp rpm content-package upload --file /path/barani-1.0.0-1.el8.x86_64.rpm --relative-path barani-1.0.0-1.el8.x86_64.rpm

[noissue]
Examples:
pulp rpm repository modify --name <reponame> --remove-href rpm_href1,rpm_href2
pulp rpm repository modify --name <reponame> --add-href rpm_href1,rpm_href2

[noissue]
@vonsch
Copy link
Contributor Author

vonsch commented Apr 14, 2021

Please note I'm quite poor python developer, so you might consider this only as an example and baseline for your PR

@vonsch vonsch force-pushed the develop branch 2 times, most recently from 5459483 to ec98290 Compare April 14, 2021 15:32
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution. However i think there is overlapping work being done in #194 .
Maybe you should coordinate with @gerrod3

@@ -10,6 +10,15 @@
_ = gettext.gettext


class PulpRpmPackageContentContext(PulpEntityContext):
Copy link
Member

Choose a reason for hiding this comment

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

I think, It's safe to call this PulpRpmPackageContext.

@name_option
@href_option
@click.option("--add-href", type=str, help="Comma-separated list of rpm content HREFs")
@click.option("--remove-href", type=str, help="Comma-separated list of rpm content HREFs")
Copy link
Member

Choose a reason for hiding this comment

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

We use json input to specify the content in the file case. And i'd really like to keep the interface consistent, so the user does not need to learn a new way with every plugin.

@vonsch
Copy link
Contributor Author

vonsch commented Apr 14, 2021

Thank you for this contribution. However i think there is overlapping work being done in #194 .
Maybe you should coordinate with @gerrod3

Thank you for pointing to this, I checked #194 and it seems that half of my PR is not necessary at all. Since #194 seems to be more proper approach than mine (and it includes tests etc), I will wait till it gets merged and then I will rebase and improve my PR.

@gerrod3
Copy link
Contributor

gerrod3 commented May 10, 2021

@vonsch The new content factory subgroup feature has been merged. Check out file plugin's implementation of their content commands using this new factory.

@mdellweg
Copy link
Member

mdellweg commented Jul 2, 2021

@vonsch may i kindly ask if you are still working on this?

@vonsch
Copy link
Contributor Author

vonsch commented Jul 2, 2021

@mdellweg I didn't have enough time to continue on this task, so let's close the PR. I will create new PR when I get again onto this (or some of my colleagues). However feel free to reuse any piece of this PR if it will be useful when working on issue #284

@vonsch vonsch closed this Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request (template-set)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants