diff --git a/CHANGES/6927.feature b/CHANGES/6927.feature new file mode 100644 index 00000000..b025410a --- /dev/null +++ b/CHANGES/6927.feature @@ -0,0 +1 @@ +Add support for migrating SLES12+ repos which require auth token. diff --git a/pulp_2to3_migration/app/plugin/rpm/repository.py b/pulp_2to3_migration/app/plugin/rpm/repository.py index 46c79510..aa8c44a4 100644 --- a/pulp_2to3_migration/app/plugin/rpm/repository.py +++ b/pulp_2to3_migration/app/plugin/rpm/repository.py @@ -32,6 +32,9 @@ def migrate_to_pulp3(cls, pulp2importer): """ pulp2_config = pulp2importer.pulp2_config base_config, name = cls.parse_base_config(pulp2importer, pulp2_config) + sles_auth_token = pulp2_config.get('query_auth_token') + if sles_auth_token: + base_config['sles_auth_token'] = sles_auth_token return RpmRemote.objects.update_or_create(name=name, defaults=base_config)