Using Pulp CLI

You can use Pulp CLI to read information about synchronized content on your orcharhino Server. Use pulp --help to view a list of commands. Each command and subcommand contains further help, for example pulp deb --help or pulp rpm remote --help.

Note that Pulp CLI is read-only. If you want to add, update, or delete content, use orcharhino management UI, Hammer CLI, or Foreman Ansible Modules instead. Any subcommand that tries to add, update, or delete content prints Error: Call aborted due to safe mode and returns a non-zero exit code.

Viewing Pulp CLI Help

You can use Pulp CLI similarly to Hammer CLI. Use the built-in --help flag to navigate subcommands:

$ pulp --help

Pulp CLI subcommands return valid JSON output that you can filter using jq or similar tools. For more information on filtering JSON output using jq, see jq Manual.

Pulp CLI Terminology

These terms only apply to Pulp, Pulp CLI, and Pulp API. For more information about orcharhino terminology, see Glossary.

Distribution

A distribution is a consumable publication.

Publication

A publication consists of the meta data and artifacts based on manually uploaded content or synchronized remotes of a repository. It consists of both content and meta data.

Repository Version

A repository version is a snapshot of the content within a repository.

Repository

A repository holds software packages. You can either synchronize a repository with a remote or manually upload content.

Remote

A remote is a URL that you can synchronize repositories with. It is closely related to an Upstream URL in orcharhino.

Pulp CLI Examples

Filtering Pulp Repositories Using Regular Expression
$ pulp deb repository list | jq '.[] | select( .name | match("ubuntu"; "i"))'
Viewing the URLs of All deb remotes
$ pulp deb remote list --limit 1000000 | jq '.[] | .url'
Viewing a List of deb Publications Created After A Certain Date
$ pulp deb publication list --created-after "2022-07-01T08:30:00+02:00" | jq '.[] .pulp_href'
Viewing a List of deb Distributions
$ pulp deb distribution list | jq '.[] | .base_url'
Viewing the Licences of All .rpm Packages
$ pulp rpm content list --limit 1000000 | jq '.[] | .rpm_license' | sort -u
Verifying That a Certain Remote Repository Is Enabled
$ pulp rpm remote list --limit 1000000 | jq '.[] | .url' | grep -i "/nginx/"
Checking That a Certain URL Is Enabled
$ pulp rpm remote list --limit 1000000 | jq '.[] .url | test("AlmaLinux9")' | grep -v "false" | sort -u