pulp_file_client 3.72.2 → 3.73.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.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/docs/ContentFilesApi.md +152 -2
- data/docs/FileFileContentResponse.md +2 -0
- data/lib/pulp_file_client/api/content_files_api.rb +157 -3
- data/lib/pulp_file_client/models/file_file_content_response.rb +13 -1
- data/lib/pulp_file_client/version.rb +1 -1
- data/spec/api/content_files_api_spec.rb +29 -1
- data/spec/models/file_file_content_response_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f36c1e73abfd9abad1677d806a3d8846420860db7b96f766fbe2eb38944fa0
|
4
|
+
data.tar.gz: 6e6f3016d9de18f48a1fdedbcfa861d282044b5d6cc3f10a8efaf78e6d80f11b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30c01ad15b8c5d4c8924217844ab92198ad54843ecb1704a0cdf7e341c31a1d79ed6f60e363b7508001dde9920b9c6a033611c22f1996be1699f0745c2e75d8d
|
7
|
+
data.tar.gz: b36f8f3ebbb8fd9ad5d5dd623c0ea85228ee870541c3bebe325fce806fcf6528673218aa40ce5a6b8712b9e5fde726c0ac087f65aab50a819c54d4f6fead70f9
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v3
|
10
|
-
- Package version: 3.
|
10
|
+
- Package version: 3.73.0
|
11
11
|
- Generator version: 7.10.0
|
12
12
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
13
13
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
@@ -25,16 +25,16 @@ gem build pulp_file_client.gemspec
|
|
25
25
|
Then either install the gem locally:
|
26
26
|
|
27
27
|
```shell
|
28
|
-
gem install ./pulp_file_client-3.
|
28
|
+
gem install ./pulp_file_client-3.73.0.gem
|
29
29
|
```
|
30
30
|
|
31
|
-
(for development, run `gem install --dev ./pulp_file_client-3.
|
31
|
+
(for development, run `gem install --dev ./pulp_file_client-3.73.0.gem` to install the development dependencies)
|
32
32
|
|
33
33
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
34
34
|
|
35
35
|
Finally add this to the Gemfile:
|
36
36
|
|
37
|
-
gem 'pulp_file_client', '~> 3.
|
37
|
+
gem 'pulp_file_client', '~> 3.73.0'
|
38
38
|
|
39
39
|
### Install from Git
|
40
40
|
|
@@ -101,6 +101,8 @@ Class | Method | HTTP request | Description
|
|
101
101
|
*PulpFileClient::ContentFilesApi* | [**create**](docs/ContentFilesApi.md#create) | **POST** /pulp/api/v3/content/file/files/ | Create a file content
|
102
102
|
*PulpFileClient::ContentFilesApi* | [**list**](docs/ContentFilesApi.md#list) | **GET** /pulp/api/v3/content/file/files/ | List file contents
|
103
103
|
*PulpFileClient::ContentFilesApi* | [**read**](docs/ContentFilesApi.md#read) | **GET** {file_file_content_href} | Inspect a file content
|
104
|
+
*PulpFileClient::ContentFilesApi* | [**set_label**](docs/ContentFilesApi.md#set_label) | **POST** {file_file_content_href}set_label/ | Set a label
|
105
|
+
*PulpFileClient::ContentFilesApi* | [**unset_label**](docs/ContentFilesApi.md#unset_label) | **POST** {file_file_content_href}unset_label/ | Unset a label
|
104
106
|
*PulpFileClient::DistributionsFileApi* | [**add_role**](docs/DistributionsFileApi.md#add_role) | **POST** {file_file_distribution_href}add_role/ | Add a role
|
105
107
|
*PulpFileClient::DistributionsFileApi* | [**create**](docs/DistributionsFileApi.md#create) | **POST** /pulp/api/v3/distributions/file/file/ | Create a file distribution
|
106
108
|
*PulpFileClient::DistributionsFileApi* | [**delete**](docs/DistributionsFileApi.md#delete) | **DELETE** {file_file_distribution_href} | Delete a file distribution
|
data/docs/ContentFilesApi.md
CHANGED
@@ -7,6 +7,8 @@ All URIs are relative to *http://localhost:24817*
|
|
7
7
|
| [**create**](ContentFilesApi.md#create) | **POST** /pulp/api/v3/content/file/files/ | Create a file content |
|
8
8
|
| [**list**](ContentFilesApi.md#list) | **GET** /pulp/api/v3/content/file/files/ | List file contents |
|
9
9
|
| [**read**](ContentFilesApi.md#read) | **GET** {file_file_content_href} | Inspect a file content |
|
10
|
+
| [**set_label**](ContentFilesApi.md#set_label) | **POST** {file_file_content_href}set_label/ | Set a label |
|
11
|
+
| [**unset_label**](ContentFilesApi.md#unset_label) | **POST** {file_file_content_href}unset_label/ | Unset a label |
|
10
12
|
|
11
13
|
|
12
14
|
## create
|
@@ -33,6 +35,7 @@ api_instance = PulpFileClient::ContentFilesApi.new
|
|
33
35
|
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
|
34
36
|
opts = {
|
35
37
|
repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
|
38
|
+
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
36
39
|
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
37
40
|
file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
|
38
41
|
upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
|
@@ -72,6 +75,7 @@ end
|
|
72
75
|
| ---- | ---- | ----------- | ----- |
|
73
76
|
| **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
|
74
77
|
| **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional] |
|
78
|
+
| **pulp_labels** | [**Hash<String, String>**](Hash.md) | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
75
79
|
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
76
80
|
| **file** | **File** | An uploaded file that may be turned into the content unit. | [optional] |
|
77
81
|
| **upload** | **String** | An uncommitted upload that may be turned into the content unit. | [optional] |
|
@@ -115,11 +119,12 @@ api_instance = PulpFileClient::ContentFilesApi.new
|
|
115
119
|
opts = {
|
116
120
|
limit: 56, # Integer | Number of results to return per page.
|
117
121
|
offset: 56, # Integer | The initial index from which to return the results.
|
118
|
-
ordering: ['-digest'], # Array<String> | 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) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
122
|
+
ordering: ['-digest'], # Array<String> | 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) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
119
123
|
orphaned_for: 8.14, # Float | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
120
124
|
prn__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
121
125
|
pulp_href__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
122
126
|
pulp_id__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
127
|
+
pulp_label_select: 'pulp_label_select_example', # String | Filter labels by search string
|
123
128
|
q: 'q_example', # String | Filter results by using NOT, AND and OR operations on other filters
|
124
129
|
relative_path: 'relative_path_example', # String | Filter results where relative_path matches value
|
125
130
|
repository_version: 'repository_version_example', # String | Repository Version referenced by HREF/PRN
|
@@ -163,11 +168,12 @@ end
|
|
163
168
|
| ---- | ---- | ----------- | ----- |
|
164
169
|
| **limit** | **Integer** | Number of results to return per page. | [optional] |
|
165
170
|
| **offset** | **Integer** | The initial index from which to return the results. | [optional] |
|
166
|
-
| **ordering** | [**Array<String>**](String.md) | 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) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] |
|
171
|
+
| **ordering** | [**Array<String>**](String.md) | 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) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending) | [optional] |
|
167
172
|
| **orphaned_for** | **Float** | Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME. | [optional] |
|
168
173
|
| **prn__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
169
174
|
| **pulp_href__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
170
175
|
| **pulp_id__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
176
|
+
| **pulp_label_select** | **String** | Filter labels by search string | [optional] |
|
171
177
|
| **q** | **String** | Filter results by using NOT, AND and OR operations on other filters | [optional] |
|
172
178
|
| **relative_path** | **String** | Filter results where relative_path matches value | [optional] |
|
173
179
|
| **repository_version** | **String** | Repository Version referenced by HREF/PRN | [optional] |
|
@@ -266,3 +272,147 @@ end
|
|
266
272
|
- **Content-Type**: Not defined
|
267
273
|
- **Accept**: application/json
|
268
274
|
|
275
|
+
|
276
|
+
## set_label
|
277
|
+
|
278
|
+
> <SetLabelResponse> set_label(file_file_content_href, set_label)
|
279
|
+
|
280
|
+
Set a label
|
281
|
+
|
282
|
+
Set a single pulp_label on the object to a specific value or null.
|
283
|
+
|
284
|
+
### Examples
|
285
|
+
|
286
|
+
```ruby
|
287
|
+
require 'time'
|
288
|
+
require 'pulp_file_client'
|
289
|
+
# setup authorization
|
290
|
+
PulpFileClient.configure do |config|
|
291
|
+
# Configure HTTP basic authorization: basicAuth
|
292
|
+
config.username = 'YOUR USERNAME'
|
293
|
+
config.password = 'YOUR PASSWORD'
|
294
|
+
end
|
295
|
+
|
296
|
+
api_instance = PulpFileClient::ContentFilesApi.new
|
297
|
+
file_file_content_href = 'file_file_content_href_example' # String |
|
298
|
+
set_label = PulpFileClient::SetLabel.new({key: 'key_example', value: 'value_example'}) # SetLabel |
|
299
|
+
|
300
|
+
begin
|
301
|
+
# Set a label
|
302
|
+
result = api_instance.set_label(file_file_content_href, set_label)
|
303
|
+
p result
|
304
|
+
rescue PulpFileClient::ApiError => e
|
305
|
+
puts "Error when calling ContentFilesApi->set_label: #{e}"
|
306
|
+
end
|
307
|
+
```
|
308
|
+
|
309
|
+
#### Using the set_label_with_http_info variant
|
310
|
+
|
311
|
+
This returns an Array which contains the response data, status code and headers.
|
312
|
+
|
313
|
+
> <Array(<SetLabelResponse>, Integer, Hash)> set_label_with_http_info(file_file_content_href, set_label)
|
314
|
+
|
315
|
+
```ruby
|
316
|
+
begin
|
317
|
+
# Set a label
|
318
|
+
data, status_code, headers = api_instance.set_label_with_http_info(file_file_content_href, set_label)
|
319
|
+
p status_code # => 2xx
|
320
|
+
p headers # => { ... }
|
321
|
+
p data # => <SetLabelResponse>
|
322
|
+
rescue PulpFileClient::ApiError => e
|
323
|
+
puts "Error when calling ContentFilesApi->set_label_with_http_info: #{e}"
|
324
|
+
end
|
325
|
+
```
|
326
|
+
|
327
|
+
### Parameters
|
328
|
+
|
329
|
+
| Name | Type | Description | Notes |
|
330
|
+
| ---- | ---- | ----------- | ----- |
|
331
|
+
| **file_file_content_href** | **String** | | |
|
332
|
+
| **set_label** | [**SetLabel**](SetLabel.md) | | |
|
333
|
+
|
334
|
+
### Return type
|
335
|
+
|
336
|
+
[**SetLabelResponse**](SetLabelResponse.md)
|
337
|
+
|
338
|
+
### Authorization
|
339
|
+
|
340
|
+
[basicAuth](../README.md#basicAuth)
|
341
|
+
|
342
|
+
### HTTP request headers
|
343
|
+
|
344
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
345
|
+
- **Accept**: application/json
|
346
|
+
|
347
|
+
|
348
|
+
## unset_label
|
349
|
+
|
350
|
+
> <UnsetLabelResponse> unset_label(file_file_content_href, unset_label)
|
351
|
+
|
352
|
+
Unset a label
|
353
|
+
|
354
|
+
Unset a single pulp_label on the object.
|
355
|
+
|
356
|
+
### Examples
|
357
|
+
|
358
|
+
```ruby
|
359
|
+
require 'time'
|
360
|
+
require 'pulp_file_client'
|
361
|
+
# setup authorization
|
362
|
+
PulpFileClient.configure do |config|
|
363
|
+
# Configure HTTP basic authorization: basicAuth
|
364
|
+
config.username = 'YOUR USERNAME'
|
365
|
+
config.password = 'YOUR PASSWORD'
|
366
|
+
end
|
367
|
+
|
368
|
+
api_instance = PulpFileClient::ContentFilesApi.new
|
369
|
+
file_file_content_href = 'file_file_content_href_example' # String |
|
370
|
+
unset_label = PulpFileClient::UnsetLabel.new({key: 'key_example'}) # UnsetLabel |
|
371
|
+
|
372
|
+
begin
|
373
|
+
# Unset a label
|
374
|
+
result = api_instance.unset_label(file_file_content_href, unset_label)
|
375
|
+
p result
|
376
|
+
rescue PulpFileClient::ApiError => e
|
377
|
+
puts "Error when calling ContentFilesApi->unset_label: #{e}"
|
378
|
+
end
|
379
|
+
```
|
380
|
+
|
381
|
+
#### Using the unset_label_with_http_info variant
|
382
|
+
|
383
|
+
This returns an Array which contains the response data, status code and headers.
|
384
|
+
|
385
|
+
> <Array(<UnsetLabelResponse>, Integer, Hash)> unset_label_with_http_info(file_file_content_href, unset_label)
|
386
|
+
|
387
|
+
```ruby
|
388
|
+
begin
|
389
|
+
# Unset a label
|
390
|
+
data, status_code, headers = api_instance.unset_label_with_http_info(file_file_content_href, unset_label)
|
391
|
+
p status_code # => 2xx
|
392
|
+
p headers # => { ... }
|
393
|
+
p data # => <UnsetLabelResponse>
|
394
|
+
rescue PulpFileClient::ApiError => e
|
395
|
+
puts "Error when calling ContentFilesApi->unset_label_with_http_info: #{e}"
|
396
|
+
end
|
397
|
+
```
|
398
|
+
|
399
|
+
### Parameters
|
400
|
+
|
401
|
+
| Name | Type | Description | Notes |
|
402
|
+
| ---- | ---- | ----------- | ----- |
|
403
|
+
| **file_file_content_href** | **String** | | |
|
404
|
+
| **unset_label** | [**UnsetLabel**](UnsetLabel.md) | | |
|
405
|
+
|
406
|
+
### Return type
|
407
|
+
|
408
|
+
[**UnsetLabelResponse**](UnsetLabelResponse.md)
|
409
|
+
|
410
|
+
### Authorization
|
411
|
+
|
412
|
+
[basicAuth](../README.md#basicAuth)
|
413
|
+
|
414
|
+
### HTTP request headers
|
415
|
+
|
416
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
417
|
+
- **Accept**: application/json
|
418
|
+
|
@@ -8,6 +8,7 @@
|
|
8
8
|
| **prn** | **String** | The Pulp Resource Name (PRN). | [optional][readonly] |
|
9
9
|
| **pulp_created** | **Time** | Timestamp of creation. | [optional][readonly] |
|
10
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<String, String>** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
11
12
|
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
12
13
|
| **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
|
13
14
|
| **md5** | **String** | The MD5 checksum if available. | [optional][readonly] |
|
@@ -27,6 +28,7 @@ instance = PulpFileClient::FileFileContentResponse.new(
|
|
27
28
|
prn: null,
|
28
29
|
pulp_created: null,
|
29
30
|
pulp_last_updated: null,
|
31
|
+
pulp_labels: null,
|
30
32
|
artifact: null,
|
31
33
|
relative_path: null,
|
32
34
|
md5: null,
|
@@ -24,6 +24,7 @@ module PulpFileClient
|
|
24
24
|
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
26
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
27
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
27
28
|
# @option opts [String] :artifact Artifact file representing the physical content
|
28
29
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
29
30
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
@@ -39,6 +40,7 @@ module PulpFileClient
|
|
39
40
|
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
40
41
|
# @param [Hash] opts the optional parameters
|
41
42
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
43
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
42
44
|
# @option opts [String] :artifact Artifact file representing the physical content
|
43
45
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
44
46
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
@@ -80,6 +82,7 @@ module PulpFileClient
|
|
80
82
|
form_params = opts[:form_params] || {}
|
81
83
|
form_params['relative_path'] = relative_path
|
82
84
|
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
85
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
83
86
|
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
84
87
|
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
85
88
|
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
@@ -116,11 +119,12 @@ module PulpFileClient
|
|
116
119
|
# @param [Hash] opts the optional parameters
|
117
120
|
# @option opts [Integer] :limit Number of results to return per page.
|
118
121
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
119
|
-
# @option opts [Array<String>] :ordering 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) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
122
|
+
# @option opts [Array<String>] :ordering 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) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
120
123
|
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
121
124
|
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
122
125
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
123
126
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
127
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
124
128
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
125
129
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
126
130
|
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
@@ -140,11 +144,12 @@ module PulpFileClient
|
|
140
144
|
# @param [Hash] opts the optional parameters
|
141
145
|
# @option opts [Integer] :limit Number of results to return per page.
|
142
146
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
143
|
-
# @option opts [Array<String>] :ordering 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) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
147
|
+
# @option opts [Array<String>] :ordering 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) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
144
148
|
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
145
149
|
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
146
150
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
147
151
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
152
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
148
153
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
149
154
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
150
155
|
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
@@ -158,7 +163,7 @@ module PulpFileClient
|
|
158
163
|
if @api_client.config.debugging
|
159
164
|
@api_client.config.logger.debug 'Calling API: ContentFilesApi.list ...'
|
160
165
|
end
|
161
|
-
allowable_values = ["-digest", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-pulp_type", "-relative_path", "-timestamp_of_interest", "-upstream_id", "digest", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "pulp_type", "relative_path", "timestamp_of_interest", "upstream_id"]
|
166
|
+
allowable_values = ["-digest", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-relative_path", "-timestamp_of_interest", "-upstream_id", "digest", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "relative_path", "timestamp_of_interest", "upstream_id"]
|
162
167
|
if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
|
163
168
|
fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
|
164
169
|
end
|
@@ -174,6 +179,7 @@ module PulpFileClient
|
|
174
179
|
query_params[:'prn__in'] = @api_client.build_collection_param(opts[:'prn__in'], :csv) if !opts[:'prn__in'].nil?
|
175
180
|
query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
|
176
181
|
query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
|
182
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
177
183
|
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
178
184
|
query_params[:'relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
|
179
185
|
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
@@ -285,5 +291,153 @@ module PulpFileClient
|
|
285
291
|
end
|
286
292
|
return data, status_code, headers
|
287
293
|
end
|
294
|
+
|
295
|
+
# Set a label
|
296
|
+
# Set a single pulp_label on the object to a specific value or null.
|
297
|
+
# @param file_file_content_href [String]
|
298
|
+
# @param set_label [SetLabel]
|
299
|
+
# @param [Hash] opts the optional parameters
|
300
|
+
# @return [SetLabelResponse]
|
301
|
+
def set_label(file_file_content_href, set_label, opts = {})
|
302
|
+
data, _status_code, _headers = set_label_with_http_info(file_file_content_href, set_label, opts)
|
303
|
+
data
|
304
|
+
end
|
305
|
+
|
306
|
+
# Set a label
|
307
|
+
# Set a single pulp_label on the object to a specific value or null.
|
308
|
+
# @param file_file_content_href [String]
|
309
|
+
# @param set_label [SetLabel]
|
310
|
+
# @param [Hash] opts the optional parameters
|
311
|
+
# @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
|
312
|
+
def set_label_with_http_info(file_file_content_href, set_label, opts = {})
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug 'Calling API: ContentFilesApi.set_label ...'
|
315
|
+
end
|
316
|
+
# verify the required parameter 'file_file_content_href' is set
|
317
|
+
if @api_client.config.client_side_validation && file_file_content_href.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'file_file_content_href' when calling ContentFilesApi.set_label"
|
319
|
+
end
|
320
|
+
# verify the required parameter 'set_label' is set
|
321
|
+
if @api_client.config.client_side_validation && set_label.nil?
|
322
|
+
fail ArgumentError, "Missing the required parameter 'set_label' when calling ContentFilesApi.set_label"
|
323
|
+
end
|
324
|
+
# resource path
|
325
|
+
local_var_path = '{file_file_content_href}set_label/'.sub('{' + 'file_file_content_href' + '}', CGI.escape(file_file_content_href.to_s).gsub('%2F', '/'))
|
326
|
+
|
327
|
+
# query parameters
|
328
|
+
query_params = opts[:query_params] || {}
|
329
|
+
|
330
|
+
# header parameters
|
331
|
+
header_params = opts[:header_params] || {}
|
332
|
+
# HTTP header 'Accept' (if needed)
|
333
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
334
|
+
# HTTP header 'Content-Type'
|
335
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
336
|
+
if !content_type.nil?
|
337
|
+
header_params['Content-Type'] = content_type
|
338
|
+
end
|
339
|
+
|
340
|
+
# form parameters
|
341
|
+
form_params = opts[:form_params] || {}
|
342
|
+
|
343
|
+
# http body (model)
|
344
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_label)
|
345
|
+
|
346
|
+
# return_type
|
347
|
+
return_type = opts[:debug_return_type] || 'SetLabelResponse'
|
348
|
+
|
349
|
+
# auth_names
|
350
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
351
|
+
|
352
|
+
new_options = opts.merge(
|
353
|
+
:operation => :"ContentFilesApi.set_label",
|
354
|
+
:header_params => header_params,
|
355
|
+
:query_params => query_params,
|
356
|
+
:form_params => form_params,
|
357
|
+
:body => post_body,
|
358
|
+
:auth_names => auth_names,
|
359
|
+
:return_type => return_type
|
360
|
+
)
|
361
|
+
|
362
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
363
|
+
if @api_client.config.debugging
|
364
|
+
@api_client.config.logger.debug "API called: ContentFilesApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
365
|
+
end
|
366
|
+
return data, status_code, headers
|
367
|
+
end
|
368
|
+
|
369
|
+
# Unset a label
|
370
|
+
# Unset a single pulp_label on the object.
|
371
|
+
# @param file_file_content_href [String]
|
372
|
+
# @param unset_label [UnsetLabel]
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @return [UnsetLabelResponse]
|
375
|
+
def unset_label(file_file_content_href, unset_label, opts = {})
|
376
|
+
data, _status_code, _headers = unset_label_with_http_info(file_file_content_href, unset_label, opts)
|
377
|
+
data
|
378
|
+
end
|
379
|
+
|
380
|
+
# Unset a label
|
381
|
+
# Unset a single pulp_label on the object.
|
382
|
+
# @param file_file_content_href [String]
|
383
|
+
# @param unset_label [UnsetLabel]
|
384
|
+
# @param [Hash] opts the optional parameters
|
385
|
+
# @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
|
386
|
+
def unset_label_with_http_info(file_file_content_href, unset_label, opts = {})
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug 'Calling API: ContentFilesApi.unset_label ...'
|
389
|
+
end
|
390
|
+
# verify the required parameter 'file_file_content_href' is set
|
391
|
+
if @api_client.config.client_side_validation && file_file_content_href.nil?
|
392
|
+
fail ArgumentError, "Missing the required parameter 'file_file_content_href' when calling ContentFilesApi.unset_label"
|
393
|
+
end
|
394
|
+
# verify the required parameter 'unset_label' is set
|
395
|
+
if @api_client.config.client_side_validation && unset_label.nil?
|
396
|
+
fail ArgumentError, "Missing the required parameter 'unset_label' when calling ContentFilesApi.unset_label"
|
397
|
+
end
|
398
|
+
# resource path
|
399
|
+
local_var_path = '{file_file_content_href}unset_label/'.sub('{' + 'file_file_content_href' + '}', CGI.escape(file_file_content_href.to_s).gsub('%2F', '/'))
|
400
|
+
|
401
|
+
# query parameters
|
402
|
+
query_params = opts[:query_params] || {}
|
403
|
+
|
404
|
+
# header parameters
|
405
|
+
header_params = opts[:header_params] || {}
|
406
|
+
# HTTP header 'Accept' (if needed)
|
407
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
408
|
+
# HTTP header 'Content-Type'
|
409
|
+
content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
410
|
+
if !content_type.nil?
|
411
|
+
header_params['Content-Type'] = content_type
|
412
|
+
end
|
413
|
+
|
414
|
+
# form parameters
|
415
|
+
form_params = opts[:form_params] || {}
|
416
|
+
|
417
|
+
# http body (model)
|
418
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unset_label)
|
419
|
+
|
420
|
+
# return_type
|
421
|
+
return_type = opts[:debug_return_type] || 'UnsetLabelResponse'
|
422
|
+
|
423
|
+
# auth_names
|
424
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
425
|
+
|
426
|
+
new_options = opts.merge(
|
427
|
+
:operation => :"ContentFilesApi.unset_label",
|
428
|
+
:header_params => header_params,
|
429
|
+
:query_params => query_params,
|
430
|
+
:form_params => form_params,
|
431
|
+
:body => post_body,
|
432
|
+
:auth_names => auth_names,
|
433
|
+
:return_type => return_type
|
434
|
+
)
|
435
|
+
|
436
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
437
|
+
if @api_client.config.debugging
|
438
|
+
@api_client.config.logger.debug "API called: ContentFilesApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
439
|
+
end
|
440
|
+
return data, status_code, headers
|
441
|
+
end
|
288
442
|
end
|
289
443
|
end
|
@@ -27,6 +27,9 @@ module PulpFileClient
|
|
27
27
|
# 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.
|
28
28
|
attr_accessor :pulp_last_updated
|
29
29
|
|
30
|
+
# A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
31
|
+
attr_accessor :pulp_labels
|
32
|
+
|
30
33
|
# Artifact file representing the physical content
|
31
34
|
attr_accessor :artifact
|
32
35
|
|
@@ -58,6 +61,7 @@ module PulpFileClient
|
|
58
61
|
:'prn' => :'prn',
|
59
62
|
:'pulp_created' => :'pulp_created',
|
60
63
|
:'pulp_last_updated' => :'pulp_last_updated',
|
64
|
+
:'pulp_labels' => :'pulp_labels',
|
61
65
|
:'artifact' => :'artifact',
|
62
66
|
:'relative_path' => :'relative_path',
|
63
67
|
:'md5' => :'md5',
|
@@ -81,6 +85,7 @@ module PulpFileClient
|
|
81
85
|
:'prn' => :'String',
|
82
86
|
:'pulp_created' => :'Time',
|
83
87
|
:'pulp_last_updated' => :'Time',
|
88
|
+
:'pulp_labels' => :'Hash<String, String>',
|
84
89
|
:'artifact' => :'String',
|
85
90
|
:'relative_path' => :'String',
|
86
91
|
:'md5' => :'String',
|
@@ -129,6 +134,12 @@ module PulpFileClient
|
|
129
134
|
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
130
135
|
end
|
131
136
|
|
137
|
+
if attributes.key?(:'pulp_labels')
|
138
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
139
|
+
self.pulp_labels = value
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
132
143
|
if attributes.key?(:'artifact')
|
133
144
|
self.artifact = attributes[:'artifact']
|
134
145
|
end
|
@@ -193,6 +204,7 @@ module PulpFileClient
|
|
193
204
|
prn == o.prn &&
|
194
205
|
pulp_created == o.pulp_created &&
|
195
206
|
pulp_last_updated == o.pulp_last_updated &&
|
207
|
+
pulp_labels == o.pulp_labels &&
|
196
208
|
artifact == o.artifact &&
|
197
209
|
relative_path == o.relative_path &&
|
198
210
|
md5 == o.md5 &&
|
@@ -212,7 +224,7 @@ module PulpFileClient
|
|
212
224
|
# Calculates hash code according to all attributes.
|
213
225
|
# @return [Integer] Hash code
|
214
226
|
def hash
|
215
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
|
227
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
|
216
228
|
end
|
217
229
|
|
218
230
|
# Builds the object from hash
|
@@ -38,6 +38,7 @@ describe 'ContentFilesApi' do
|
|
38
38
|
# @param relative_path Path where the artifact is located relative to distributions base_path
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
40
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
41
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
41
42
|
# @option opts [String] :artifact Artifact file representing the physical content
|
42
43
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
43
44
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
@@ -55,11 +56,12 @@ describe 'ContentFilesApi' do
|
|
55
56
|
# @param [Hash] opts the optional parameters
|
56
57
|
# @option opts [Integer] :limit Number of results to return per page.
|
57
58
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
58
|
-
# @option opts [Array<String>] :ordering 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) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
59
|
+
# @option opts [Array<String>] :ordering 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) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
59
60
|
# @option opts [Float] :orphaned_for Minutes Content has been orphaned for. -1 uses ORPHAN_PROTECTION_TIME.
|
60
61
|
# @option opts [Array<String>] :prn__in Multiple values may be separated by commas.
|
61
62
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
62
63
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
64
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
63
65
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
64
66
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
65
67
|
# @option opts [String] :repository_version Repository Version referenced by HREF/PRN
|
@@ -89,4 +91,30 @@ describe 'ContentFilesApi' do
|
|
89
91
|
end
|
90
92
|
end
|
91
93
|
|
94
|
+
# unit tests for set_label
|
95
|
+
# Set a label
|
96
|
+
# Set a single pulp_label on the object to a specific value or null.
|
97
|
+
# @param file_file_content_href
|
98
|
+
# @param set_label
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [SetLabelResponse]
|
101
|
+
describe 'set_label test' do
|
102
|
+
it 'should work' do
|
103
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# unit tests for unset_label
|
108
|
+
# Unset a label
|
109
|
+
# Unset a single pulp_label on the object.
|
110
|
+
# @param file_file_content_href
|
111
|
+
# @param unset_label
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [UnsetLabelResponse]
|
114
|
+
describe 'unset_label test' do
|
115
|
+
it 'should work' do
|
116
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
92
120
|
end
|
@@ -51,6 +51,12 @@ describe PulpFileClient::FileFileContentResponse do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe 'test attribute "pulp_labels"' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
54
60
|
describe 'test attribute "artifact"' do
|
55
61
|
it 'should work' do
|
56
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|