pulp_python_client 3.21.0 → 3.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -5
  3. data/docs/ContentPackagesApi.md +6 -2
  4. data/docs/ContentProvenanceApi.md +428 -0
  5. data/docs/FiletypeEnum.md +15 -0
  6. data/docs/MetadataVersionEnum.md +15 -0
  7. data/docs/PaginatedpythonPackageProvenanceResponseList.md +24 -0
  8. data/docs/PatchedpythonPythonRemote.md +3 -1
  9. data/docs/ProtocolVersionEnum.md +15 -0
  10. data/docs/PypiLegacyApi.md +9 -1
  11. data/docs/PypiProvenanceApi.md +91 -0
  12. data/docs/PypiSimpleApi.md +9 -1
  13. data/docs/PythonPackageProvenanceResponse.md +34 -0
  14. data/docs/PythonPythonPackageContentResponse.md +3 -1
  15. data/docs/PythonPythonRemote.md +3 -1
  16. data/docs/PythonPythonRemoteResponse.md +3 -1
  17. data/lib/pulp_python_client/api/content_packages_api.rb +6 -0
  18. data/lib/pulp_python_client/api/content_provenance_api.rb +448 -0
  19. data/lib/pulp_python_client/api/pypi_legacy_api.rb +12 -0
  20. data/lib/pulp_python_client/api/pypi_provenance_api.rb +110 -0
  21. data/lib/pulp_python_client/api/pypi_simple_api.rb +12 -0
  22. data/lib/pulp_python_client/models/filetype_enum.rb +40 -0
  23. data/lib/pulp_python_client/models/metadata_version_enum.rb +46 -0
  24. data/lib/pulp_python_client/models/paginatedpython_package_provenance_response_list.rb +257 -0
  25. data/lib/pulp_python_client/models/patchedpython_python_remote.rb +16 -4
  26. data/lib/pulp_python_client/models/protocol_version_enum.rb +39 -0
  27. data/lib/pulp_python_client/models/python_package_provenance_response.rb +302 -0
  28. data/lib/pulp_python_client/models/python_python_package_content_response.rb +15 -5
  29. data/lib/pulp_python_client/models/python_python_remote.rb +16 -4
  30. data/lib/pulp_python_client/models/python_python_remote_response.rb +16 -4
  31. data/lib/pulp_python_client/version.rb +1 -1
  32. data/lib/pulp_python_client.rb +7 -0
  33. data/spec/api/content_packages_api_spec.rb +2 -0
  34. data/spec/api/content_provenance_api_spec.rb +123 -0
  35. data/spec/api/pypi_legacy_api_spec.rb +4 -0
  36. data/spec/api/pypi_provenance_api_spec.rb +53 -0
  37. data/spec/api/pypi_simple_api_spec.rb +4 -0
  38. data/spec/models/filetype_enum_spec.rb +30 -0
  39. data/spec/models/metadata_version_enum_spec.rb +30 -0
  40. data/spec/models/paginatedpython_package_provenance_response_list_spec.rb +54 -0
  41. data/spec/models/patchedpython_python_remote_spec.rb +6 -0
  42. data/spec/models/protocol_version_enum_spec.rb +30 -0
  43. data/spec/models/python_package_provenance_response_spec.rb +84 -0
  44. data/spec/models/python_python_package_content_response_spec.rb +6 -0
  45. data/spec/models/python_python_remote_response_spec.rb +6 -0
  46. data/spec/models/python_python_remote_spec.rb +6 -0
  47. metadata +30 -2
@@ -0,0 +1,91 @@
1
+ # PulpPythonClient::PypiProvenanceApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**read**](PypiProvenanceApi.md#read) | **GET** /pypi/{path}/integrity/{package}/{version}/{filename}/provenance/ | Get package provenance |
8
+
9
+
10
+ ## read
11
+
12
+ > read(filename, package, path, version, opts)
13
+
14
+ Get package provenance
15
+
16
+ Gets the provenance for a package.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'pulp_python_client'
23
+ # setup authorization
24
+ PulpPythonClient.configure do |config|
25
+ # Configure HTTP basic authorization: basicAuth
26
+ config.username = 'YOUR USERNAME'
27
+ config.password = 'YOUR PASSWORD'
28
+ end
29
+
30
+ api_instance = PulpPythonClient::PypiProvenanceApi.new
31
+ filename = 'filename_example' # String |
32
+ package = 'package_example' # String |
33
+ path = 'path_example' # String |
34
+ version = 'version_example' # String |
35
+ opts = {
36
+ x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
37
+ fields: ['inner_example'], # Array<String> | A list of fields to include in the response.
38
+ exclude_fields: ['inner_example'] # Array<String> | A list of fields to exclude from the response.
39
+ }
40
+
41
+ begin
42
+ # Get package provenance
43
+ api_instance.read(filename, package, path, version, opts)
44
+ rescue PulpPythonClient::ApiError => e
45
+ puts "Error when calling PypiProvenanceApi->read: #{e}"
46
+ end
47
+ ```
48
+
49
+ #### Using the read_with_http_info variant
50
+
51
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
52
+
53
+ > <Array(nil, Integer, Hash)> read_with_http_info(filename, package, path, version, opts)
54
+
55
+ ```ruby
56
+ begin
57
+ # Get package provenance
58
+ data, status_code, headers = api_instance.read_with_http_info(filename, package, path, version, opts)
59
+ p status_code # => 2xx
60
+ p headers # => { ... }
61
+ p data # => nil
62
+ rescue PulpPythonClient::ApiError => e
63
+ puts "Error when calling PypiProvenanceApi->read_with_http_info: #{e}"
64
+ end
65
+ ```
66
+
67
+ ### Parameters
68
+
69
+ | Name | Type | Description | Notes |
70
+ | ---- | ---- | ----------- | ----- |
71
+ | **filename** | **String** | | |
72
+ | **package** | **String** | | |
73
+ | **path** | **String** | | |
74
+ | **version** | **String** | | |
75
+ | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
76
+ | **fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to include in the response. | [optional] |
77
+ | **exclude_fields** | [**Array&lt;String&gt;**](String.md) | A list of fields to exclude from the response. | [optional] |
78
+
79
+ ### Return type
80
+
81
+ nil (empty response body)
82
+
83
+ ### Authorization
84
+
85
+ [basicAuth](../README.md#basicAuth)
86
+
87
+ ### HTTP request headers
88
+
89
+ - **Content-Type**: Not defined
90
+ - **Accept**: Not defined
91
+
@@ -35,7 +35,11 @@ content = File.new('/path/to/some/file') # File | A Python package release file
35
35
  sha256_digest = 'sha256_digest_example' # String | SHA256 of package to validate upload integrity.
36
36
  opts = {
37
37
  x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
38
- action: 'action_example' # String | Defaults to `file_upload`, don't change it or request will fail!
38
+ action: 'action_example', # String | Defaults to `file_upload`, don't change it or request will fail!
39
+ protocol_version: PulpPythonClient::ProtocolVersionEnum::N1, # ProtocolVersionEnum | Protocol version to use for the upload. Only version 1 is supported. * `1` - 1
40
+ filetype: PulpPythonClient::FiletypeEnum::BDIST_WHEEL, # FiletypeEnum | Type of artifact to upload. * `bdist_wheel` - bdist_wheel * `sdist` - sdist
41
+ metadata_version: PulpPythonClient::MetadataVersionEnum::N1_0, # MetadataVersionEnum | Metadata version of the uploaded package. * `1.0` - 1.0 * `1.1` - 1.1 * `1.2` - 1.2 * `2.0` - 2.0 * `2.1` - 2.1 * `2.2` - 2.2 * `2.3` - 2.3 * `2.4` - 2.4
42
+ attestations: TODO # Object |
39
43
  }
40
44
 
41
45
  begin
@@ -74,6 +78,10 @@ end
74
78
  | **sha256_digest** | **String** | SHA256 of package to validate upload integrity. | |
75
79
  | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
76
80
  | **action** | **String** | Defaults to &#x60;file_upload&#x60;, don&#39;t change it or request will fail! | [optional][default to &#39;file_upload&#39;] |
81
+ | **protocol_version** | [**ProtocolVersionEnum**](ProtocolVersionEnum.md) | Protocol version to use for the upload. Only version 1 is supported. * &#x60;1&#x60; - 1 | [optional] |
82
+ | **filetype** | [**FiletypeEnum**](FiletypeEnum.md) | Type of artifact to upload. * &#x60;bdist_wheel&#x60; - bdist_wheel * &#x60;sdist&#x60; - sdist | [optional] |
83
+ | **metadata_version** | [**MetadataVersionEnum**](MetadataVersionEnum.md) | Metadata version of the uploaded package. * &#x60;1.0&#x60; - 1.0 * &#x60;1.1&#x60; - 1.1 * &#x60;1.2&#x60; - 1.2 * &#x60;2.0&#x60; - 2.0 * &#x60;2.1&#x60; - 2.1 * &#x60;2.2&#x60; - 2.2 * &#x60;2.3&#x60; - 2.3 * &#x60;2.4&#x60; - 2.4 | [optional] |
84
+ | **attestations** | [**Object**](Object.md) | | [optional] |
77
85
 
78
86
  ### Return type
79
87
 
@@ -0,0 +1,34 @@
1
+ # PulpPythonClient::PythonPackageProvenanceResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **pulp_href** | **String** | | [optional][readonly] |
8
+ | **prn** | **String** | The Pulp Resource Name (PRN). | [optional][readonly] |
9
+ | **pulp_created** | **Time** | Timestamp of creation. | [optional][readonly] |
10
+ | **pulp_last_updated** | **Time** | Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same. | [optional][readonly] |
11
+ | **pulp_labels** | **Hash&lt;String, String&gt;** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
12
+ | **vuln_report** | **String** | | [optional][readonly] |
13
+ | **package** | **String** | The package that the provenance is for. | |
14
+ | **provenance** | **Object** | | [optional] |
15
+ | **sha256** | **String** | | [optional][readonly] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'pulp_python_client'
21
+
22
+ instance = PulpPythonClient::PythonPackageProvenanceResponse.new(
23
+ pulp_href: null,
24
+ prn: null,
25
+ pulp_created: null,
26
+ pulp_last_updated: null,
27
+ pulp_labels: null,
28
+ vuln_report: null,
29
+ package: null,
30
+ provenance: null,
31
+ sha256: null
32
+ )
33
+ ```
34
+
@@ -45,6 +45,7 @@
45
45
  | **size** | **Integer** | The size of the package in bytes. | [optional][readonly] |
46
46
  | **sha256** | **String** | The SHA256 digest of this package. | [optional][default to &#39;&#39;] |
47
47
  | **metadata_sha256** | **String** | The SHA256 digest of the package&#39;s METADATA file. | [optional] |
48
+ | **provenance** | **String** | The created provenance object on upload. | [optional][readonly] |
48
49
 
49
50
  ## Example
50
51
 
@@ -92,7 +93,8 @@ instance = PulpPythonClient::PythonPythonPackageContentResponse.new(
92
93
  python_version: null,
93
94
  size: null,
94
95
  sha256: null,
95
- metadata_sha256: null
96
+ metadata_sha256: null,
97
+ provenance: null
96
98
  )
97
99
  ```
98
100
 
@@ -31,6 +31,7 @@
31
31
  | **package_types** | [**Array&lt;PackageTypesEnum&gt;**](PackageTypesEnum.md) | The package types to sync for Python content. Leave blank to get everypackage type. | [optional] |
32
32
  | **keep_latest_packages** | **Integer** | The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions. | [optional][default to 0] |
33
33
  | **exclude_platforms** | [**Array&lt;ExcludePlatformsEnum&gt;**](ExcludePlatformsEnum.md) | List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux. | [optional] |
34
+ | **provenance** | **Boolean** | Whether to sync available provenances for Python packages. | [optional][default to false] |
34
35
 
35
36
  ## Example
36
37
 
@@ -64,7 +65,8 @@ instance = PulpPythonClient::PythonPythonRemote.new(
64
65
  prereleases: null,
65
66
  package_types: null,
66
67
  keep_latest_packages: null,
67
- exclude_platforms: null
68
+ exclude_platforms: null,
69
+ provenance: null
68
70
  )
69
71
  ```
70
72
 
@@ -31,6 +31,7 @@
31
31
  | **package_types** | [**Array&lt;PackageTypesEnum&gt;**](PackageTypesEnum.md) | The package types to sync for Python content. Leave blank to get everypackage type. | [optional] |
32
32
  | **keep_latest_packages** | **Integer** | The amount of latest versions of a package to keep on sync, includespre-releases if synced. Default 0 keeps all versions. | [optional][default to 0] |
33
33
  | **exclude_platforms** | [**Array&lt;ExcludePlatformsEnum&gt;**](ExcludePlatformsEnum.md) | List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux. | [optional] |
34
+ | **provenance** | **Boolean** | Whether to sync available provenances for Python packages. | [optional][default to false] |
34
35
 
35
36
  ## Example
36
37
 
@@ -64,7 +65,8 @@ instance = PulpPythonClient::PythonPythonRemoteResponse.new(
64
65
  prereleases: null,
65
66
  package_types: null,
66
67
  keep_latest_packages: null,
67
- exclude_platforms: null
68
+ exclude_platforms: null,
69
+ provenance: null
68
70
  )
69
71
  ```
70
72
 
@@ -57,6 +57,7 @@ module PulpPythonClient
57
57
  # @option opts [Object] :license_file
58
58
  # @option opts [String] :sha256 The SHA256 digest of this package. (default to '')
59
59
  # @option opts [String] :metadata_sha256 The SHA256 digest of the package&#39;s METADATA file.
60
+ # @option opts [Object] :attestations
60
61
  # @return [AsyncOperationResponse]
61
62
  def create(relative_path, opts = {})
62
63
  data, _status_code, _headers = create_with_http_info(relative_path, opts)
@@ -101,6 +102,7 @@ module PulpPythonClient
101
102
  # @option opts [Object] :license_file
102
103
  # @option opts [String] :sha256 The SHA256 digest of this package. (default to '')
103
104
  # @option opts [String] :metadata_sha256 The SHA256 digest of the package&#39;s METADATA file.
105
+ # @option opts [Object] :attestations
104
106
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
105
107
  def create_with_http_info(relative_path, opts = {})
106
108
  if @api_client.config.debugging
@@ -179,6 +181,7 @@ module PulpPythonClient
179
181
  form_params['license_file'] = opts[:'license_file'] if !opts[:'license_file'].nil?
180
182
  form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
181
183
  form_params['metadata_sha256'] = opts[:'metadata_sha256'] if !opts[:'metadata_sha256'].nil?
184
+ form_params['attestations'] = opts[:'attestations'] if !opts[:'attestations'].nil?
182
185
 
183
186
  # http body (model)
184
187
  post_body = opts[:debug_body]
@@ -641,6 +644,7 @@ module PulpPythonClient
641
644
  # @option opts [Object] :license_file
642
645
  # @option opts [String] :sha256 The SHA256 digest of this package. (default to '')
643
646
  # @option opts [String] :metadata_sha256 The SHA256 digest of the package&#39;s METADATA file.
647
+ # @option opts [Object] :attestations
644
648
  # @return [PythonPythonPackageContentResponse]
645
649
  def upload(opts = {})
646
650
  data, _status_code, _headers = upload_with_http_info(opts)
@@ -683,6 +687,7 @@ module PulpPythonClient
683
687
  # @option opts [Object] :license_file
684
688
  # @option opts [String] :sha256 The SHA256 digest of this package. (default to '')
685
689
  # @option opts [String] :metadata_sha256 The SHA256 digest of the package&#39;s METADATA file.
690
+ # @option opts [Object] :attestations
686
691
  # @return [Array<(PythonPythonPackageContentResponse, Integer, Hash)>] PythonPythonPackageContentResponse data, response status code and response headers
687
692
  def upload_with_http_info(opts = {})
688
693
  if @api_client.config.debugging
@@ -751,6 +756,7 @@ module PulpPythonClient
751
756
  form_params['license_file'] = opts[:'license_file'] if !opts[:'license_file'].nil?
752
757
  form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
753
758
  form_params['metadata_sha256'] = opts[:'metadata_sha256'] if !opts[:'metadata_sha256'].nil?
759
+ form_params['attestations'] = opts[:'attestations'] if !opts[:'attestations'].nil?
754
760
 
755
761
  # http body (model)
756
762
  post_body = opts[:debug_body]