Task #2399

Updated by almost 3 years ago

Task name in Pulp 2: `pulp.server.managers.repo.sync.sync`.
Task implementation in Pulp 2:

The 2.y implementation does a huge amount of things we don't need to do anymore. The 3.0 implementation should do the following:

1. Query for the instance of the Importer's Master model that needs to be synced
2. Cast that Importer master instance to a detail instance
3. Take any overrides and set them as attributes overwriting whatever is already there
4. Call validate on the detail instance. (This should use the normal Django model validation and will handle both plugin provided validation and platform provided validation)
Set the working_dir attribute on the detail instance. This was part of issue #2456
4. 6. Set current working directory for the process to working_dir.
Call sync (it should take no arguments)
8. Restore original current working directory for the process.