Need a dry run option to see content is importable
Pulp3 as of https://pulp.plan.io/issues/7549 added functionality to do dry run import-checks.
More documentation here -> https://docs.pulpproject.org/pulpcore/workflows/import-export.html#pre-validating-import-parameters
This will check if
- Paths are in ALLOWED_IMPORT_PATHS
- Containing directory exists
- Containing directory is readable
- Path/toc file(s) exist and are readable
- For TOC, containing directory is writeable
- repo_mapping is valid JSON
The import task needs to call this api and verify its response before starting the actual import.
(We are passing the toc location in params since repo mapping isn't generated yet)