diff --git a/CHANGES/7365.feature b/CHANGES/7365.feature new file mode 100644 index 00000000..ab401d44 --- /dev/null +++ b/CHANGES/7365.feature @@ -0,0 +1 @@ +Make the migration plugin compatible with pulp_container 2.0 diff --git a/pulp_2to3_migration/app/plugin/docker/migrator.py b/pulp_2to3_migration/app/plugin/docker/migrator.py index 729d4370..ab678211 100644 --- a/pulp_2to3_migration/app/plugin/docker/migrator.py +++ b/pulp_2to3_migration/app/plugin/docker/migrator.py @@ -25,7 +25,6 @@ Tag, ) -from pulp_2to3_migration.app.constants import NOT_USED from pulp_2to3_migration.app.plugin.api import ( ContentMigrationFirstStage, DeclarativeContentMigration, @@ -35,7 +34,6 @@ from pulpcore.plugin.stages import ( ArtifactSaver, ContentSaver, - DeclarativeArtifact, ResolveContentFutures, Stage, QueryExistingArtifacts, @@ -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 diff --git a/pulp_2to3_migration/app/plugin/docker/repository.py b/pulp_2to3_migration/app/plugin/docker/repository.py index bca08487..86cb7be0 100644 --- a/pulp_2to3_migration/app/plugin/docker/repository.py +++ b/pulp_2to3_migration/app/plugin/docker/repository.py @@ -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)