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

Modular content on top of issue 4152 #1237

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion extensions_admin/pulp_rpm/extensions/admin/copy_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from pulp_rpm.common.ids import (TYPE_ID_RPM, TYPE_ID_SRPM, TYPE_ID_DRPM, TYPE_ID_ERRATA,
TYPE_ID_DISTRO, TYPE_ID_PKG_GROUP, TYPE_ID_PKG_CATEGORY,
TYPE_ID_PKG_ENVIRONMENT, TYPE_ID_PKG_LANGPACKS,
TYPE_ID_YUM_REPO_METADATA_FILE, UNIT_KEY_RPM)
TYPE_ID_YUM_REPO_METADATA_FILE, UNIT_KEY_RPM,
TYPE_ID_MODULEMD)

# -- constants ----------------------------------------------------------------

Expand All @@ -24,6 +25,7 @@
DESC_PKG_LANGPACKS = _('copy package langpacks from one repository to another')
DESC_METAFILE = _('copy yum repo metadata files from one repository to another')
DESC_ALL = _('copy all content units from one repository to another')
DESC_MODULEMD = _('copy a Module from one repository to another')

DESC_RECURSIVE = _(
'if specified, any dependencies of units being copied that are in the source repo '
Expand Down Expand Up @@ -164,3 +166,8 @@ def __init__(self, context):
class AllCopyCommand(NonRecursiveCopyCommand):
def __init__(self, context):
NonRecursiveCopyCommand.__init__(self, context, 'all', DESC_ALL, None)


class ModulemdCopyCommand(RecursiveCopyCommand):
def __init__(self, context):
RecursiveCopyCommand.__init__(self, context, 'module', DESC_MODULEMD, TYPE_ID_MODULEMD)
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def initialize(context):
copy_section.add_command(copy_commands.SrpmCopyCommand(context))
copy_section.add_command(copy_commands.YumRepoMetadataFileCommand(context))
copy_section.add_command(copy_commands.DrpmCopyCommand(context))
copy_section.add_command(copy_commands.ModulemdCopyCommand(context))

remove_section = structure.repo_remove_section(context.cli)
remove_section.add_command(remove.RpmRemoveCommand(context))
Expand Down
Loading