pulp_npm_client 0.4.0 → 0.6.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 +13 -9
- data/docs/ContentPackagesApi.md +115 -22
- data/docs/DistributionsNpmApi.md +14 -14
- data/docs/NpmNpmRemote.md +6 -6
- data/docs/NpmNpmRemoteResponse.md +9 -9
- data/docs/NpmPackageResponse.md +3 -3
- data/docs/PatchednpmNpmRemote.md +6 -6
- data/docs/RemoteNetworkConfig.md +50 -0
- data/docs/RemoteNetworkConfigResponse.md +40 -0
- data/docs/RemotesNpmApi.md +13 -13
- data/docs/RepositoriesNpmApi.md +15 -15
- data/lib/pulp_npm_client/api/content_packages_api.rb +146 -47
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +14 -14
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +16 -16
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +18 -18
- data/lib/pulp_npm_client/models/npm_npm_remote.rb +34 -34
- data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +50 -50
- data/lib/pulp_npm_client/models/npm_npm_repository.rb +1 -1
- data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +1 -1
- data/lib/pulp_npm_client/models/npm_package_response.rb +4 -22
- data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +34 -34
- data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +1 -1
- data/lib/pulp_npm_client/models/remote_network_config.rb +573 -0
- data/lib/pulp_npm_client/models/remote_network_config_response.rb +398 -0
- data/lib/pulp_npm_client/version.rb +1 -1
- data/lib/pulp_npm_client.rb +2 -0
- data/spec/api/content_packages_api_spec.rb +32 -10
- data/spec/api/distributions_npm_api_spec.rb +6 -6
- data/spec/api/remotes_npm_api_spec.rb +7 -7
- data/spec/api/repositories_npm_api_spec.rb +8 -8
- data/spec/models/npm_npm_remote_response_spec.rb +10 -10
- data/spec/models/npm_npm_remote_spec.rb +17 -17
- data/spec/models/patchednpm_npm_remote_spec.rb +17 -17
- data/spec/models/remote_network_config_response_spec.rb +102 -0
- data/spec/models/remote_network_config_spec.rb +132 -0
- metadata +31 -23
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# PulpNpmClient::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_npm_client'
|
|
24
|
+
|
|
25
|
+
instance = PulpNpmClient::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
|
+
|
data/docs/RemotesNpmApi.md
CHANGED
|
@@ -20,7 +20,7 @@ All URIs are relative to *http://localhost:24817*
|
|
|
20
20
|
|
|
21
21
|
Create a npm remote
|
|
22
22
|
|
|
23
|
-
A ViewSet for NpmRemote. Similar to the
|
|
23
|
+
A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
24
24
|
|
|
25
25
|
### Examples
|
|
26
26
|
|
|
@@ -168,7 +168,7 @@ end
|
|
|
168
168
|
|
|
169
169
|
List npm remotes
|
|
170
170
|
|
|
171
|
-
A ViewSet for NpmRemote. Similar to the
|
|
171
|
+
A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
172
172
|
|
|
173
173
|
### Examples
|
|
174
174
|
|
|
@@ -288,11 +288,11 @@ end
|
|
|
288
288
|
|
|
289
289
|
## partial_update
|
|
290
290
|
|
|
291
|
-
> <
|
|
291
|
+
> <NpmNpmRemoteResponse> partial_update(npm_npm_remote_href, patchednpm_npm_remote, opts)
|
|
292
292
|
|
|
293
293
|
Update a npm remote
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
Update the entity partially and trigger an asynchronous task if necessary
|
|
296
296
|
|
|
297
297
|
### Examples
|
|
298
298
|
|
|
@@ -326,7 +326,7 @@ end
|
|
|
326
326
|
|
|
327
327
|
This returns an Array which contains the response data, status code and headers.
|
|
328
328
|
|
|
329
|
-
> <Array(<
|
|
329
|
+
> <Array(<NpmNpmRemoteResponse>, Integer, Hash)> partial_update_with_http_info(npm_npm_remote_href, patchednpm_npm_remote, opts)
|
|
330
330
|
|
|
331
331
|
```ruby
|
|
332
332
|
begin
|
|
@@ -334,7 +334,7 @@ begin
|
|
|
334
334
|
data, status_code, headers = api_instance.partial_update_with_http_info(npm_npm_remote_href, patchednpm_npm_remote, opts)
|
|
335
335
|
p status_code # => 2xx
|
|
336
336
|
p headers # => { ... }
|
|
337
|
-
p data # => <
|
|
337
|
+
p data # => <NpmNpmRemoteResponse>
|
|
338
338
|
rescue PulpNpmClient::ApiError => e
|
|
339
339
|
puts "Error when calling RemotesNpmApi->partial_update_with_http_info: #{e}"
|
|
340
340
|
end
|
|
@@ -350,7 +350,7 @@ end
|
|
|
350
350
|
|
|
351
351
|
### Return type
|
|
352
352
|
|
|
353
|
-
[**
|
|
353
|
+
[**NpmNpmRemoteResponse**](NpmNpmRemoteResponse.md)
|
|
354
354
|
|
|
355
355
|
### Authorization
|
|
356
356
|
|
|
@@ -368,7 +368,7 @@ end
|
|
|
368
368
|
|
|
369
369
|
Inspect a npm remote
|
|
370
370
|
|
|
371
|
-
A ViewSet for NpmRemote. Similar to the
|
|
371
|
+
A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
372
372
|
|
|
373
373
|
### Examples
|
|
374
374
|
|
|
@@ -594,11 +594,11 @@ end
|
|
|
594
594
|
|
|
595
595
|
## update
|
|
596
596
|
|
|
597
|
-
> <
|
|
597
|
+
> <NpmNpmRemoteResponse> update(npm_npm_remote_href, npm_npm_remote, opts)
|
|
598
598
|
|
|
599
599
|
Update a npm remote
|
|
600
600
|
|
|
601
|
-
|
|
601
|
+
Update the entity and trigger an asynchronous task if necessary
|
|
602
602
|
|
|
603
603
|
### Examples
|
|
604
604
|
|
|
@@ -632,7 +632,7 @@ end
|
|
|
632
632
|
|
|
633
633
|
This returns an Array which contains the response data, status code and headers.
|
|
634
634
|
|
|
635
|
-
> <Array(<
|
|
635
|
+
> <Array(<NpmNpmRemoteResponse>, Integer, Hash)> update_with_http_info(npm_npm_remote_href, npm_npm_remote, opts)
|
|
636
636
|
|
|
637
637
|
```ruby
|
|
638
638
|
begin
|
|
@@ -640,7 +640,7 @@ begin
|
|
|
640
640
|
data, status_code, headers = api_instance.update_with_http_info(npm_npm_remote_href, npm_npm_remote, opts)
|
|
641
641
|
p status_code # => 2xx
|
|
642
642
|
p headers # => { ... }
|
|
643
|
-
p data # => <
|
|
643
|
+
p data # => <NpmNpmRemoteResponse>
|
|
644
644
|
rescue PulpNpmClient::ApiError => e
|
|
645
645
|
puts "Error when calling RemotesNpmApi->update_with_http_info: #{e}"
|
|
646
646
|
end
|
|
@@ -656,7 +656,7 @@ end
|
|
|
656
656
|
|
|
657
657
|
### Return type
|
|
658
658
|
|
|
659
|
-
[**
|
|
659
|
+
[**NpmNpmRemoteResponse**](NpmNpmRemoteResponse.md)
|
|
660
660
|
|
|
661
661
|
### Authorization
|
|
662
662
|
|
data/docs/RepositoriesNpmApi.md
CHANGED
|
@@ -22,7 +22,7 @@ All URIs are relative to *http://localhost:24817*
|
|
|
22
22
|
|
|
23
23
|
Create a npm repository
|
|
24
24
|
|
|
25
|
-
A ViewSet for NpmRepository. Similar to the
|
|
25
|
+
A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
26
26
|
|
|
27
27
|
### Examples
|
|
28
28
|
|
|
@@ -170,7 +170,7 @@ end
|
|
|
170
170
|
|
|
171
171
|
List npm repositorys
|
|
172
172
|
|
|
173
|
-
A ViewSet for NpmRepository. Similar to the
|
|
173
|
+
A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
174
174
|
|
|
175
175
|
### Examples
|
|
176
176
|
|
|
@@ -205,7 +205,7 @@ opts = {
|
|
|
205
205
|
pulp_id__in: ['inner_example'], # Array<String> | Multiple values may be separated by commas.
|
|
206
206
|
pulp_label_select: 'pulp_label_select_example', # String | Filter labels by search string
|
|
207
207
|
q: 'q_example', # String | Filter results by using NOT, AND and OR operations on other filters
|
|
208
|
-
remote: '
|
|
208
|
+
remote: 'remote_example', # String |
|
|
209
209
|
retain_repo_versions: 56, # Integer | Filter results where retain_repo_versions matches value
|
|
210
210
|
retain_repo_versions__gt: 56, # Integer | Filter results where retain_repo_versions is greater than value
|
|
211
211
|
retain_repo_versions__gte: 56, # Integer | Filter results where retain_repo_versions is greater than or equal to value
|
|
@@ -269,7 +269,7 @@ end
|
|
|
269
269
|
| **pulp_id__in** | [**Array<String>**](String.md) | Multiple values may be separated by commas. | [optional] |
|
|
270
270
|
| **pulp_label_select** | **String** | Filter labels by search string | [optional] |
|
|
271
271
|
| **q** | **String** | Filter results by using NOT, AND and OR operations on other filters | [optional] |
|
|
272
|
-
| **remote** | **String** |
|
|
272
|
+
| **remote** | **String** | | [optional] |
|
|
273
273
|
| **retain_repo_versions** | **Integer** | Filter results where retain_repo_versions matches value | [optional] |
|
|
274
274
|
| **retain_repo_versions__gt** | **Integer** | Filter results where retain_repo_versions is greater than value | [optional] |
|
|
275
275
|
| **retain_repo_versions__gte** | **Integer** | Filter results where retain_repo_versions is greater than or equal to value | [optional] |
|
|
@@ -374,11 +374,11 @@ end
|
|
|
374
374
|
|
|
375
375
|
## partial_update
|
|
376
376
|
|
|
377
|
-
> <
|
|
377
|
+
> <NpmNpmRepositoryResponse> partial_update(npm_npm_repository_href, patchednpm_npm_repository, opts)
|
|
378
378
|
|
|
379
379
|
Update a npm repository
|
|
380
380
|
|
|
381
|
-
|
|
381
|
+
Update the entity partially and trigger an asynchronous task if necessary
|
|
382
382
|
|
|
383
383
|
### Examples
|
|
384
384
|
|
|
@@ -412,7 +412,7 @@ end
|
|
|
412
412
|
|
|
413
413
|
This returns an Array which contains the response data, status code and headers.
|
|
414
414
|
|
|
415
|
-
> <Array(<
|
|
415
|
+
> <Array(<NpmNpmRepositoryResponse>, Integer, Hash)> partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts)
|
|
416
416
|
|
|
417
417
|
```ruby
|
|
418
418
|
begin
|
|
@@ -420,7 +420,7 @@ begin
|
|
|
420
420
|
data, status_code, headers = api_instance.partial_update_with_http_info(npm_npm_repository_href, patchednpm_npm_repository, opts)
|
|
421
421
|
p status_code # => 2xx
|
|
422
422
|
p headers # => { ... }
|
|
423
|
-
p data # => <
|
|
423
|
+
p data # => <NpmNpmRepositoryResponse>
|
|
424
424
|
rescue PulpNpmClient::ApiError => e
|
|
425
425
|
puts "Error when calling RepositoriesNpmApi->partial_update_with_http_info: #{e}"
|
|
426
426
|
end
|
|
@@ -436,7 +436,7 @@ end
|
|
|
436
436
|
|
|
437
437
|
### Return type
|
|
438
438
|
|
|
439
|
-
[**
|
|
439
|
+
[**NpmNpmRepositoryResponse**](NpmNpmRepositoryResponse.md)
|
|
440
440
|
|
|
441
441
|
### Authorization
|
|
442
442
|
|
|
@@ -454,7 +454,7 @@ end
|
|
|
454
454
|
|
|
455
455
|
Inspect a npm repository
|
|
456
456
|
|
|
457
|
-
A ViewSet for NpmRepository. Similar to the
|
|
457
|
+
A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
458
458
|
|
|
459
459
|
### Examples
|
|
460
460
|
|
|
@@ -756,11 +756,11 @@ end
|
|
|
756
756
|
|
|
757
757
|
## update
|
|
758
758
|
|
|
759
|
-
> <
|
|
759
|
+
> <NpmNpmRepositoryResponse> update(npm_npm_repository_href, npm_npm_repository, opts)
|
|
760
760
|
|
|
761
761
|
Update a npm repository
|
|
762
762
|
|
|
763
|
-
|
|
763
|
+
Update the entity and trigger an asynchronous task if necessary
|
|
764
764
|
|
|
765
765
|
### Examples
|
|
766
766
|
|
|
@@ -794,7 +794,7 @@ end
|
|
|
794
794
|
|
|
795
795
|
This returns an Array which contains the response data, status code and headers.
|
|
796
796
|
|
|
797
|
-
> <Array(<
|
|
797
|
+
> <Array(<NpmNpmRepositoryResponse>, Integer, Hash)> update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts)
|
|
798
798
|
|
|
799
799
|
```ruby
|
|
800
800
|
begin
|
|
@@ -802,7 +802,7 @@ begin
|
|
|
802
802
|
data, status_code, headers = api_instance.update_with_http_info(npm_npm_repository_href, npm_npm_repository, opts)
|
|
803
803
|
p status_code # => 2xx
|
|
804
804
|
p headers # => { ... }
|
|
805
|
-
p data # => <
|
|
805
|
+
p data # => <NpmNpmRepositoryResponse>
|
|
806
806
|
rescue PulpNpmClient::ApiError => e
|
|
807
807
|
puts "Error when calling RepositoriesNpmApi->update_with_http_info: #{e}"
|
|
808
808
|
end
|
|
@@ -818,7 +818,7 @@ end
|
|
|
818
818
|
|
|
819
819
|
### Return type
|
|
820
820
|
|
|
821
|
-
[**
|
|
821
|
+
[**NpmNpmRepositoryResponse**](NpmNpmRepositoryResponse.md)
|
|
822
822
|
|
|
823
823
|
### Authorization
|
|
824
824
|
|
|
@@ -20,68 +20,58 @@ module PulpNpmClient
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create a package
|
|
23
|
-
#
|
|
24
|
-
# @param relative_path [String]
|
|
25
|
-
# @param name [String]
|
|
26
|
-
# @param version [String]
|
|
23
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
27
24
|
# @param [Hash] opts the optional parameters
|
|
28
25
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
29
26
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
30
27
|
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
31
28
|
# @option opts [String] :artifact Artifact file representing the physical content
|
|
29
|
+
# @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version.
|
|
32
30
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
33
31
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
34
32
|
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
35
|
-
# @
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
34
|
+
# @option opts [String] :name The name of the npm package.
|
|
35
|
+
# @option opts [String] :version The version of the npm package.
|
|
36
|
+
# @return [AsyncOperationResponse]
|
|
37
|
+
def create(opts = {})
|
|
38
|
+
data, _status_code, _headers = create_with_http_info(opts)
|
|
38
39
|
data
|
|
39
40
|
end
|
|
40
41
|
|
|
41
42
|
# Create a package
|
|
42
|
-
#
|
|
43
|
-
# @param relative_path [String]
|
|
44
|
-
# @param name [String]
|
|
45
|
-
# @param version [String]
|
|
43
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
46
44
|
# @param [Hash] opts the optional parameters
|
|
47
45
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
48
46
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
49
47
|
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
50
48
|
# @option opts [String] :artifact Artifact file representing the physical content
|
|
49
|
+
# @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version.
|
|
51
50
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
52
51
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
53
52
|
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
54
|
-
# @
|
|
55
|
-
|
|
53
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
54
|
+
# @option opts [String] :name The name of the npm package.
|
|
55
|
+
# @option opts [String] :version The version of the npm package.
|
|
56
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
57
|
+
def create_with_http_info(opts = {})
|
|
56
58
|
if @api_client.config.debugging
|
|
57
59
|
@api_client.config.logger.debug 'Calling API: ContentPackagesApi.create ...'
|
|
58
60
|
end
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentPackagesApi.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 ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
61
|
+
if @api_client.config.client_side_validation && !opts[:'relative_path'].nil? && opts[:'relative_path'].to_s.length < 1
|
|
62
|
+
fail ArgumentError, 'invalid value for "opts[:"relative_path"]" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
65
63
|
end
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
fail ArgumentError, "Missing the required parameter 'name' when calling ContentPackagesApi.create"
|
|
70
|
-
end
|
|
71
|
-
if @api_client.config.client_side_validation && name.to_s.length < 1
|
|
72
|
-
fail ArgumentError, 'invalid value for "name" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
65
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
66
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
73
67
|
end
|
|
74
68
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
fail ArgumentError, "Missing the required parameter 'version' when calling ContentPackagesApi.create"
|
|
78
|
-
end
|
|
79
|
-
if @api_client.config.client_side_validation && version.to_s.length < 1
|
|
80
|
-
fail ArgumentError, 'invalid value for "version" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
69
|
+
if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length < 1
|
|
70
|
+
fail ArgumentError, 'invalid value for "opts[:"name"]" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
81
71
|
end
|
|
82
72
|
|
|
83
|
-
if @api_client.config.client_side_validation && !opts[:'
|
|
84
|
-
fail ArgumentError, 'invalid value for "opts[:"
|
|
73
|
+
if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'].to_s.length < 1
|
|
74
|
+
fail ArgumentError, 'invalid value for "opts[:"version"]" when calling ContentPackagesApi.create, the character length must be great than or equal to 1.'
|
|
85
75
|
end
|
|
86
76
|
|
|
87
77
|
# resource path
|
|
@@ -103,21 +93,22 @@ module PulpNpmClient
|
|
|
103
93
|
|
|
104
94
|
# form parameters
|
|
105
95
|
form_params = opts[:form_params] || {}
|
|
106
|
-
form_params['relative_path'] = relative_path
|
|
107
|
-
form_params['name'] = name
|
|
108
|
-
form_params['version'] = version
|
|
109
96
|
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
|
110
97
|
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
111
98
|
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
99
|
+
form_params['relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
|
|
112
100
|
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
113
101
|
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
114
102
|
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
103
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
104
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
105
|
+
form_params['version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
115
106
|
|
|
116
107
|
# http body (model)
|
|
117
108
|
post_body = opts[:debug_body]
|
|
118
109
|
|
|
119
110
|
# return_type
|
|
120
|
-
return_type = opts[:debug_return_type] || '
|
|
111
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
121
112
|
|
|
122
113
|
# auth_names
|
|
123
114
|
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
@@ -140,7 +131,7 @@ module PulpNpmClient
|
|
|
140
131
|
end
|
|
141
132
|
|
|
142
133
|
# List packages
|
|
143
|
-
# A ViewSet for
|
|
134
|
+
# A ViewSet for NpmPackage. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/npm/packages/ Also specify queryset and serializer for NpmPackage.
|
|
144
135
|
# @param [Hash] opts the optional parameters
|
|
145
136
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
146
137
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
@@ -154,9 +145,9 @@ module PulpNpmClient
|
|
|
154
145
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
155
146
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
156
147
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
157
|
-
# @option opts [String] :repository_version
|
|
158
|
-
# @option opts [String] :repository_version_added
|
|
159
|
-
# @option opts [String] :repository_version_removed
|
|
148
|
+
# @option opts [String] :repository_version
|
|
149
|
+
# @option opts [String] :repository_version_added
|
|
150
|
+
# @option opts [String] :repository_version_removed
|
|
160
151
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
161
152
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
162
153
|
# @return [PaginatednpmPackageResponseList]
|
|
@@ -166,7 +157,7 @@ module PulpNpmClient
|
|
|
166
157
|
end
|
|
167
158
|
|
|
168
159
|
# List packages
|
|
169
|
-
# A ViewSet for
|
|
160
|
+
# A ViewSet for NpmPackage. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/npm/packages/ Also specify queryset and serializer for NpmPackage.
|
|
170
161
|
# @param [Hash] opts the optional parameters
|
|
171
162
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
172
163
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
@@ -180,9 +171,9 @@ module PulpNpmClient
|
|
|
180
171
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
181
172
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
182
173
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
183
|
-
# @option opts [String] :repository_version
|
|
184
|
-
# @option opts [String] :repository_version_added
|
|
185
|
-
# @option opts [String] :repository_version_removed
|
|
174
|
+
# @option opts [String] :repository_version
|
|
175
|
+
# @option opts [String] :repository_version_added
|
|
176
|
+
# @option opts [String] :repository_version_removed
|
|
186
177
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
187
178
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
188
179
|
# @return [Array<(PaginatednpmPackageResponseList, Integer, Hash)>] PaginatednpmPackageResponseList data, response status code and response headers
|
|
@@ -252,7 +243,7 @@ module PulpNpmClient
|
|
|
252
243
|
end
|
|
253
244
|
|
|
254
245
|
# Inspect a package
|
|
255
|
-
# A ViewSet for
|
|
246
|
+
# A ViewSet for NpmPackage. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/npm/packages/ Also specify queryset and serializer for NpmPackage.
|
|
256
247
|
# @param npm_package_href [String]
|
|
257
248
|
# @param [Hash] opts the optional parameters
|
|
258
249
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -265,7 +256,7 @@ module PulpNpmClient
|
|
|
265
256
|
end
|
|
266
257
|
|
|
267
258
|
# Inspect a package
|
|
268
|
-
# A ViewSet for
|
|
259
|
+
# A ViewSet for NpmPackage. Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/npm/packages/ Also specify queryset and serializer for NpmPackage.
|
|
269
260
|
# @param npm_package_href [String]
|
|
270
261
|
# @param [Hash] opts the optional parameters
|
|
271
262
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -476,5 +467,113 @@ module PulpNpmClient
|
|
|
476
467
|
end
|
|
477
468
|
return data, status_code, headers
|
|
478
469
|
end
|
|
470
|
+
|
|
471
|
+
# Synchronous npm package upload
|
|
472
|
+
# Create an npm package content unit synchronously.
|
|
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 [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
476
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
477
|
+
# @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version.
|
|
478
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
479
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
480
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
481
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
482
|
+
# @option opts [String] :name The name of the npm package.
|
|
483
|
+
# @option opts [String] :version The version of the npm package.
|
|
484
|
+
# @return [NpmPackageResponse]
|
|
485
|
+
def upload(opts = {})
|
|
486
|
+
data, _status_code, _headers = upload_with_http_info(opts)
|
|
487
|
+
data
|
|
488
|
+
end
|
|
489
|
+
|
|
490
|
+
# Synchronous npm package upload
|
|
491
|
+
# Create an npm package content unit synchronously.
|
|
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 [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
495
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
496
|
+
# @option opts [String] :relative_path Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version.
|
|
497
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
498
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
499
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
500
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
501
|
+
# @option opts [String] :name The name of the npm package.
|
|
502
|
+
# @option opts [String] :version The version of the npm package.
|
|
503
|
+
# @return [Array<(NpmPackageResponse, Integer, Hash)>] NpmPackageResponse data, response status code and response headers
|
|
504
|
+
def upload_with_http_info(opts = {})
|
|
505
|
+
if @api_client.config.debugging
|
|
506
|
+
@api_client.config.logger.debug 'Calling API: ContentPackagesApi.upload ...'
|
|
507
|
+
end
|
|
508
|
+
if @api_client.config.client_side_validation && !opts[:'relative_path'].nil? && opts[:'relative_path'].to_s.length < 1
|
|
509
|
+
fail ArgumentError, 'invalid value for "opts[:"relative_path"]" when calling ContentPackagesApi.upload, the character length must be great than or equal to 1.'
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
if @api_client.config.client_side_validation && !opts[:'file_url'].nil? && opts[:'file_url'].to_s.length < 1
|
|
513
|
+
fail ArgumentError, 'invalid value for "opts[:"file_url"]" when calling ContentPackagesApi.upload, the character length must be great than or equal to 1.'
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
if @api_client.config.client_side_validation && !opts[:'name'].nil? && opts[:'name'].to_s.length < 1
|
|
517
|
+
fail ArgumentError, 'invalid value for "opts[:"name"]" when calling ContentPackagesApi.upload, the character length must be great than or equal to 1.'
|
|
518
|
+
end
|
|
519
|
+
|
|
520
|
+
if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'].to_s.length < 1
|
|
521
|
+
fail ArgumentError, 'invalid value for "opts[:"version"]" when calling ContentPackagesApi.upload, the character length must be great than or equal to 1.'
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
# resource path
|
|
525
|
+
local_var_path = '/pulp/api/v3/content/npm/packages/upload/'
|
|
526
|
+
|
|
527
|
+
# query parameters
|
|
528
|
+
query_params = opts[:query_params] || {}
|
|
529
|
+
|
|
530
|
+
# header parameters
|
|
531
|
+
header_params = opts[:header_params] || {}
|
|
532
|
+
# HTTP header 'Accept' (if needed)
|
|
533
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
534
|
+
# HTTP header 'Content-Type'
|
|
535
|
+
content_type = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
536
|
+
if !content_type.nil?
|
|
537
|
+
header_params['Content-Type'] = content_type
|
|
538
|
+
end
|
|
539
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
540
|
+
|
|
541
|
+
# form parameters
|
|
542
|
+
form_params = opts[:form_params] || {}
|
|
543
|
+
form_params['pulp_labels'] = opts[:'pulp_labels'] if !opts[:'pulp_labels'].nil?
|
|
544
|
+
form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
|
|
545
|
+
form_params['relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
|
|
546
|
+
form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
|
|
547
|
+
form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
|
|
548
|
+
form_params['file_url'] = opts[:'file_url'] if !opts[:'file_url'].nil?
|
|
549
|
+
form_params['downloader_config'] = opts[:'downloader_config'] if !opts[:'downloader_config'].nil?
|
|
550
|
+
form_params['name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
551
|
+
form_params['version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
552
|
+
|
|
553
|
+
# http body (model)
|
|
554
|
+
post_body = opts[:debug_body]
|
|
555
|
+
|
|
556
|
+
# return_type
|
|
557
|
+
return_type = opts[:debug_return_type] || 'NpmPackageResponse'
|
|
558
|
+
|
|
559
|
+
# auth_names
|
|
560
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
561
|
+
|
|
562
|
+
new_options = opts.merge(
|
|
563
|
+
:operation => :"ContentPackagesApi.upload",
|
|
564
|
+
:header_params => header_params,
|
|
565
|
+
:query_params => query_params,
|
|
566
|
+
:form_params => form_params,
|
|
567
|
+
:body => post_body,
|
|
568
|
+
:auth_names => auth_names,
|
|
569
|
+
:return_type => return_type
|
|
570
|
+
)
|
|
571
|
+
|
|
572
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
573
|
+
if @api_client.config.debugging
|
|
574
|
+
@api_client.config.logger.debug "API called: ContentPackagesApi#upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
575
|
+
end
|
|
576
|
+
return data, status_code, headers
|
|
577
|
+
end
|
|
479
578
|
end
|
|
480
579
|
end
|