Story #3810
Updated by dkliban@redhat.com over 5 years ago
h2. Desired workflow for migrating ISO content h5. 1. Create a migration plan by POSTing to */pulp/api/v3/migration-plans/* the following JSON. <pre> { "plugins": [ { "type": "file", "content": true, } ] } </pre> h5. 2. Run the migration plan POST request to */pulp/api/v3/migration-plans/asdf-2345-ghjk-4567-adc/run/* h2. Implementation details The migrate_from_pulp2 task[0] needs to be updated to do the following: 1. Query the Pulp2Content model for: type='iso', pulp3content=None 2. Dispatch 36 'migrate_content' coroutines with 1 parameter: content_queryset - a slice 2 parameters: 'iso' and one of the queryset from step 1. letters of the alphabet or a digit. 2. The 'migrate_content' coroutine is going to query the Pulp2Content model for: type='iso', pulp3content=None, uuid LIKE 'a%' (or whatever character was passed in). 3. For each unit discovered, the coroutine will do the following: * create a hard link in /var/lib/pulp/artifacts/ directory * create Artifact in the Pulp3 database * create FileContent in the Pulp3 database * update the Pulp2Content model with a reference to the FileContent [0] https://github.com/pulp/pulp-2to3-migrate/blob/master/pulp_2to3_migrate/app/tasks/migrate.py#L3