-
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 support for autopublish and autodistribute #199
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Added support for autopublish and autodistribute in pulp_file and pulp_rpm. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,14 +64,14 @@ def repository(ctx: click.Context, pulp_ctx: PulpContext, repo_type: str) -> Non | |
|
||
lookup_options = [href_option, name_option] | ||
nested_lookup_options = [repository_href_option, repository_option] | ||
create_options = [ | ||
click.option("--name", required=True), | ||
click.option("--description"), | ||
click.option("--remote", callback=_remote_callback), | ||
] | ||
update_options = [ | ||
click.option("--description"), | ||
click.option("--remote", callback=_remote_callback), | ||
click.option("--manifest"), | ||
click.option("--autopublish/--no-autopublish", default=None), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO the default should simply be --no-autopublish. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an update_option. So if not specified, we should def not set (and then update) this option to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I believe I misunderstood what it does then There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree it should default to I could either:
Thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Welp, ignore my comment. I am too slow. |
||
] | ||
create_options = update_options + [ | ||
click.option("--name", required=True), | ||
] | ||
|
||
repository.add_command(list_command(decorators=[label_select_option])) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CHECKSUM_CHOICES = ("unknown", "md5", "sha1", "sha224", "sha256", "sha384", "sha512") |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ | |
update_command, | ||
version_command, | ||
) | ||
from pulpcore.cli.rpm.common import CHECKSUM_CHOICES | ||
from pulpcore.cli.rpm.context import PulpRpmRemoteContext, PulpRpmRepositoryContext | ||
|
||
_ = gettext.gettext | ||
|
@@ -55,17 +56,22 @@ def repository(ctx: click.Context, pulp_ctx: PulpContext, repo_type: str) -> Non | |
|
||
|
||
lookup_options = [href_option, name_option] | ||
create_options = [ | ||
click.option("--name", required=True), | ||
click.option("--description"), | ||
click.option("--retain-package-versions", type=int), | ||
click.option("--remote", callback=_remote_callback), | ||
] | ||
update_options = [ | ||
click.option("--description"), | ||
click.option("--retain-package-versions", type=int), | ||
click.option("--remote", callback=_remote_callback), | ||
click.option( | ||
"--metadata-checksum-type", type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False) | ||
), | ||
click.option( | ||
"--package-checksum-type", type=click.Choice(CHECKSUM_CHOICES, case_sensitive=False) | ||
), | ||
click.option("--gpgcheck", type=click.Choice(("0", "1"))), | ||
click.option("--repo-gpgcheck", type=click.Choice(("0", "1"))), | ||
click.option("--sqlite-metadata/--no-sqlite-metadata", default=None), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
click.option("--autopublish/--no-autopublish", default=None), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This kind of completes the repository options, not necessarily related to auto publish. |
||
] | ||
create_options = update_options + [click.option("--name", required=True)] | ||
|
||
repository.add_command(list_command(decorators=[label_select_option])) | ||
repository.add_command(show_command(decorators=lookup_options)) | ||
|
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.
👍