pulp_maven_client 0.15.0 → 0.16.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 +11 -5
- data/docs/ContentArtifactApi.md +103 -6
- data/docs/RemoteNetworkConfig.md +50 -0
- data/docs/RemoteNetworkConfigResponse.md +40 -0
- data/lib/pulp_maven_client/api/content_artifact_api.rb +122 -5
- data/lib/pulp_maven_client/models/remote_network_config.rb +588 -0
- data/lib/pulp_maven_client/models/remote_network_config_response.rb +413 -0
- data/lib/pulp_maven_client/version.rb +1 -1
- data/lib/pulp_maven_client.rb +2 -0
- data/spec/api/content_artifact_api_spec.rb +26 -2
- data/spec/models/remote_network_config_response_spec.rb +102 -0
- data/spec/models/remote_network_config_spec.rb +132 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ca1f48c99dc8eb0ea0bb9a96914aba88874b383a9f119f3b9284603ce2f6e2f
|
|
4
|
+
data.tar.gz: 1739f4acdcdb2937620f8fc8de08a165cad25164b98f808552ce295c0c701c17
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 98e6bb118a07ef5c823d3677b235e8707f588a4d8140f421d0b0d14f05d5be6b9538165994faeeddfed47ed61e9d290d0791dadd72101e188bbe8ab3e676d620
|
|
7
|
+
data.tar.gz: b1e1b242442f1f3c5d783e76501c9867c5ddd7a096a7bc46423b7983e87aff65a9751b9034e6daae92bd69fe0d7f38589238c1903486c7e73f6625fb12998029
|
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: 0.
|
|
10
|
+
- Package version: 0.16.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_maven_client.gemspec
|
|
|
25
25
|
Then either install the gem locally:
|
|
26
26
|
|
|
27
27
|
```shell
|
|
28
|
-
gem install ./pulp_maven_client-0.
|
|
28
|
+
gem install ./pulp_maven_client-0.16.0.gem
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
(for development, run `gem install --dev ./pulp_maven_client-0.
|
|
31
|
+
(for development, run `gem install --dev ./pulp_maven_client-0.16.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_maven_client', '~> 0.
|
|
37
|
+
gem 'pulp_maven_client', '~> 0.16.0'
|
|
38
38
|
|
|
39
39
|
### Install from Git
|
|
40
40
|
|
|
@@ -75,7 +75,10 @@ opts = {
|
|
|
75
75
|
overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
76
76
|
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
77
77
|
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
|
78
|
-
file: File.new('/path/to/some/file') # File | An uploaded file that may be turned into the content unit.
|
|
78
|
+
file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
|
|
79
|
+
upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
|
|
80
|
+
file_url: 'file_url_example', # String | A url that Pulp can download and turn into the content unit.
|
|
81
|
+
downloader_config: PulpMavenClient::RemoteNetworkConfig.new # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
79
82
|
}
|
|
80
83
|
|
|
81
84
|
begin
|
|
@@ -99,6 +102,7 @@ Class | Method | HTTP request | Description
|
|
|
99
102
|
*PulpMavenClient::ContentArtifactApi* | [**read**](docs/ContentArtifactApi.md#read) | **GET** {maven_maven_artifact_href} | Inspect a maven artifact
|
|
100
103
|
*PulpMavenClient::ContentArtifactApi* | [**set_label**](docs/ContentArtifactApi.md#set_label) | **POST** {maven_maven_artifact_href}set_label/ | Set a label
|
|
101
104
|
*PulpMavenClient::ContentArtifactApi* | [**unset_label**](docs/ContentArtifactApi.md#unset_label) | **POST** {maven_maven_artifact_href}unset_label/ | Unset a label
|
|
105
|
+
*PulpMavenClient::ContentArtifactApi* | [**upload**](docs/ContentArtifactApi.md#upload) | **POST** /pulp/api/v3/content/maven/artifact/upload/ | Upload a Maven artifact synchronously.
|
|
102
106
|
*PulpMavenClient::DistributionsMavenApi* | [**create**](docs/DistributionsMavenApi.md#create) | **POST** /pulp/api/v3/distributions/maven/maven/ | Create a maven distribution
|
|
103
107
|
*PulpMavenClient::DistributionsMavenApi* | [**delete**](docs/DistributionsMavenApi.md#delete) | **DELETE** {maven_maven_distribution_href} | Delete a maven distribution
|
|
104
108
|
*PulpMavenClient::DistributionsMavenApi* | [**list**](docs/DistributionsMavenApi.md#list) | **GET** /pulp/api/v3/distributions/maven/maven/ | List maven distributions
|
|
@@ -154,6 +158,8 @@ Class | Method | HTTP request | Description
|
|
|
154
158
|
- [PulpMavenClient::PatchedmavenMavenRemote](docs/PatchedmavenMavenRemote.md)
|
|
155
159
|
- [PulpMavenClient::PatchedmavenMavenRepository](docs/PatchedmavenMavenRepository.md)
|
|
156
160
|
- [PulpMavenClient::PolicyEnum](docs/PolicyEnum.md)
|
|
161
|
+
- [PulpMavenClient::RemoteNetworkConfig](docs/RemoteNetworkConfig.md)
|
|
162
|
+
- [PulpMavenClient::RemoteNetworkConfigResponse](docs/RemoteNetworkConfigResponse.md)
|
|
157
163
|
- [PulpMavenClient::Repair](docs/Repair.md)
|
|
158
164
|
- [PulpMavenClient::RepositoryAddCachedContent](docs/RepositoryAddCachedContent.md)
|
|
159
165
|
- [PulpMavenClient::RepositoryAddRemoveContent](docs/RepositoryAddRemoveContent.md)
|
data/docs/ContentArtifactApi.md
CHANGED
|
@@ -9,15 +9,16 @@ All URIs are relative to *http://localhost:24817*
|
|
|
9
9
|
| [**read**](ContentArtifactApi.md#read) | **GET** {maven_maven_artifact_href} | Inspect a maven artifact |
|
|
10
10
|
| [**set_label**](ContentArtifactApi.md#set_label) | **POST** {maven_maven_artifact_href}set_label/ | Set a label |
|
|
11
11
|
| [**unset_label**](ContentArtifactApi.md#unset_label) | **POST** {maven_maven_artifact_href}unset_label/ | Unset a label |
|
|
12
|
+
| [**upload**](ContentArtifactApi.md#upload) | **POST** /pulp/api/v3/content/maven/artifact/upload/ | Upload a Maven artifact synchronously. |
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
## create
|
|
15
16
|
|
|
16
|
-
> <
|
|
17
|
+
> <AsyncOperationResponse> create(relative_path, opts)
|
|
17
18
|
|
|
18
19
|
Create a maven artifact
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
Trigger an asynchronous task to create content,optionally create new repository version.
|
|
21
22
|
|
|
22
23
|
### Examples
|
|
23
24
|
|
|
@@ -39,7 +40,10 @@ opts = {
|
|
|
39
40
|
overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
40
41
|
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
41
42
|
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
|
42
|
-
file: File.new('/path/to/some/file') # File | An uploaded file that may be turned into the content unit.
|
|
43
|
+
file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
|
|
44
|
+
upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
|
|
45
|
+
file_url: 'file_url_example', # String | A url that Pulp can download and turn into the content unit.
|
|
46
|
+
downloader_config: PulpMavenClient::RemoteNetworkConfig.new # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
begin
|
|
@@ -55,7 +59,7 @@ end
|
|
|
55
59
|
|
|
56
60
|
This returns an Array which contains the response data, status code and headers.
|
|
57
61
|
|
|
58
|
-
> <Array(<
|
|
62
|
+
> <Array(<AsyncOperationResponse>, Integer, Hash)> create_with_http_info(relative_path, opts)
|
|
59
63
|
|
|
60
64
|
```ruby
|
|
61
65
|
begin
|
|
@@ -63,7 +67,7 @@ begin
|
|
|
63
67
|
data, status_code, headers = api_instance.create_with_http_info(relative_path, opts)
|
|
64
68
|
p status_code # => 2xx
|
|
65
69
|
p headers # => { ... }
|
|
66
|
-
p data # => <
|
|
70
|
+
p data # => <AsyncOperationResponse>
|
|
67
71
|
rescue PulpMavenClient::ApiError => e
|
|
68
72
|
puts "Error when calling ContentArtifactApi->create_with_http_info: #{e}"
|
|
69
73
|
end
|
|
@@ -80,10 +84,13 @@ end
|
|
|
80
84
|
| **pulp_labels** | [**Hash<String, String>**](Hash.md) | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
81
85
|
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
|
82
86
|
| **file** | **File** | An uploaded file that may be turned into the content unit. | [optional] |
|
|
87
|
+
| **upload** | **String** | An uncommitted upload that may be turned into the content unit. | [optional] |
|
|
88
|
+
| **file_url** | **String** | A url that Pulp can download and turn into the content unit. | [optional] |
|
|
89
|
+
| **downloader_config** | [**RemoteNetworkConfig**](RemoteNetworkConfig.md) | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url. | [optional] |
|
|
83
90
|
|
|
84
91
|
### Return type
|
|
85
92
|
|
|
86
|
-
[**
|
|
93
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
|
87
94
|
|
|
88
95
|
### Authorization
|
|
89
96
|
|
|
@@ -432,3 +439,93 @@ end
|
|
|
432
439
|
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
|
433
440
|
- **Accept**: application/json
|
|
434
441
|
|
|
442
|
+
|
|
443
|
+
## upload
|
|
444
|
+
|
|
445
|
+
> <MavenMavenArtifactResponse> upload(relative_path, opts)
|
|
446
|
+
|
|
447
|
+
Upload a Maven artifact synchronously.
|
|
448
|
+
|
|
449
|
+
Synchronously upload a Maven artifact.
|
|
450
|
+
|
|
451
|
+
### Examples
|
|
452
|
+
|
|
453
|
+
```ruby
|
|
454
|
+
require 'time'
|
|
455
|
+
require 'pulp_maven_client'
|
|
456
|
+
# setup authorization
|
|
457
|
+
PulpMavenClient.configure do |config|
|
|
458
|
+
# Configure HTTP basic authorization: basicAuth
|
|
459
|
+
config.username = 'YOUR USERNAME'
|
|
460
|
+
config.password = 'YOUR PASSWORD'
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
api_instance = PulpMavenClient::ContentArtifactApi.new
|
|
464
|
+
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
|
|
465
|
+
opts = {
|
|
466
|
+
x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
|
|
467
|
+
repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
|
|
468
|
+
overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
469
|
+
pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
470
|
+
artifact: 'artifact_example', # String | Artifact file representing the physical content
|
|
471
|
+
file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
|
|
472
|
+
upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
|
|
473
|
+
file_url: 'file_url_example', # String | A url that Pulp can download and turn into the content unit.
|
|
474
|
+
downloader_config: PulpMavenClient::RemoteNetworkConfig.new # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
begin
|
|
478
|
+
# Upload a Maven artifact synchronously.
|
|
479
|
+
result = api_instance.upload(relative_path, opts)
|
|
480
|
+
p result
|
|
481
|
+
rescue PulpMavenClient::ApiError => e
|
|
482
|
+
puts "Error when calling ContentArtifactApi->upload: #{e}"
|
|
483
|
+
end
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Using the upload_with_http_info variant
|
|
487
|
+
|
|
488
|
+
This returns an Array which contains the response data, status code and headers.
|
|
489
|
+
|
|
490
|
+
> <Array(<MavenMavenArtifactResponse>, Integer, Hash)> upload_with_http_info(relative_path, opts)
|
|
491
|
+
|
|
492
|
+
```ruby
|
|
493
|
+
begin
|
|
494
|
+
# Upload a Maven artifact synchronously.
|
|
495
|
+
data, status_code, headers = api_instance.upload_with_http_info(relative_path, opts)
|
|
496
|
+
p status_code # => 2xx
|
|
497
|
+
p headers # => { ... }
|
|
498
|
+
p data # => <MavenMavenArtifactResponse>
|
|
499
|
+
rescue PulpMavenClient::ApiError => e
|
|
500
|
+
puts "Error when calling ContentArtifactApi->upload_with_http_info: #{e}"
|
|
501
|
+
end
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Parameters
|
|
505
|
+
|
|
506
|
+
| Name | Type | Description | Notes |
|
|
507
|
+
| ---- | ---- | ----------- | ----- |
|
|
508
|
+
| **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
|
|
509
|
+
| **x_task_diagnostics** | [**Array<String>**](String.md) | List of profilers to use on tasks. | [optional] |
|
|
510
|
+
| **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional] |
|
|
511
|
+
| **overwrite** | **Boolean** | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true. | [optional] |
|
|
512
|
+
| **pulp_labels** | [**Hash<String, String>**](Hash.md) | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
|
|
513
|
+
| **artifact** | **String** | Artifact file representing the physical content | [optional] |
|
|
514
|
+
| **file** | **File** | An uploaded file that may be turned into the content unit. | [optional] |
|
|
515
|
+
| **upload** | **String** | An uncommitted upload that may be turned into the content unit. | [optional] |
|
|
516
|
+
| **file_url** | **String** | A url that Pulp can download and turn into the content unit. | [optional] |
|
|
517
|
+
| **downloader_config** | [**RemoteNetworkConfig**](RemoteNetworkConfig.md) | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url. | [optional] |
|
|
518
|
+
|
|
519
|
+
### Return type
|
|
520
|
+
|
|
521
|
+
[**MavenMavenArtifactResponse**](MavenMavenArtifactResponse.md)
|
|
522
|
+
|
|
523
|
+
### Authorization
|
|
524
|
+
|
|
525
|
+
[basicAuth](../README.md#basicAuth)
|
|
526
|
+
|
|
527
|
+
### HTTP request headers
|
|
528
|
+
|
|
529
|
+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
|
|
530
|
+
- **Accept**: application/json
|
|
531
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# PulpMavenClient::RemoteNetworkConfig
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ca_cert** | **String** | A PEM encoded CA certificate used to validate the server certificate presented by the remote server. | [optional] |
|
|
8
|
+
| **client_cert** | **String** | A PEM encoded client certificate used for authentication. | [optional] |
|
|
9
|
+
| **client_key** | **String** | A PEM encoded private key used for authentication. | [optional] |
|
|
10
|
+
| **tls_validation** | **Boolean** | If True, TLS peer validation must be performed. | [optional] |
|
|
11
|
+
| **proxy_url** | **String** | The proxy URL. Format: scheme://host:port | [optional] |
|
|
12
|
+
| **proxy_username** | **String** | The username to authenticte to the proxy. | [optional] |
|
|
13
|
+
| **proxy_password** | **String** | The password to authenticate to the proxy. Extra leading and trailing whitespace characters are not trimmed. | [optional] |
|
|
14
|
+
| **username** | **String** | The username to be used for authentication when syncing. | [optional] |
|
|
15
|
+
| **password** | **String** | The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed. | [optional] |
|
|
16
|
+
| **max_retries** | **Integer** | Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. | [optional] |
|
|
17
|
+
| **total_timeout** | **Float** | aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
18
|
+
| **connect_timeout** | **Float** | aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
19
|
+
| **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
20
|
+
| **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
21
|
+
| **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional] |
|
|
22
|
+
| **download_concurrency** | **Integer** | Total number of simultaneous connections. If not set then the default value will be used. | [optional] |
|
|
23
|
+
| **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional] |
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'pulp_maven_client'
|
|
29
|
+
|
|
30
|
+
instance = PulpMavenClient::RemoteNetworkConfig.new(
|
|
31
|
+
ca_cert: null,
|
|
32
|
+
client_cert: null,
|
|
33
|
+
client_key: null,
|
|
34
|
+
tls_validation: null,
|
|
35
|
+
proxy_url: null,
|
|
36
|
+
proxy_username: null,
|
|
37
|
+
proxy_password: null,
|
|
38
|
+
username: null,
|
|
39
|
+
password: null,
|
|
40
|
+
max_retries: null,
|
|
41
|
+
total_timeout: null,
|
|
42
|
+
connect_timeout: null,
|
|
43
|
+
sock_connect_timeout: null,
|
|
44
|
+
sock_read_timeout: null,
|
|
45
|
+
headers: null,
|
|
46
|
+
download_concurrency: null,
|
|
47
|
+
rate_limit: null
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# PulpMavenClient::RemoteNetworkConfigResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ca_cert** | **String** | A PEM encoded CA certificate used to validate the server certificate presented by the remote server. | [optional] |
|
|
8
|
+
| **client_cert** | **String** | A PEM encoded client certificate used for authentication. | [optional] |
|
|
9
|
+
| **tls_validation** | **Boolean** | If True, TLS peer validation must be performed. | [optional] |
|
|
10
|
+
| **proxy_url** | **String** | The proxy URL. Format: scheme://host:port | [optional] |
|
|
11
|
+
| **max_retries** | **Integer** | Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used. | [optional] |
|
|
12
|
+
| **total_timeout** | **Float** | aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
13
|
+
| **connect_timeout** | **Float** | aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
14
|
+
| **sock_connect_timeout** | **Float** | aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
15
|
+
| **sock_read_timeout** | **Float** | aiohttp.ClientTimeout.sock_read (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used. | [optional] |
|
|
16
|
+
| **headers** | **Array<Object>** | Headers for aiohttp.Clientsession | [optional] |
|
|
17
|
+
| **download_concurrency** | **Integer** | Total number of simultaneous connections. If not set then the default value will be used. | [optional] |
|
|
18
|
+
| **rate_limit** | **Integer** | Limits requests per second for each concurrent downloader | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'pulp_maven_client'
|
|
24
|
+
|
|
25
|
+
instance = PulpMavenClient::RemoteNetworkConfigResponse.new(
|
|
26
|
+
ca_cert: null,
|
|
27
|
+
client_cert: null,
|
|
28
|
+
tls_validation: null,
|
|
29
|
+
proxy_url: null,
|
|
30
|
+
max_retries: null,
|
|
31
|
+
total_timeout: null,
|
|
32
|
+
connect_timeout: null,
|
|
33
|
+
sock_connect_timeout: null,
|
|
34
|
+
sock_read_timeout: null,
|
|
35
|
+
headers: null,
|
|
36
|
+
download_concurrency: null,
|
|
37
|
+
rate_limit: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -20,7 +20,7 @@ module PulpMavenClient
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create a maven artifact
|
|
23
|
-
#
|
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
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 [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -29,14 +29,17 @@ module PulpMavenClient
|
|
|
29
29
|
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
30
30
|
# @option opts [String] :artifact Artifact file representing the physical content
|
|
31
31
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
32
|
-
# @
|
|
32
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
33
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
34
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
35
|
+
# @return [AsyncOperationResponse]
|
|
33
36
|
def create(relative_path, opts = {})
|
|
34
37
|
data, _status_code, _headers = create_with_http_info(relative_path, opts)
|
|
35
38
|
data
|
|
36
39
|
end
|
|
37
40
|
|
|
38
41
|
# Create a maven artifact
|
|
39
|
-
#
|
|
42
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
40
43
|
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
41
44
|
# @param [Hash] opts the optional parameters
|
|
42
45
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -45,7 +48,10 @@ module PulpMavenClient
|
|
|
45
48
|
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
46
49
|
# @option opts [String] :artifact Artifact file representing the physical content
|
|
47
50
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
48
|
-
# @
|
|
51
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
52
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
53
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
54
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
49
55
|
def create_with_http_info(relative_path, opts = {})
|
|
50
56
|
if @api_client.config.debugging
|
|
51
57
|
@api_client.config.logger.debug 'Calling API: ContentArtifactApi.create ...'
|
|
@@ -58,6 +64,10 @@ module PulpMavenClient
|
|
|
58
64
|
fail ArgumentError, 'invalid value for "relative_path" when calling ContentArtifactApi.create, the character length must be great than or equal to 1.'
|
|
59
65
|
end
|
|
60
66
|
|
|
67
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
68
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentArtifactApi.create, the character length must be great than or equal to 1.'
|
|
69
|
+
end
|
|
70
|
+
|
|
61
71
|
# resource path
|
|
62
72
|
local_var_path = '/pulp/api/v3/content/maven/artifact/'
|
|
63
73
|
|
|
@@ -83,12 +93,15 @@ module PulpMavenClient
|
|
|
83
93
|
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
84
94
|
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
85
95
|
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
96
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
97
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
98
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
86
99
|
|
|
87
100
|
# http body (model)
|
|
88
101
|
post_body = opts[:debug_body]
|
|
89
102
|
|
|
90
103
|
# return_type
|
|
91
|
-
return_type = opts[:debug_return_type] || '
|
|
104
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
92
105
|
|
|
93
106
|
# auth_names
|
|
94
107
|
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
@@ -453,5 +466,109 @@ module PulpMavenClient
|
|
|
453
466
|
end
|
|
454
467
|
return data, status_code, headers
|
|
455
468
|
end
|
|
469
|
+
|
|
470
|
+
# Upload a Maven artifact synchronously.
|
|
471
|
+
# Synchronously upload a Maven artifact.
|
|
472
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
475
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
476
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
477
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
478
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
479
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
480
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
481
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
482
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
483
|
+
# @return [MavenMavenArtifactResponse]
|
|
484
|
+
def upload(relative_path, opts = {})
|
|
485
|
+
data, _status_code, _headers = upload_with_http_info(relative_path, opts)
|
|
486
|
+
data
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
# Upload a Maven artifact synchronously.
|
|
490
|
+
# Synchronously upload a Maven artifact.
|
|
491
|
+
# @param relative_path [String] Path where the artifact is located relative to distributions base_path
|
|
492
|
+
# @param [Hash] opts the optional parameters
|
|
493
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
494
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
495
|
+
# @option opts [Boolean] :overwrite When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
|
|
496
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
497
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
498
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
499
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
500
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
501
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
502
|
+
# @return [Array<(MavenMavenArtifactResponse, Integer, Hash)>] MavenMavenArtifactResponse data, response status code and response headers
|
|
503
|
+
def upload_with_http_info(relative_path, opts = {})
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug 'Calling API: ContentArtifactApi.upload ...'
|
|
506
|
+
end
|
|
507
|
+
# verify the required parameter 'relative_path' is set
|
|
508
|
+
if @api_client.config.client_side_validation && relative_path.nil?
|
|
509
|
+
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentArtifactApi.upload"
|
|
510
|
+
end
|
|
511
|
+
if @api_client.config.client_side_validation && relative_path.to_s.length < 1
|
|
512
|
+
fail ArgumentError, 'invalid value for "relative_path" when calling ContentArtifactApi.upload, the character length must be great than or equal to 1.'
|
|
513
|
+
end
|
|
514
|
+
|
|
515
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
516
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentArtifactApi.upload, the character length must be great than or equal to 1.'
|
|
517
|
+
end
|
|
518
|
+
|
|
519
|
+
# resource path
|
|
520
|
+
local_var_path = '/pulp/api/v3/content/maven/artifact/upload/'
|
|
521
|
+
|
|
522
|
+
# query parameters
|
|
523
|
+
query_params = opts[:query_params] || {}
|
|
524
|
+
|
|
525
|
+
# header parameters
|
|
526
|
+
header_params = opts[:header_params] || {}
|
|
527
|
+
# HTTP header 'Accept' (if needed)
|
|
528
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
529
|
+
# HTTP header 'Content-Type'
|
|
530
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
531
|
+
if !content_type.nil?
|
|
532
|
+
header_params['Content-Type'] = content_type
|
|
533
|
+
end
|
|
534
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
535
|
+
|
|
536
|
+
# form parameters
|
|
537
|
+
form_params = opts[:form_params] || {}
|
|
538
|
+
form_params['relative_path'] = relative_path
|
|
539
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
540
|
+
form_params['overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
|
|
541
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
542
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
543
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
544
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
545
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
546
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
547
|
+
|
|
548
|
+
# http body (model)
|
|
549
|
+
post_body = opts[:debug_body]
|
|
550
|
+
|
|
551
|
+
# return_type
|
|
552
|
+
return_type = opts[:debug_return_type] || 'MavenMavenArtifactResponse'
|
|
553
|
+
|
|
554
|
+
# auth_names
|
|
555
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
556
|
+
|
|
557
|
+
new_options = opts.merge(
|
|
558
|
+
:operation => :"ContentArtifactApi.upload",
|
|
559
|
+
:header_params => header_params,
|
|
560
|
+
:query_params => query_params,
|
|
561
|
+
:form_params => form_params,
|
|
562
|
+
:body => post_body,
|
|
563
|
+
:auth_names => auth_names,
|
|
564
|
+
:return_type => return_type
|
|
565
|
+
)
|
|
566
|
+
|
|
567
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
568
|
+
if @api_client.config.debugging
|
|
569
|
+
@api_client.config.logger.debug "API called: ContentArtifactApi#upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
570
|
+
end
|
|
571
|
+
return data, status_code, headers
|
|
572
|
+
end
|
|
456
573
|
end
|
|
457
574
|
end
|