pulp / pulp/pulp-cli

Make export/import process simpler for CLI

Open
#101 8 comments 0 reactions 1 assignee View on GitHub

@ggainey is already working on this.

Since Jan 25, 2023.

feature request prio-list
Dominant language
Python
Stars
43
Forks
52
Avg merge
11h 38m
Merged PRs (30d)
11

Description

Users should be able to export the repositories they want in one command and shouldn't need to know the difference between 'export' and 'exporter'. I propose we remove the 'export' commands and re-brand them under 'exporter'. Exporter should get two new subcommands: 'export' and 'history'.

The 'history' command would get three subcommands from the original 'export' command: 'list', 'show', and 'delete'. Export objects are basically history records of previous exports and thus would fit nicely under this context. If a user doesn't specify a subcommand when using 'history' the default behaviour should be 'list' so they can see all the export objects aka the history.

The new 'export' sub command will take over the original export's 'run' command. This command will have extra functionality to allow for the creation of an exporter so the whole process can be done in one command.

Examples:

with Exporter named foo:

$pulp exporter pulp export --name foo [export options]
Started export task. Task href: ...

with no Exporter:

$pulp exporter pulp export --base-path tmp/exports/ --repository file_repo file --repository rpm_repo rpm [export options]
Would you like to save these configurations? [y/n]
$y
Please give a name to the exporter config options:
$bar
Config options saved in exporter object bar
Started export task. Task href: ...

If the user would specify 'no' on saving the config options, the command would give the created exporter a default name. The other commands under 'exporter' should have their help descriptions updated to reflect the exporter's role as a config object.

A similar process should be applied to the 'importer' commands so that the experience is consistent.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.