This is a command line interface for Pulp 3.
This software is in beta and future releases may include backwards incompatible changes.
pulp [<global_options>] <plugin> <resource_class> [--type <resource_type>] <action> [<action_options>]
Global options include:
--base-url--user--password--config--format-v/-vv/-vvv
The pulp-cli package can be installed from a variety of sources. After installing, see the next section on how to configure pulp-cli.
pip install pulp-cli
git clone <your_fork_url>
cd pulp-cli
pip install -e .
The CLI can be configured by using a toml file.
By default the location of this file is ~/.config/pulp/settings.toml.
However, this can be customized by using the --config option.
Any settings supplied as options to a command will override these settings.
Example file:
[cli]
base_url = "https://pulp.dev"
verify_ssl = false
format = "json"If no user/pass is supplied either in the config file or as an option,
then the CLI will attempt to use ~/.netrc.
Here is a .netrc example for localhost:
machine localhost
login admin
password password
- Redirecting from
httptohttps, as done by a typical Pulp installation, does not work properly withPOSTandPUTrequests. Please usehttps://in the base url. Note that the attempt to usehttpleaks sensitive data over an unencrypted connection.
pulp status
pulp file repository list
pulp file repository create --name file_repo1
pulp file repository update --name file_repo1 --description "Contains plain files"
pulp file repository destroy --name file_repo1
Tests are run using pytest.
Tests are shell scripts in tests/scripts with names like test_*.sh.
The CLI uses the click package which supports shell completion.
To configure this, check out click's
documentation.
As an example, here is what to add to your ~/.bashrc file if you're using bash:
eval "$(_PULP_COMPLETE=source_bash pulp)"pulp-cli comes with python type annotations and black code formatting.
To verify your code please run black, flake8, shellcheck, and mypy.
This cli for Pulp 3 will be versioned indedendently of any version of the server components. It is supposed to be able to communicate with different combinations of server component versions at the same time. So it might be needed to guard certain features / workaround by the available server plugin version.
- Generate the changelog (eg
towncrier --yes --version 0.1.0) and commit - Run
bumpversion release, commit your local changes, and note the commit sha - Run
bumpversion patchto update the version to the next dev release version - Push your commits, open a PR, and get it merged
- After your PR is merged, pull the latest changes from develop
- Now tag your release commit (e.g.
git tag 0.1.0) and push to pulp/pulp-cli - Monitor the build job and then check PyPI to make sure the package has been uploaded
- Go into plan.io and set CLI issues to
CLOSED - CURRENT RELEASE - Send an email to pulp-list and pulp-dev to announce the release