pulpcore.client.pulp_rpm.ContentPackagesApi
All URIs are relative to http://localhost:24817
Method | HTTP request | Description |
---|---|---|
create | POST /pulp/api/v3/content/rpm/packages/ | Create a package |
list | GET /pulp/api/v3/content/rpm/packages/ | List packages |
read | GET {rpm_package_href} | Inspect a package |
create
AsyncOperationResponse create(repository=repository, artifact=artifact, relative_path=relative_path, file=file, upload=upload)
Create a package
Trigger an asynchronous task to create an RPM package,optionally create new repository version.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
repository = 'repository_example' # str | A URI of a repository the new content unit should be associated with. (optional)
artifact = 'artifact_example' # str | Artifact file representing the physical content (optional)
relative_path = 'relative_path_example' # str | Path where the artifact is located relative to distributions base_path (optional)
file = '/path/to/file' # file | An uploaded file that may be turned into the content unit. (optional)
upload = 'upload_example' # str | An uncommitted upload that may be turned into the content unit. (optional)
try:
# Create a package
api_response = api_instance.create(repository=repository, artifact=artifact, relative_path=relative_path, file=file, upload=upload)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->create: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
repository = 'repository_example' # str | A URI of a repository the new content unit should be associated with. (optional)
artifact = 'artifact_example' # str | Artifact file representing the physical content (optional)
relative_path = 'relative_path_example' # str | Path where the artifact is located relative to distributions base_path (optional)
file = '/path/to/file' # file | An uploaded file that may be turned into the content unit. (optional)
upload = 'upload_example' # str | An uncommitted upload that may be turned into the content unit. (optional)
try:
# Create a package
api_response = api_instance.create(repository=repository, artifact=artifact, relative_path=relative_path, file=file, upload=upload)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->create: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
repository | str | A URI of a repository the new content unit should be associated with. | [optional] |
artifact | str | Artifact file representing the physical content | [optional] |
relative_path | str | Path where the artifact is located relative to distributions base_path | [optional] |
file | file | An uploaded file that may be turned into the content unit. | [optional] |
upload | str | An uncommitted upload that may be turned into the content unit. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data, application/x-www-form-urlencoded
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
202 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
list
PaginatedrpmPackageResponseList list(arch=arch, arch__contains=arch__contains, arch__in=arch__in, arch__ne=arch__ne, arch__startswith=arch__startswith, checksum_type=checksum_type, checksum_type__in=checksum_type__in, checksum_type__ne=checksum_type__ne, epoch=epoch, epoch__in=epoch__in, epoch__ne=epoch__ne, filename=filename, limit=limit, name=name, name__contains=name__contains, name__in=name__in, name__ne=name__ne, name__startswith=name__startswith, offset=offset, ordering=ordering, orphaned_for=orphaned_for, pkg_id=pkg_id, pkg_id__in=pkg_id__in, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, release=release, release__contains=release__contains, release__in=release__in, release__ne=release__ne, release__startswith=release__startswith, repository_version=repository_version, repository_version_added=repository_version_added, repository_version_removed=repository_version_removed, sha256=sha256, version=version, version__in=version__in, version__ne=version__ne, fields=fields, exclude_fields=exclude_fields)
List packages
A ViewSet for Package. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
arch = 'arch_example' # str | Filter results where arch matches value (optional)
arch__contains = 'arch__contains_example' # str | Filter results where arch contains value (optional)
arch__in = ['arch__in_example'] # list[str] | Filter results where arch is in a comma-separated list of values (optional)
arch__ne = 'arch__ne_example' # str | Filter results where arch not equal to value (optional)
arch__startswith = 'arch__startswith_example' # str | Filter results where arch starts with value (optional)
checksum_type = 'checksum_type_example' # str | Filter results where checksum_type matches value * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 (optional)
checksum_type__in = ['checksum_type__in_example'] # list[str] | Filter results where checksum_type is in a comma-separated list of values (optional)
checksum_type__ne = 'checksum_type__ne_example' # str | Filter results where checksum_type not equal to value (optional)
epoch = 'epoch_example' # str | Filter results where epoch matches value (optional)
epoch__in = ['epoch__in_example'] # list[str] | Filter results where epoch is in a comma-separated list of values (optional)
epoch__ne = 'epoch__ne_example' # str | Filter results where epoch not equal to value (optional)
filename = 'filename_example' # str | (optional)
limit = 56 # int | Number of results to return per page. (optional)
name = 'name_example' # str | Filter results where name matches value (optional)
name__contains = 'name__contains_example' # str | Filter results where name contains value (optional)
name__in = ['name__in_example'] # list[str] | Filter results where name is in a comma-separated list of values (optional)
name__ne = 'name__ne_example' # str | Filter results where name not equal to value (optional)
name__startswith = 'name__startswith_example' # str | Filter results where name starts with value (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `epoch` - Epoch * `-epoch` - Epoch (descending) * `version` - Version * `-version` - Version (descending) * `release` - Release * `-release` - Release (descending) * `arch` - Arch * `-arch` - Arch (descending) * `evr` - Evr * `-evr` - Evr (descending) * `pkgId` - Pkgid * `-pkgId` - Pkgid (descending) * `checksum_type` - Checksum type * `-checksum_type` - Checksum type (descending) * `summary` - Summary * `-summary` - Summary (descending) * `description` - Description * `-description` - Description (descending) * `url` - Url * `-url` - Url (descending) * `changelogs` - Changelogs * `-changelogs` - Changelogs (descending) * `files` - Files * `-files` - Files (descending) * `requires` - Requires * `-requires` - Requires (descending) * `provides` - Provides * `-provides` - Provides (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `obsoletes` - Obsoletes * `-obsoletes` - Obsoletes (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `supplements` - Supplements * `-supplements` - Supplements (descending) * `location_base` - Location base * `-location_base` - Location base (descending) * `location_href` - Location href * `-location_href` - Location href (descending) * `rpm_buildhost` - Rpm buildhost * `-rpm_buildhost` - Rpm buildhost (descending) * `rpm_group` - Rpm group * `-rpm_group` - Rpm group (descending) * `rpm_license` - Rpm license * `-rpm_license` - Rpm license (descending) * `rpm_packager` - Rpm packager * `-rpm_packager` - Rpm packager (descending) * `rpm_sourcerpm` - Rpm sourcerpm * `-rpm_sourcerpm` - Rpm sourcerpm (descending) * `rpm_vendor` - Rpm vendor * `-rpm_vendor` - Rpm vendor (descending) * `rpm_header_start` - Rpm header start * `-rpm_header_start` - Rpm header start (descending) * `rpm_header_end` - Rpm header end * `-rpm_header_end` - Rpm header end (descending) * `size_archive` - Size archive * `-size_archive` - Size archive (descending) * `size_installed` - Size installed * `-size_installed` - Size installed (descending) * `size_package` - Size package * `-size_package` - Size package (descending) * `time_build` - Time build * `-time_build` - Time build (descending) * `time_file` - Time file * `-time_file` - Time file (descending) * `is_modular` - Is modular * `-is_modular` - Is modular (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
orphaned_for = 3.4 # float | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. (optional)
pkg_id = 'pkg_id_example' # str | Filter results where pkgId matches value (optional)
pkg_id__in = ['pkg_id__in_example'] # list[str] | Filter results where pkgId is in a comma-separated list of values (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
q = 'q_example' # str | (optional)
release = 'release_example' # str | Filter results where release matches value (optional)
release__contains = 'release__contains_example' # str | Filter results where release contains value (optional)
release__in = ['release__in_example'] # list[str] | Filter results where release is in a comma-separated list of values (optional)
release__ne = 'release__ne_example' # str | Filter results where release not equal to value (optional)
release__startswith = 'release__startswith_example' # str | Filter results where release starts with value (optional)
repository_version = 'repository_version_example' # str | Repository Version referenced by HREF (optional)
repository_version_added = 'repository_version_added_example' # str | Repository Version referenced by HREF (optional)
repository_version_removed = 'repository_version_removed_example' # str | Repository Version referenced by HREF (optional)
sha256 = 'sha256_example' # str | (optional)
version = 'version_example' # str | Filter results where version matches value (optional)
version__in = ['version__in_example'] # list[str] | Filter results where version is in a comma-separated list of values (optional)
version__ne = 'version__ne_example' # str | Filter results where version not equal to value (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List packages
api_response = api_instance.list(arch=arch, arch__contains=arch__contains, arch__in=arch__in, arch__ne=arch__ne, arch__startswith=arch__startswith, checksum_type=checksum_type, checksum_type__in=checksum_type__in, checksum_type__ne=checksum_type__ne, epoch=epoch, epoch__in=epoch__in, epoch__ne=epoch__ne, filename=filename, limit=limit, name=name, name__contains=name__contains, name__in=name__in, name__ne=name__ne, name__startswith=name__startswith, offset=offset, ordering=ordering, orphaned_for=orphaned_for, pkg_id=pkg_id, pkg_id__in=pkg_id__in, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, release=release, release__contains=release__contains, release__in=release__in, release__ne=release__ne, release__startswith=release__startswith, repository_version=repository_version, repository_version_added=repository_version_added, repository_version_removed=repository_version_removed, sha256=sha256, version=version, version__in=version__in, version__ne=version__ne, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->list: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
arch = 'arch_example' # str | Filter results where arch matches value (optional)
arch__contains = 'arch__contains_example' # str | Filter results where arch contains value (optional)
arch__in = ['arch__in_example'] # list[str] | Filter results where arch is in a comma-separated list of values (optional)
arch__ne = 'arch__ne_example' # str | Filter results where arch not equal to value (optional)
arch__startswith = 'arch__startswith_example' # str | Filter results where arch starts with value (optional)
checksum_type = 'checksum_type_example' # str | Filter results where checksum_type matches value * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 (optional)
checksum_type__in = ['checksum_type__in_example'] # list[str] | Filter results where checksum_type is in a comma-separated list of values (optional)
checksum_type__ne = 'checksum_type__ne_example' # str | Filter results where checksum_type not equal to value (optional)
epoch = 'epoch_example' # str | Filter results where epoch matches value (optional)
epoch__in = ['epoch__in_example'] # list[str] | Filter results where epoch is in a comma-separated list of values (optional)
epoch__ne = 'epoch__ne_example' # str | Filter results where epoch not equal to value (optional)
filename = 'filename_example' # str | (optional)
limit = 56 # int | Number of results to return per page. (optional)
name = 'name_example' # str | Filter results where name matches value (optional)
name__contains = 'name__contains_example' # str | Filter results where name contains value (optional)
name__in = ['name__in_example'] # list[str] | Filter results where name is in a comma-separated list of values (optional)
name__ne = 'name__ne_example' # str | Filter results where name not equal to value (optional)
name__startswith = 'name__startswith_example' # str | Filter results where name starts with value (optional)
offset = 56 # int | The initial index from which to return the results. (optional)
ordering = ['ordering_example'] # list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `epoch` - Epoch * `-epoch` - Epoch (descending) * `version` - Version * `-version` - Version (descending) * `release` - Release * `-release` - Release (descending) * `arch` - Arch * `-arch` - Arch (descending) * `evr` - Evr * `-evr` - Evr (descending) * `pkgId` - Pkgid * `-pkgId` - Pkgid (descending) * `checksum_type` - Checksum type * `-checksum_type` - Checksum type (descending) * `summary` - Summary * `-summary` - Summary (descending) * `description` - Description * `-description` - Description (descending) * `url` - Url * `-url` - Url (descending) * `changelogs` - Changelogs * `-changelogs` - Changelogs (descending) * `files` - Files * `-files` - Files (descending) * `requires` - Requires * `-requires` - Requires (descending) * `provides` - Provides * `-provides` - Provides (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `obsoletes` - Obsoletes * `-obsoletes` - Obsoletes (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `supplements` - Supplements * `-supplements` - Supplements (descending) * `location_base` - Location base * `-location_base` - Location base (descending) * `location_href` - Location href * `-location_href` - Location href (descending) * `rpm_buildhost` - Rpm buildhost * `-rpm_buildhost` - Rpm buildhost (descending) * `rpm_group` - Rpm group * `-rpm_group` - Rpm group (descending) * `rpm_license` - Rpm license * `-rpm_license` - Rpm license (descending) * `rpm_packager` - Rpm packager * `-rpm_packager` - Rpm packager (descending) * `rpm_sourcerpm` - Rpm sourcerpm * `-rpm_sourcerpm` - Rpm sourcerpm (descending) * `rpm_vendor` - Rpm vendor * `-rpm_vendor` - Rpm vendor (descending) * `rpm_header_start` - Rpm header start * `-rpm_header_start` - Rpm header start (descending) * `rpm_header_end` - Rpm header end * `-rpm_header_end` - Rpm header end (descending) * `size_archive` - Size archive * `-size_archive` - Size archive (descending) * `size_installed` - Size installed * `-size_installed` - Size installed (descending) * `size_package` - Size package * `-size_package` - Size package (descending) * `time_build` - Time build * `-time_build` - Time build (descending) * `time_file` - Time file * `-time_file` - Time file (descending) * `is_modular` - Is modular * `-is_modular` - Is modular (descending) * `pk` - Pk * `-pk` - Pk (descending) (optional)
orphaned_for = 3.4 # float | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. (optional)
pkg_id = 'pkg_id_example' # str | Filter results where pkgId matches value (optional)
pkg_id__in = ['pkg_id__in_example'] # list[str] | Filter results where pkgId is in a comma-separated list of values (optional)
pulp_href__in = ['pulp_href__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
pulp_id__in = ['pulp_id__in_example'] # list[str] | Multiple values may be separated by commas. (optional)
q = 'q_example' # str | (optional)
release = 'release_example' # str | Filter results where release matches value (optional)
release__contains = 'release__contains_example' # str | Filter results where release contains value (optional)
release__in = ['release__in_example'] # list[str] | Filter results where release is in a comma-separated list of values (optional)
release__ne = 'release__ne_example' # str | Filter results where release not equal to value (optional)
release__startswith = 'release__startswith_example' # str | Filter results where release starts with value (optional)
repository_version = 'repository_version_example' # str | Repository Version referenced by HREF (optional)
repository_version_added = 'repository_version_added_example' # str | Repository Version referenced by HREF (optional)
repository_version_removed = 'repository_version_removed_example' # str | Repository Version referenced by HREF (optional)
sha256 = 'sha256_example' # str | (optional)
version = 'version_example' # str | Filter results where version matches value (optional)
version__in = ['version__in_example'] # list[str] | Filter results where version is in a comma-separated list of values (optional)
version__ne = 'version__ne_example' # str | Filter results where version not equal to value (optional)
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# List packages
api_response = api_instance.list(arch=arch, arch__contains=arch__contains, arch__in=arch__in, arch__ne=arch__ne, arch__startswith=arch__startswith, checksum_type=checksum_type, checksum_type__in=checksum_type__in, checksum_type__ne=checksum_type__ne, epoch=epoch, epoch__in=epoch__in, epoch__ne=epoch__ne, filename=filename, limit=limit, name=name, name__contains=name__contains, name__in=name__in, name__ne=name__ne, name__startswith=name__startswith, offset=offset, ordering=ordering, orphaned_for=orphaned_for, pkg_id=pkg_id, pkg_id__in=pkg_id__in, pulp_href__in=pulp_href__in, pulp_id__in=pulp_id__in, q=q, release=release, release__contains=release__contains, release__in=release__in, release__ne=release__ne, release__startswith=release__startswith, repository_version=repository_version, repository_version_added=repository_version_added, repository_version_removed=repository_version_removed, sha256=sha256, version=version, version__in=version__in, version__ne=version__ne, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->list: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
arch | str | Filter results where arch matches value | [optional] |
arch__contains | str | Filter results where arch contains value | [optional] |
arch__in | list[str] | Filter results where arch is in a comma-separated list of values | [optional] |
arch__ne | str | Filter results where arch not equal to value | [optional] |
arch__startswith | str | Filter results where arch starts with value | [optional] |
checksum_type | str | Filter results where checksum_type matches value * `unknown` - unknown * `md5` - md5 * `sha1` - sha1 * `sha1` - sha1 * `sha224` - sha224 * `sha256` - sha256 * `sha384` - sha384 * `sha512` - sha512 | [optional] |
checksum_type__in | list[str] | Filter results where checksum_type is in a comma-separated list of values | [optional] |
checksum_type__ne | str | Filter results where checksum_type not equal to value | [optional] |
epoch | str | Filter results where epoch matches value | [optional] |
epoch__in | list[str] | Filter results where epoch is in a comma-separated list of values | [optional] |
epoch__ne | str | Filter results where epoch not equal to value | [optional] |
filename | str | [optional] | |
limit | int | Number of results to return per page. | [optional] |
name | str | Filter results where name matches value | [optional] |
name__contains | str | Filter results where name contains value | [optional] |
name__in | list[str] | Filter results where name is in a comma-separated list of values | [optional] |
name__ne | str | Filter results where name not equal to value | [optional] |
name__startswith | str | Filter results where name starts with value | [optional] |
offset | int | The initial index from which to return the results. | [optional] |
ordering | list[str] | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `name` - Name * `-name` - Name (descending) * `epoch` - Epoch * `-epoch` - Epoch (descending) * `version` - Version * `-version` - Version (descending) * `release` - Release * `-release` - Release (descending) * `arch` - Arch * `-arch` - Arch (descending) * `evr` - Evr * `-evr` - Evr (descending) * `pkgId` - Pkgid * `-pkgId` - Pkgid (descending) * `checksum_type` - Checksum type * `-checksum_type` - Checksum type (descending) * `summary` - Summary * `-summary` - Summary (descending) * `description` - Description * `-description` - Description (descending) * `url` - Url * `-url` - Url (descending) * `changelogs` - Changelogs * `-changelogs` - Changelogs (descending) * `files` - Files * `-files` - Files (descending) * `requires` - Requires * `-requires` - Requires (descending) * `provides` - Provides * `-provides` - Provides (descending) * `conflicts` - Conflicts * `-conflicts` - Conflicts (descending) * `obsoletes` - Obsoletes * `-obsoletes` - Obsoletes (descending) * `suggests` - Suggests * `-suggests` - Suggests (descending) * `enhances` - Enhances * `-enhances` - Enhances (descending) * `recommends` - Recommends * `-recommends` - Recommends (descending) * `supplements` - Supplements * `-supplements` - Supplements (descending) * `location_base` - Location base * `-location_base` - Location base (descending) * `location_href` - Location href * `-location_href` - Location href (descending) * `rpm_buildhost` - Rpm buildhost * `-rpm_buildhost` - Rpm buildhost (descending) * `rpm_group` - Rpm group * `-rpm_group` - Rpm group (descending) * `rpm_license` - Rpm license * `-rpm_license` - Rpm license (descending) * `rpm_packager` - Rpm packager * `-rpm_packager` - Rpm packager (descending) * `rpm_sourcerpm` - Rpm sourcerpm * `-rpm_sourcerpm` - Rpm sourcerpm (descending) * `rpm_vendor` - Rpm vendor * `-rpm_vendor` - Rpm vendor (descending) * `rpm_header_start` - Rpm header start * `-rpm_header_start` - Rpm header start (descending) * `rpm_header_end` - Rpm header end * `-rpm_header_end` - Rpm header end (descending) * `size_archive` - Size archive * `-size_archive` - Size archive (descending) * `size_installed` - Size installed * `-size_installed` - Size installed (descending) * `size_package` - Size package * `-size_package` - Size package (descending) * `time_build` - Time build * `-time_build` - Time build (descending) * `time_file` - Time file * `-time_file` - Time file (descending) * `is_modular` - Is modular * `-is_modular` - Is modular (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] |
orphaned_for | float | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. | [optional] |
pkg_id | str | Filter results where pkgId matches value | [optional] |
pkg_id__in | list[str] | Filter results where pkgId is in a comma-separated list of values | [optional] |
pulp_href__in | list[str] | Multiple values may be separated by commas. | [optional] |
pulp_id__in | list[str] | Multiple values may be separated by commas. | [optional] |
q | str | [optional] | |
release | str | Filter results where release matches value | [optional] |
release__contains | str | Filter results where release contains value | [optional] |
release__in | list[str] | Filter results where release is in a comma-separated list of values | [optional] |
release__ne | str | Filter results where release not equal to value | [optional] |
release__startswith | str | Filter results where release starts with value | [optional] |
repository_version | str | Repository Version referenced by HREF | [optional] |
repository_version_added | str | Repository Version referenced by HREF | [optional] |
repository_version_removed | str | Repository Version referenced by HREF | [optional] |
sha256 | str | [optional] | |
version | str | Filter results where version matches value | [optional] |
version__in | list[str] | Filter results where version is in a comma-separated list of values | [optional] |
version__ne | str | Filter results where version not equal to value | [optional] |
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
PaginatedrpmPackageResponseList
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]
read
RpmPackageResponse read(rpm_package_href, fields=fields, exclude_fields=exclude_fields)
Inspect a package
A ViewSet for Package. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
Example
- Basic Authentication (basicAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
rpm_package_href = 'rpm_package_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# Inspect a package
api_response = api_instance.read(rpm_package_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->read: %s\n" % e)
- Api Key Authentication (cookieAuth):
from __future__ import print_function
import time
import pulpcore.client.pulp_rpm
from pulpcore.client.pulp_rpm.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:24817
# See configuration.py for a list of all supported configuration parameters.
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure API key authorization: cookieAuth
configuration = pulpcore.client.pulp_rpm.Configuration(
host = "http://localhost:24817",
api_key = {
'sessionid': 'YOUR_API_KEY'
}
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['sessionid'] = 'Bearer'
# Enter a context with an instance of the API client
with pulpcore.client.pulp_rpm.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pulpcore.client.pulp_rpm.ContentPackagesApi(api_client)
rpm_package_href = 'rpm_package_href_example' # str |
fields = ['fields_example'] # list[str] | A list of fields to include in the response. (optional)
exclude_fields = ['exclude_fields_example'] # list[str] | A list of fields to exclude from the response. (optional)
try:
# Inspect a package
api_response = api_instance.read(rpm_package_href, fields=fields, exclude_fields=exclude_fields)
pprint(api_response)
except ApiException as e:
print("Exception when calling ContentPackagesApi->read: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
rpm_package_href | str | ||
fields | list[str] | A list of fields to include in the response. | [optional] |
exclude_fields | list[str] | A list of fields to exclude from the response. | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to HOME]