# pulp-cli import/export command proposal ## Related Issues: * [Incremental-FS-export](https://github.com/pulp/pulpcore/issues/3413) * [Clean up import/export CLI](https://github.com/pulp/pulp-cli/issues/101) * [Add fs-exporter to CLI](https://github.com/pulp/pulp-cli/issues/619) ## Executive Summary There are two kinds-of Exporters in use, PulpExporter and FilesystemExporter. There is currently just one import-type, PulpImporter and PulpImport. We want a simple consistent CLI experience for both. Exports are created from Exporters, from the users' POV "exporter run" makes sense even though it isn't exactly how the REST API looks at things. Polymorphic commands now exist (thanks gerrod!) **Nouns**: exporter, exports, importer, imports (NOTE: using the plural exports/imports to avoid collision w/ the **verb** export/import in peoples' minds) **Types**: pulp, filesystem **Verbs**: create, list, show, update, destroy, **run** (exporter/importer) ## Command trees: * **TYPE**: --type pulp|filesystem * defaults to...pulp? maybe? * pulp exporter * pulp exports [TYPE] * pulp importer --type pulp * pulp imports --type pulp ### Exporter * pulp exporter [TYPE] create * **both**: --name --path * **-t pulp**: --repositories --last_export * **-t filesystem**: --method * pulp exporter [TYPE] list * pulp exporter [TYPE] show --name|--href * pulp exporter [TYPE] update --name|--href * **both**: --path * **-t pulp**: --repositories --last_export * **-t filesystem**: --method * pulp exporter [TYPE] destroy --name|--href * pulp exporter [TYPE] run * **both**: --name|--href * **-t pulp**: --versions --start-versions --dry-run --full --chunk-size * **-t filesystem**: --publication --repository --start-repository-version ### Exports * pulp exports [TYPE] list --exporter name|href * pulp exports show --href * pulp exports destroy --exporter(?)|--href ### Importer * pulp importer [--type pulp] create --name --repo-mapping * pulp importer [TYPE] list * pulp importer [TYPE] show --name|--href * pulp importer [TYPE] update --name|--href --repo-mapping * pulp importer [TYPE] destroy --name|--href * pulp importer [TYPE] run --name|--href --path --toc --create-repositories ### Imports * pulp imports [TYPE] list --importer name|href * pulp imports show --href * pulp imports destroy --importer(?)|--href ###### tags: `import/export`, `CLI`