Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Make the migration plugin compatible with pulp_container 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ipanova committed Aug 25, 2020
1 parent 3aa3d04 commit a056903
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGES/7365.feature
@@ -0,0 +1 @@
Make the migration plugin compatible with pulp_container 2.0
11 changes: 0 additions & 11 deletions pulp_2to3_migration/app/plugin/docker/migrator.py
Expand Up @@ -25,7 +25,6 @@
Tag,
)

from pulp_2to3_migration.app.constants import NOT_USED
from pulp_2to3_migration.app.plugin.api import (
ContentMigrationFirstStage,
DeclarativeContentMigration,
Expand All @@ -35,7 +34,6 @@
from pulpcore.plugin.stages import (
ArtifactSaver,
ContentSaver,
DeclarativeArtifact,
ResolveContentFutures,
Stage,
QueryExistingArtifacts,
Expand Down Expand Up @@ -262,13 +260,4 @@ async def _pre_save(self, batch):
# We are relying on the order of the processed DC
# Manifests should have passed through ContentSaver stage already
man = Manifest.objects.filter(digest=related_man_id).first()
artifact = man._artifacts.get()
# add manifest's artifact
da = DeclarativeArtifact(
artifact=artifact,
url=NOT_USED,
relative_path=dc.content.name,
remote=NOT_USED,
deferred_download=False)
dc.d_artifacts.append(da)
dc.content.tagged_manifest = man
2 changes: 1 addition & 1 deletion pulp_2to3_migration/app/plugin/docker/repository.py
Expand Up @@ -25,7 +25,7 @@ def migrate_to_pulp3(cls, pulp2importer):
base_config, name = cls.parse_base_config(pulp2importer, pulp2_config)
# what to do if there is no upstream name?
base_config['upstream_name'] = pulp2_config.get('upstream_name', '')
base_config['whitelist_tags'] = pulp2_config.get('tags')
base_config['include_tags'] = pulp2_config.get('tags')
return ContainerRemote.objects.update_or_create(name=name, defaults=base_config)


Expand Down

0 comments on commit a056903

Please sign in to comment.