pulp_smash.constants

Location: Pulp SmashAPI Documentationpulp_smash.constants

Values usable by multiple test modules.

pulp_smash.constants.CALL_REPORT_KEYS = frozenset({'spawned_tasks', 'result', 'error'})

See: Call Report.

pulp_smash.constants.CONSUMERS_ACTIONS_CONTENT_REGENERATE_APPLICABILITY_PATH = '/pulp/api/v2/consumers/actions/content/regenerate_applicability/'

See: Content Applicability.

pulp_smash.constants.CONSUMERS_CONTENT_APPLICABILITY_PATH = '/pulp/api/v2/consumers/content/applicability/'

See: Content Applicability.

pulp_smash.constants.CONSUMERS_PATH = '/pulp/api/v2/consumers/'

See: Consumer APIs.

pulp_smash.constants.CONTENT_SOURCES_PATH = '/etc/pulp/content/sources/conf.d'

See: Content Sources.

pulp_smash.constants.CONTENT_UNITS_PATH = '/pulp/api/v2/content/units/'

See: Search for Units.

pulp_smash.constants.CONTENT_UPLOAD_PATH = '/pulp/api/v2/content/uploads/'

See: Creating an Upload Request.

pulp_smash.constants.DOCKER_IMAGE_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/docker/busybox:latest.tar'

The URL to a Docker image as created by docker save.

pulp_smash.constants.DOCKER_UPSTREAM_NAME = 'library/busybox'

The name of a repository present in each of the two docker feeds.

pulp_smash.constants.DOCKER_V1_FEED_URL = 'https://index.docker.io'

The URL to a V1 Docker registry.

This URL can be used as the “feed” property of a Pulp Docker registry.

pulp_smash.constants.DOCKER_V2_FEED_URL = 'https://registry-1.docker.io'

The URL to a V2 Docker registry.

This URL can be used as the “feed” property of a Pulp Docker registry.

pulp_smash.constants.DRPM = 'drpms/test-alpha-1.1-1_1.1-2.noarch.drpm'

The path to a DRPM file in one of the DRPM repositories.

This path may be joined with DRPM_SIGNED_FEED_URL or DRPM_UNSIGNED_FEED_URL.

pulp_smash.constants.DRPM_SIGNED_FEED_COUNT = 4

The number of packages available at DRPM_SIGNED_FEED_URL.

pulp_smash.constants.DRPM_SIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm-signed/'

The URL to a signed DRPM repository.

pulp_smash.constants.DRPM_SIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm-signed/drpms/test-alpha-1.1-1_1.1-2.noarch.drpm'

The URL to a DRPM file.

Built from DRPM_SIGNED_FEED_URL and DRPM.

pulp_smash.constants.DRPM_UNSIGNED_FEED_COUNT = 4

The number of packages available at DRPM_UNSIGNED_FEED_URL.

pulp_smash.constants.DRPM_UNSIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm-unsigned/'

The URL to an unsigned DRPM repository.

pulp_smash.constants.DRPM_UNSIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/drpm-unsigned/drpms/test-alpha-1.1-1_1.1-2.noarch.drpm'

The URL to a unsigned DRPM file.

Built from DRPM_UNSIGNED_FEED_URL and DRPM.

pulp_smash.constants.ERROR_KEYS = frozenset({'http_status', 'exception', 'error', '_href', 'traceback', 'error_message'})

See: Exception Handling.

No href field should be present. See Issue #1310.

pulp_smash.constants.FILE_FEED_COUNT = 3

The number of packages available at FILE_FEED_URL.

pulp_smash.constants.FILE_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/file/'

The URL to a file repository.

pulp_smash.constants.FILE_MIXED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/file-mixed/'

The URL to a file repository containing invalid and valid entries.

pulp_smash.constants.FILE_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/file/1.iso'

The URL to an ISO file at FILE_FEED_URL.

pulp_smash.constants.GROUP_CALL_REPORT_KEYS = frozenset({'group_id', '_href'})

See: Group Call Report.

pulp_smash.constants.LOGIN_KEYS = frozenset({'certificate', 'key'})

See: User Certificates.

pulp_smash.constants.LOGIN_PATH = '/pulp/api/v2/actions/login/'

See: Authentication.

pulp_smash.constants.ORPHANS_PATH = 'pulp/api/v2/content/orphans/'

See: Orphaned Content.

pulp_smash.constants.OSTREE_BRANCH = 'fedora-atomic/f21/x86_64/updates/docker-host'

A branch in OSTREE_FEED. See OSTree Importer Configuration.

pulp_smash.constants.OSTREE_FEED = 'https://repos.fedorapeople.org/pulp/pulp/demo_repos/test-ostree-small'

The URL to a URL of OSTree branches. See OSTree Importer Configuration.

pulp_smash.constants.PLUGIN_TYPES_PATH = '/pulp/api/v2/plugins/types/'

See: Retrieve All Content Unit Types.

pulp_smash.constants.PULP_FIXTURES_BASE_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/'

A URL at which generated pulp fixtures are hosted.

pulp_smash.constants.PULP_FIXTURES_KEY_ID = '269d9d98'

The 32-bit ID of the public key used to sign various fixture files.

To calculate a new key ID, find the public key used by Pulp Fixtures (it should be in the Pulp Fixtures source code repository) and use GnuPG to examine it:

$ gpg "$public_key_file"
pub   rsa2048 2016-08-05 [SC]
      6EDF301256480B9B801EBA3D05A5E6DA269D9D98
uid           Pulp QE
sub   rsa2048 2016-08-05 [E]

The last 32 bits (8 characters) of the key ID are what Pulp wants — in this example, 269D9D98.

pulp_smash.constants.PULP_SERVICES = {'pulp_celerybeat', 'pulp_workers', 'httpd', 'pulp_resource_manager'}

Core Pulp services.

There are services beyond just these that Pulp depends on in order to function correctly. For example, an AMQP broker such as RabbitMQ or Qpid is integral to Pulp’s functioning. However, if resetting Pulp (such as in pulp_smash.utils.reset_pulp()), this is the set of services that should be restarted.

pulp_smash.constants.PUPPET_FEED_2 = 'http://forge.puppetlabs.com'

The URL to a repository of Puppet modules.

pulp_smash.constants.PUPPET_MODULE_1 = {'author': 'pulpqe', 'version': '0.1.0', 'name': 'dummypuppet'}

Information about a Puppet module available via Pulp Fixtures.

pulp_smash.constants.PUPPET_MODULE_2 = {'author': 'pulp', 'version': '1.0.0', 'name': 'pulp'}

Information about a Puppet module available at PUPPET_FEED_2.

pulp_smash.constants.PUPPET_MODULE_URL_1 = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/puppet/pulpqe-dummypuppet.tar.gz'

The URL to a Puppet module module available via Pulp Fixtures.

Test cases that require a single module should use this URL, and test cases that require a feed should use PUPPET_MODULE_URL_2. Doing so shifts load away from the Puppet Forge.

Why do both URLs exist? Because simulating the Puppet Forge’s behaviour is unreasonably hard.

Pulp Fixtures is designed to create data that can be hosted by a simple HTTP server, such as python3 -m http.server. A dynamic API, such as the Puppet Forge API, cannot be simulated. We could create a static tree of files, where that tree of files is the same as what the Puppet Forge would provide in response to a certain HTTP GET request. However:

  • The Puppet Forge API will inevitably change over time as bugs are fixed and features are added. This will make a static facsimile of the Puppet Forge API outdated. This is more than a mere inconvenience: outdated information is also confusing!
  • Without an in-depth understanding of each and every file the Puppet Forge yields, it is probable that static fixtures will be wrong from the get-go.
pulp_smash.constants.PUPPET_MODULE_URL_2 = 'http://forge.puppetlabs.com/v3/files/pulp-pulp-1.0.0.tar.gz'

The URL to a Puppet module available at PUPPET_FEED_2.

pulp_smash.constants.PUPPET_QUERY_2 = 'pulp-pulp-1.0.0'

A query that can be used to search for Puppet modules.

Built from PUPPET_MODULE_2.

Though the Puppet Forge API supports a variety of search types, Pulp only supports the ability to search for modules. As a result, it is impossible to create a Puppet repository and sync only an exact module or set of modules. This query intentionally returns a small number of Puppet modules. A query which selected a large number of modules would produce tests that took a long time and abused the free Puppet Forge service.

Beware that the Pulp API takes given Puppet queries and uses them to construct URL queries verbatim. Thus, if the user gives a query of “foo bar”, the following URL is constructed:

In an attempt to avoid this error, this query is encoded before being submitted to Pulp.

pulp_smash.constants.PYTHON_EGG_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/python-pypi/packages/3a/e3/a6954c4134a899c0006515fbd40208922572947e960b35d0d19fd5a1b3d0/shelf-reader-0.1.tar.gz'

The URL to a Python egg at PYTHON_PYPI_FEED_URL.

pulp_smash.constants.PYTHON_PYPI_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/python-pypi/'

The URL to the PyPI Python repository.

pulp_smash.constants.PYTHON_WHEEL_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/python-pypi/packages/77/e0/2156a3da94ee16466a5936394caf7e89873a9b46eed72a9912bc90e42dbf/shelf_reader-0.1-py2-none-any.whl'

The URL to a Python egg at PYTHON_PYPI_FEED_URL.

pulp_smash.constants.REPOSITORY_EXPORT_DISTRIBUTOR = 'export_distributor'

A distributor_type_id to export a repository.

See: Export Distributors.

pulp_smash.constants.REPOSITORY_GROUP_EXPORT_DISTRIBUTOR = 'group_export_distributor'

A distributor_type_id to export a repository group.

See: Export Distributors.

pulp_smash.constants.REPOSITORY_GROUP_PATH = '/pulp/api/v2/repo_groups/'

See: Repository Group APIs

pulp_smash.constants.REPOSITORY_PATH = '/pulp/api/v2/repositories/'

See: Repository APIs.

pulp_smash.constants.RPM = 'bear-4.1-1.noarch.rpm'

The name of an RPM file. See pulp_smash.constants.RPM_SIGNED_URL.

pulp_smash.constants.RPM2 = 'camel-0.1-1.noarch.rpm'

The name of an RPM. See pulp_smash.constants.RPM2_UNSIGNED_URL.

pulp_smash.constants.RPM2_UNSIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/camel-0.1-1.noarch.rpm'

The URL to an unsigned RPM file.

Built from RPM_UNSIGNED_FEED_URL and RPM2.

pulp_smash.constants.RPM_ALT_LAYOUT_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-alt-layout/'

The URL to a signed RPM repository. See RPM_SIGNED_URL.

pulp_smash.constants.RPM_ERRATUM_COUNT = 4

The number of errata listed in RPM_ERRATUM_URL.

pulp_smash.constants.RPM_ERRATUM_ID = 'RHEA-2012:0058'

The ID of an erratum.

The package contained on this erratum is defined by pulp_smash.constants.RPM_ERRATUM_RPM_NAME and the erratum is present on repository which feed is pulp_smash.constants.RPM_SIGNED_FEED_URL.

pulp_smash.constants.RPM_ERRATUM_RPM_NAME = 'gorilla'

The name of the RPM named by pulp_smash.constants.RPM_ERRATUM_ID.

pulp_smash.constants.RPM_ERRATUM_URL = 'https://repos.fedorapeople.org/repos/pulp/pulp/fixtures/rpm-erratum/erratum.json'

The URL to an JSON erratum file for an RPM repository.

Note

This erratum is also used by several of the RPM repositories referenced in this module.

pulp_smash.constants.RPM_INCOMPLETE_FILELISTS_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-incomplete-filelists/'

The URL to a repository with an incomplete filelists.xml file.

pulp_smash.constants.RPM_INCOMPLETE_OTHER_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-incomplete-other/'

The URL to a repository with an incomplete other.xml file.

pulp_smash.constants.RPM_MIRRORLIST_BAD = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-mirrorlist-bad'

The URL to a mirrorlist file containing only invalid entries.

pulp_smash.constants.RPM_MIRRORLIST_GOOD = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-mirrorlist-good'

The URL to a mirrorlist file containing only valid entries.

pulp_smash.constants.RPM_MIRRORLIST_MIXED = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-mirrorlist-mixed'

The URL to a mirrorlist file containing invalid and valid entries.

pulp_smash.constants.RPM_MISSING_FILELISTS_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-missing-filelists/'

A repository that’s missing its filelists.xml file.

pulp_smash.constants.RPM_MISSING_OTHER_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-missing-other/'

A repository that’s missing its other.xml file.

pulp_smash.constants.RPM_MISSING_PRIMARY_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-missing-primary/'

A repository that’s missing its primary.xml file.

pulp_smash.constants.RPM_NAMESPACES = {'metadata/repo': 'http://linux.duke.edu/metadata/repo', 'metadata/common': 'http://linux.duke.edu/metadata/common', 'metadata/rpm': 'http://linux.duke.edu/metadata/rpm'}

Namespaces used by XML-based RPM metadata.

Many of the XML files generated by the createrepo utility make use of these namespaces. Some of the files that use these namespaces are listed below:

metadata/common
Used by repodata/primary.xml.
metadata/repo
Used by repodata/repomd.xml.
metadata/rpm
Used by repodata/repomd.xml.
pulp_smash.constants.RPM_PKGLISTS_UPDATEINFO_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-pkglists-updateinfo/'

A repository whose updateinfo file has multiple <pkglist> sections.

pulp_smash.constants.RPM_SIGNED_FEED_COUNT = 32

The number of packages available at RPM_SIGNED_FEED_URL.

pulp_smash.constants.RPM_SIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-signed/'

The URL to a signed RPM repository. See RPM_SIGNED_URL.

pulp_smash.constants.RPM_SIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-signed/bear-4.1-1.noarch.rpm'

The URL to an RPM file.

Built from RPM_SIGNED_FEED_URL and RPM.

pulp_smash.constants.RPM_UNSIGNED_FEED_COUNT = 32

The number of packages available at RPM_UNSIGNED_FEED_URL.

pulp_smash.constants.RPM_UNSIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/'

The URL to an unsigned RPM repository. See RPM_SIGNED_URL.

pulp_smash.constants.RPM_UNSIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/bear-4.1-1.noarch.rpm'

The URL to an unsigned RPM file.

Built from RPM_UNSIGNED_FEED_URL and RPM.

pulp_smash.constants.RPM_WITH_NON_ASCII_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-non-ascii/rpm-with-non-ascii-1-1.fc25.noarch.rpm'

The URL to an RPM with non-ascii metadata in its header.

pulp_smash.constants.RPM_WITH_NON_UTF_8_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-non-utf-8/rpm-with-non-utf-8-1-1.fc25.noarch.rpm'

The URL to an RPM with non-UTF-8 metadata in its header.

pulp_smash.constants.RPM_WITH_PULP_DISTRIBUTION_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-pulp-distribution/'

The URL to a RPM repository with a PULP_DISTRIBUTION.xml file.

pulp_smash.constants.SRPM = 'test-srpm02-1.0-1.src.rpm'

An SRPM file at pulp_smash.constants.SRPM_SIGNED_FEED_URL.

pulp_smash.constants.SRPM_SIGNED_FEED_COUNT = 3

The number of packages available at SRPM_SIGNED_FEED_URL.

pulp_smash.constants.SRPM_SIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/srpm-signed/'

The URL to a signed SRPM repository.

pulp_smash.constants.SRPM_SIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/srpm-signed/test-srpm02-1.0-1.src.rpm'

The URL to an SRPM file.

Built from SRPM_SIGNED_FEED_URL and SRPM.

pulp_smash.constants.SRPM_UNSIGNED_FEED_COUNT = 3

The number of packages available at SRPM_UNSIGNED_FEED_COUNT.

pulp_smash.constants.SRPM_UNSIGNED_FEED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/srpm-unsigned/'

The URL to an unsigned SRPM repository.

pulp_smash.constants.SRPM_UNSIGNED_URL = 'https://repos.fedorapeople.org/pulp/pulp/fixtures/srpm-unsigned/test-srpm02-1.0-1.src.rpm'

The URL to an unsigned SRPM file.

Built from SRPM_UNSIGNED_FEED_URL and SRPM.

pulp_smash.constants.USER_PATH = '/pulp/api/v2/users/'

See: User APIs.