pulp_maven_client 0.14.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84d624390d9a4297abcdb9d2eef0c3ae5dc7fec3dce7793bb18c88a22b054c63
4
- data.tar.gz: 4a628a86ef1198a2882aff33a62a7a0ea9f464679739700caf03c1582a08b9c2
3
+ metadata.gz: 5ca1f48c99dc8eb0ea0bb9a96914aba88874b383a9f119f3b9284603ce2f6e2f
4
+ data.tar.gz: 1739f4acdcdb2937620f8fc8de08a165cad25164b98f808552ce295c0c701c17
5
5
  SHA512:
6
- metadata.gz: 23c7d20bb9ec2871aeec78e34d65a67a001ae3d3dcb9f4f1d2149d7d1368dccc151b17be35c530eefaf64acd5d79997bbcfb32467850d3439ce929c7a6bd5cd2
7
- data.tar.gz: d573031e6986f8b1448ab41328e4f2e8701159651e6cd77398c7c026a095fe4500a67b0a9dd3da1d4282f07261025e28819b6c40a20d412470deee1cc46280bd
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.14.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.14.0.gem
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.14.0.gem` to install the development dependencies)
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.14.0'
37
+ gem 'pulp_maven_client', '~> 0.16.0'
38
38
 
39
39
  ### Install from Git
40
40
 
@@ -68,14 +68,22 @@ PulpMavenClient.configure do |config|
68
68
  end
69
69
 
70
70
  api_instance = PulpMavenClient::ContentArtifactApi.new
71
- maven_maven_artifact = PulpMavenClient::MavenMavenArtifact.new({artifact: 'artifact_example', relative_path: 'relative_path_example'}) # MavenMavenArtifact |
71
+ relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
72
72
  opts = {
73
- x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
73
+ x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
74
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
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
+ pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
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.
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.
74
82
  }
75
83
 
76
84
  begin
77
85
  #Create a maven artifact
78
- result = api_instance.create(maven_maven_artifact, opts)
86
+ result = api_instance.create(relative_path, opts)
79
87
  p result
80
88
  rescue PulpMavenClient::ApiError => e
81
89
  puts "Exception when calling ContentArtifactApi->create: #{e}"
@@ -94,6 +102,7 @@ Class | Method | HTTP request | Description
94
102
  *PulpMavenClient::ContentArtifactApi* | [**read**](docs/ContentArtifactApi.md#read) | **GET** {maven_maven_artifact_href} | Inspect a maven artifact
95
103
  *PulpMavenClient::ContentArtifactApi* | [**set_label**](docs/ContentArtifactApi.md#set_label) | **POST** {maven_maven_artifact_href}set_label/ | Set a label
96
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.
97
106
  *PulpMavenClient::DistributionsMavenApi* | [**create**](docs/DistributionsMavenApi.md#create) | **POST** /pulp/api/v3/distributions/maven/maven/ | Create a maven distribution
98
107
  *PulpMavenClient::DistributionsMavenApi* | [**delete**](docs/DistributionsMavenApi.md#delete) | **DELETE** {maven_maven_distribution_href} | Delete a maven distribution
99
108
  *PulpMavenClient::DistributionsMavenApi* | [**list**](docs/DistributionsMavenApi.md#list) | **GET** /pulp/api/v3/distributions/maven/maven/ | List maven distributions
@@ -132,7 +141,6 @@ Class | Method | HTTP request | Description
132
141
 
133
142
  - [PulpMavenClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
134
143
  - [PulpMavenClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
135
- - [PulpMavenClient::MavenMavenArtifact](docs/MavenMavenArtifact.md)
136
144
  - [PulpMavenClient::MavenMavenArtifactResponse](docs/MavenMavenArtifactResponse.md)
137
145
  - [PulpMavenClient::MavenMavenDistribution](docs/MavenMavenDistribution.md)
138
146
  - [PulpMavenClient::MavenMavenDistributionResponse](docs/MavenMavenDistributionResponse.md)
@@ -150,6 +158,8 @@ Class | Method | HTTP request | Description
150
158
  - [PulpMavenClient::PatchedmavenMavenRemote](docs/PatchedmavenMavenRemote.md)
151
159
  - [PulpMavenClient::PatchedmavenMavenRepository](docs/PatchedmavenMavenRepository.md)
152
160
  - [PulpMavenClient::PolicyEnum](docs/PolicyEnum.md)
161
+ - [PulpMavenClient::RemoteNetworkConfig](docs/RemoteNetworkConfig.md)
162
+ - [PulpMavenClient::RemoteNetworkConfigResponse](docs/RemoteNetworkConfigResponse.md)
153
163
  - [PulpMavenClient::Repair](docs/Repair.md)
154
164
  - [PulpMavenClient::RepositoryAddCachedContent](docs/RepositoryAddCachedContent.md)
155
165
  - [PulpMavenClient::RepositoryAddRemoveContent](docs/RepositoryAddRemoveContent.md)
@@ -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
- > <MavenMavenArtifactResponse> create(maven_maven_artifact, opts)
17
+ > <AsyncOperationResponse> create(relative_path, opts)
17
18
 
18
19
  Create a maven artifact
19
20
 
20
- A ViewSet for MavenArtifact.
21
+ Trigger an asynchronous task to create content,optionally create new repository version.
21
22
 
22
23
  ### Examples
23
24
 
@@ -32,14 +33,22 @@ PulpMavenClient.configure do |config|
32
33
  end
33
34
 
34
35
  api_instance = PulpMavenClient::ContentArtifactApi.new
35
- maven_maven_artifact = PulpMavenClient::MavenMavenArtifact.new({artifact: 'artifact_example', relative_path: 'relative_path_example'}) # MavenMavenArtifact |
36
+ relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
36
37
  opts = {
37
- x_task_diagnostics: ['inner_example'] # Array<String> | List of profilers to use on tasks.
38
+ x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
39
+ repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
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.
41
+ pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
42
+ artifact: 'artifact_example', # String | Artifact file representing the physical content
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.
38
47
  }
39
48
 
40
49
  begin
41
50
  # Create a maven artifact
42
- result = api_instance.create(maven_maven_artifact, opts)
51
+ result = api_instance.create(relative_path, opts)
43
52
  p result
44
53
  rescue PulpMavenClient::ApiError => e
45
54
  puts "Error when calling ContentArtifactApi->create: #{e}"
@@ -50,15 +59,15 @@ end
50
59
 
51
60
  This returns an Array which contains the response data, status code and headers.
52
61
 
53
- > <Array(<MavenMavenArtifactResponse>, Integer, Hash)> create_with_http_info(maven_maven_artifact, opts)
62
+ > <Array(<AsyncOperationResponse>, Integer, Hash)> create_with_http_info(relative_path, opts)
54
63
 
55
64
  ```ruby
56
65
  begin
57
66
  # Create a maven artifact
58
- data, status_code, headers = api_instance.create_with_http_info(maven_maven_artifact, opts)
67
+ data, status_code, headers = api_instance.create_with_http_info(relative_path, opts)
59
68
  p status_code # => 2xx
60
69
  p headers # => { ... }
61
- p data # => <MavenMavenArtifactResponse>
70
+ p data # => <AsyncOperationResponse>
62
71
  rescue PulpMavenClient::ApiError => e
63
72
  puts "Error when calling ContentArtifactApi->create_with_http_info: #{e}"
64
73
  end
@@ -68,12 +77,20 @@ end
68
77
 
69
78
  | Name | Type | Description | Notes |
70
79
  | ---- | ---- | ----------- | ----- |
71
- | **maven_maven_artifact** | [**MavenMavenArtifact**](MavenMavenArtifact.md) | | |
80
+ | **relative_path** | **String** | Path where the artifact is located relative to distributions base_path | |
72
81
  | **x_task_diagnostics** | [**Array&lt;String&gt;**](String.md) | List of profilers to use on tasks. | [optional] |
82
+ | **repository** | **String** | A URI of a repository the new content unit should be associated with. | [optional] |
83
+ | **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 &#39;repository&#39; is specified. Defaults to true. | [optional] |
84
+ | **pulp_labels** | [**Hash&lt;String, String&gt;**](Hash.md) | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
85
+ | **artifact** | **String** | Artifact file representing the physical content | [optional] |
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 &#39;file_url. | [optional] |
73
90
 
74
91
  ### Return type
75
92
 
76
- [**MavenMavenArtifactResponse**](MavenMavenArtifactResponse.md)
93
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
77
94
 
78
95
  ### Authorization
79
96
 
@@ -81,7 +98,7 @@ end
81
98
 
82
99
  ### HTTP request headers
83
100
 
84
- - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
101
+ - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
85
102
  - **Accept**: application/json
86
103
 
87
104
 
@@ -422,3 +439,93 @@ end
422
439
  - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
423
440
  - **Accept**: application/json
424
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&lt;String&gt;**](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 &#39;repository&#39; is specified. Defaults to true. | [optional] |
512
+ | **pulp_labels** | [**Hash&lt;String, String&gt;**](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 &#39;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
+
@@ -10,7 +10,7 @@
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
11
  | **pulp_labels** | **Hash&lt;String, String&gt;** | A dictionary of arbitrary key/value pairs used to describe a specific Content instance. | [optional] |
12
12
  | **vuln_report** | **String** | | [optional][readonly] |
13
- | **artifact** | **String** | Artifact file representing the physical content | |
13
+ | **artifact** | **String** | Artifact file representing the physical content | [optional] |
14
14
  | **group_id** | **String** | Group Id of the artifact&#39;s package. | [optional][readonly] |
15
15
  | **artifact_id** | **String** | Artifact Id of the artifact&#39;s package. | [optional][readonly] |
16
16
  | **version** | **String** | Version of the artifact&#39;s package. | [optional][readonly] |
@@ -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&lt;Object&gt;** | 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&lt;Object&gt;** | 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,30 +20,54 @@ module PulpMavenClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create a maven artifact
23
- # A ViewSet for MavenArtifact.
24
- # @param maven_maven_artifact [MavenMavenArtifact]
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
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.
27
- # @return [MavenMavenArtifactResponse]
28
- def create(maven_maven_artifact, opts = {})
29
- data, _status_code, _headers = create_with_http_info(maven_maven_artifact, opts)
27
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
28
+ # @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 &#39;repository&#39; is specified. Defaults to true.
29
+ # @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
30
+ # @option opts [String] :artifact Artifact file representing the physical content
31
+ # @option opts [File] :file An uploaded file that may be turned into the content unit.
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 &#39;file_url.
35
+ # @return [AsyncOperationResponse]
36
+ def create(relative_path, opts = {})
37
+ data, _status_code, _headers = create_with_http_info(relative_path, opts)
30
38
  data
31
39
  end
32
40
 
33
41
  # Create a maven artifact
34
- # A ViewSet for MavenArtifact.
35
- # @param maven_maven_artifact [MavenMavenArtifact]
42
+ # Trigger an asynchronous task to create content,optionally create new repository version.
43
+ # @param relative_path [String] Path where the artifact is located relative to distributions base_path
36
44
  # @param [Hash] opts the optional parameters
37
45
  # @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
38
- # @return [Array<(MavenMavenArtifactResponse, Integer, Hash)>] MavenMavenArtifactResponse data, response status code and response headers
39
- def create_with_http_info(maven_maven_artifact, opts = {})
46
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
47
+ # @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 &#39;repository&#39; is specified. Defaults to true.
48
+ # @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
49
+ # @option opts [String] :artifact Artifact file representing the physical content
50
+ # @option opts [File] :file An uploaded file that may be turned into the content unit.
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 &#39;file_url.
54
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
55
+ def create_with_http_info(relative_path, opts = {})
40
56
  if @api_client.config.debugging
41
57
  @api_client.config.logger.debug 'Calling API: ContentArtifactApi.create ...'
42
58
  end
43
- # verify the required parameter 'maven_maven_artifact' is set
44
- if @api_client.config.client_side_validation && maven_maven_artifact.nil?
45
- fail ArgumentError, "Missing the required parameter 'maven_maven_artifact' when calling ContentArtifactApi.create"
59
+ # verify the required parameter 'relative_path' is set
60
+ if @api_client.config.client_side_validation && relative_path.nil?
61
+ fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentArtifactApi.create"
62
+ end
63
+ if @api_client.config.client_side_validation && relative_path.to_s.length < 1
64
+ fail ArgumentError, 'invalid value for "relative_path" when calling ContentArtifactApi.create, the character length must be great than or equal to 1.'
46
65
  end
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
+
47
71
  # resource path
48
72
  local_var_path = '/pulp/api/v3/content/maven/artifact/'
49
73
 
@@ -55,7 +79,7 @@ module PulpMavenClient
55
79
  # HTTP header 'Accept' (if needed)
56
80
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
57
81
  # HTTP header 'Content-Type'
58
- content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
82
+ content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
59
83
  if !content_type.nil?
60
84
  header_params['Content-Type'] = content_type
61
85
  end
@@ -63,12 +87,21 @@ module PulpMavenClient
63
87
 
64
88
  # form parameters
65
89
  form_params = opts[:form_params] || {}
90
+ form_params['relative_path'] = relative_path
91
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
92
+ form_params['overwrite'] = opts[:'overwrite'] if !opts[:'overwrite'].nil?
93
+ form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
94
+ form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
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?
66
99
 
67
100
  # http body (model)
68
- post_body = opts[:debug_body] || @api_client.object_to_http_body(maven_maven_artifact)
101
+ post_body = opts[:debug_body]
69
102
 
70
103
  # return_type
71
- return_type = opts[:debug_return_type] || 'MavenMavenArtifactResponse'
104
+ return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
72
105
 
73
106
  # auth_names
74
107
  auth_names = opts[:debug_auth_names] || ['basicAuth']
@@ -433,5 +466,109 @@ module PulpMavenClient
433
466
  end
434
467
  return data, status_code, headers
435
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 &#39;repository&#39; 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 &#39;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 &#39;repository&#39; 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 &#39;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
436
573
  end
437
574
  end
@@ -135,8 +135,6 @@ module PulpMavenClient
135
135
 
136
136
  if attributes.key?(:'artifact')
137
137
  self.artifact = attributes[:'artifact']
138
- else
139
- self.artifact = nil
140
138
  end
141
139
 
142
140
  if attributes.key?(:'group_id')
@@ -161,10 +159,6 @@ module PulpMavenClient
161
159
  def list_invalid_properties
162
160
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
163
161
  invalid_properties = Array.new
164
- if @artifact.nil?
165
- invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
166
- end
167
-
168
162
  invalid_properties
169
163
  end
170
164
 
@@ -172,7 +166,6 @@ module PulpMavenClient
172
166
  # @return true if the model is valid
173
167
  def valid?
174
168
  warn '[DEPRECATED] the `valid?` method is obsolete'
175
- return false if @artifact.nil?
176
169
  true
177
170
  end
178
171