Task #2399
Updated by amacdona@redhat.com over 7 years ago
Task name in Pulp 2: `pulp.server.managers.repo.sync.sync`. Task implementation in Pulp 2: https://github.com/pulp/pulp/blob/3.0-dev/server/pulp/server/controllers/repository.py#L694 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) 5. 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. 7. Call sync (it should take no arguments) 8. Restore original current working directory for the process.