Story #3821: As a user, I can migrate from Pulp 2 to Pulp 3
Add ability to pre-migrate importers and distributors independently from the repo they belong to
There is a use case which implies migration of an importer or of a distributor without migrating a pulp 2 repo they belong to: in the migration plan users can specify which distributor or which importer to use, and it's possible that repository they belong to doesn't need to be migrated.
Current implementation can migrate selectively importers and distributors but only from the repositories which needs to be migrated.
Allow to pre-migrate importers and distributors independently from a repo if needed.
- Introduce new method
get_mentioned_repositories(?) on a migration plan object which will return all the repo_ids mentioned in the plan - repositories to migrate, repositories to take importers or distributors from.
(Currently we have
get_repositorieswhich return which repositories to migrate.
- Use the list of
mentioned_repositoriesto get info from pulp2 and iterate over.
- Update repo pre-migration to pre-migrate only repositories needed to be migrated
- Update repocontent pre-migration to pre-migrate only content from the repositories needed to be migrate
- Allow relation to Pulp2Repository be null for Pulp2Importer and Pulp2Distributor.