Skip to content
Draft
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
12 changes: 12 additions & 0 deletions pulp-glue-deb/pulp_glue/deb/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pulp_glue.common.context import ( # type: ignore[attr-defined]
EntityDefinition,
PluginRequirement,
PulpACSContext,
PulpContentContext,
PulpEntityContext,
PulpException,
Expand Down Expand Up @@ -219,3 +220,14 @@ class PulpAptRepositoryContext(PulpRepositoryContext):
RESOURCE_TYPE = "apt"
VERSION_CONTEXT = PulpAptRepositoryVersionContext
CAPABILITIES = {"pulpexport": [PluginRequirement("deb", "2.20.0")]}


class PulpDebACSContext(PulpACSContext):
PLUGIN = "deb"
RESOURCE_TYPE = "apt"
ENTITY = _("deb ACS")
ENTITIES = _("deb ACSes")
REPOSITORY_HREF = "deb_apt_alternate_content_source_href"
ID_PREFIX = "acs_deb_apt"
NEEDS_PLUGINS = [PluginRequirement("deb", specifier=">=3.8.0")]
CAPABILITIES = {"roles": [PluginRequirement("deb", specifier=">=3.8.0")]}
8 changes: 8 additions & 0 deletions pulpcore/cli/deb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from typing import Any

import click
from pulp_glue.deb.context import PulpAptRemoteContext, PulpDebACSContext
from pulpcore.cli.common.generic import pulp_group

from pulpcore.cli.common.acs import acs_command
from pulpcore.cli.deb.content import content
from pulpcore.cli.deb.distribution import distribution
from pulpcore.cli.deb.publication import publication
Expand All @@ -23,4 +25,10 @@ def mount(main: click.Group, **kwargs: Any) -> None:
deb_group.add_command(remote)
deb_group.add_command(repository)
deb_group.add_command(content)
deb_group.add_command(
acs_command(
acs_contexts={"deb": PulpDebACSContext},
remote_context_table={"deb:apt": PulpAptRemoteContext},
)
)
main.add_command(deb_group)
Loading