pulp_npm_client 0.5.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 +4 -4
- 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 +3 -3
- data/docs/RepositoriesNpmApi.md +5 -5
- data/lib/pulp_npm_client/api/content_packages_api.rb +146 -47
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +4 -4
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +6 -6
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +8 -8
- 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 +2 -2
- data/spec/api/remotes_npm_api_spec.rb +3 -3
- data/spec/api/repositories_npm_api_spec.rb +4 -4
- 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 +30 -22
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module PulpNpmClient
|
|
17
|
-
# A Serializer for NpmRemote. Add any new fields if defined on NpmRemote. Similar to the example above, in
|
|
17
|
+
# A Serializer for NpmRemote. Add any new fields if defined on NpmRemote. Similar to the example above, in NpmPackageSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = core_serializers.RemoteSerializer.Meta.validators + [myValidator1, ...] By default the 'policy' field in core_serializers.RemoteSerializer only validates the choice 'immediate'. To add on-demand support for more 'policy' options, e.g. 'streamed' or 'on_demand', re-define the 'policy' option as follows::
|
|
18
18
|
class PatchednpmNpmRemote
|
|
19
19
|
# A unique name for this remote.
|
|
20
20
|
attr_accessor :name
|
|
@@ -22,6 +22,11 @@ module PulpNpmClient
|
|
|
22
22
|
# The URL of an external content source.
|
|
23
23
|
attr_accessor :url
|
|
24
24
|
|
|
25
|
+
attr_accessor :pulp_labels
|
|
26
|
+
|
|
27
|
+
# The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
28
|
+
attr_accessor :policy
|
|
29
|
+
|
|
25
30
|
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
|
26
31
|
attr_accessor :ca_cert
|
|
27
32
|
|
|
@@ -49,17 +54,9 @@ module PulpNpmClient
|
|
|
49
54
|
# The password to be used for authentication when syncing. Extra leading and trailing whitespace characters are not trimmed.
|
|
50
55
|
attr_accessor :password
|
|
51
56
|
|
|
52
|
-
attr_accessor :pulp_labels
|
|
53
|
-
|
|
54
|
-
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
55
|
-
attr_accessor :download_concurrency
|
|
56
|
-
|
|
57
57
|
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
|
58
58
|
attr_accessor :max_retries
|
|
59
59
|
|
|
60
|
-
# The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. * `immediate` - When syncing, download all metadata and content now. * `on_demand` - When syncing, download metadata, but do not download content now. Instead, download content as clients request it, and save it in Pulp to be served for future client requests. * `streamed` - When syncing, download metadata, but do not download content now. Instead,download content as clients request it, but never save it in Pulp. This causes future requests for that same content to have to be downloaded again.
|
|
61
|
-
attr_accessor :policy
|
|
62
|
-
|
|
63
60
|
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
64
61
|
attr_accessor :total_timeout
|
|
65
62
|
|
|
@@ -75,6 +72,9 @@ module PulpNpmClient
|
|
|
75
72
|
# Headers for aiohttp.Clientsession
|
|
76
73
|
attr_accessor :headers
|
|
77
74
|
|
|
75
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
76
|
+
attr_accessor :download_concurrency
|
|
77
|
+
|
|
78
78
|
# Limits requests per second for each concurrent downloader
|
|
79
79
|
attr_accessor :rate_limit
|
|
80
80
|
|
|
@@ -105,6 +105,8 @@ module PulpNpmClient
|
|
|
105
105
|
{
|
|
106
106
|
:'name' => :'name',
|
|
107
107
|
:'url' => :'url',
|
|
108
|
+
:'pulp_labels' => :'pulp_labels',
|
|
109
|
+
:'policy' => :'policy',
|
|
108
110
|
:'ca_cert' => :'ca_cert',
|
|
109
111
|
:'client_cert' => :'client_cert',
|
|
110
112
|
:'client_key' => :'client_key',
|
|
@@ -114,15 +116,13 @@ module PulpNpmClient
|
|
|
114
116
|
:'proxy_password' => :'proxy_password',
|
|
115
117
|
:'username' => :'username',
|
|
116
118
|
:'password' => :'password',
|
|
117
|
-
:'pulp_labels' => :'pulp_labels',
|
|
118
|
-
:'download_concurrency' => :'download_concurrency',
|
|
119
119
|
:'max_retries' => :'max_retries',
|
|
120
|
-
:'policy' => :'policy',
|
|
121
120
|
:'total_timeout' => :'total_timeout',
|
|
122
121
|
:'connect_timeout' => :'connect_timeout',
|
|
123
122
|
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
124
123
|
:'sock_read_timeout' => :'sock_read_timeout',
|
|
125
124
|
:'headers' => :'headers',
|
|
125
|
+
:'download_concurrency' => :'download_concurrency',
|
|
126
126
|
:'rate_limit' => :'rate_limit'
|
|
127
127
|
}
|
|
128
128
|
end
|
|
@@ -137,6 +137,8 @@ module PulpNpmClient
|
|
|
137
137
|
{
|
|
138
138
|
:'name' => :'String',
|
|
139
139
|
:'url' => :'String',
|
|
140
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
141
|
+
:'policy' => :'PolicyEnum',
|
|
140
142
|
:'ca_cert' => :'String',
|
|
141
143
|
:'client_cert' => :'String',
|
|
142
144
|
:'client_key' => :'String',
|
|
@@ -146,15 +148,13 @@ module PulpNpmClient
|
|
|
146
148
|
:'proxy_password' => :'String',
|
|
147
149
|
:'username' => :'String',
|
|
148
150
|
:'password' => :'String',
|
|
149
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
150
|
-
:'download_concurrency' => :'Integer',
|
|
151
151
|
:'max_retries' => :'Integer',
|
|
152
|
-
:'policy' => :'PolicyEnum',
|
|
153
152
|
:'total_timeout' => :'Float',
|
|
154
153
|
:'connect_timeout' => :'Float',
|
|
155
154
|
:'sock_connect_timeout' => :'Float',
|
|
156
155
|
:'sock_read_timeout' => :'Float',
|
|
157
156
|
:'headers' => :'Array<Object>',
|
|
157
|
+
:'download_concurrency' => :'Integer',
|
|
158
158
|
:'rate_limit' => :'Integer'
|
|
159
159
|
}
|
|
160
160
|
end
|
|
@@ -170,12 +170,12 @@ module PulpNpmClient
|
|
|
170
170
|
:'proxy_password',
|
|
171
171
|
:'username',
|
|
172
172
|
:'password',
|
|
173
|
-
:'download_concurrency',
|
|
174
173
|
:'max_retries',
|
|
175
174
|
:'total_timeout',
|
|
176
175
|
:'connect_timeout',
|
|
177
176
|
:'sock_connect_timeout',
|
|
178
177
|
:'sock_read_timeout',
|
|
178
|
+
:'download_concurrency',
|
|
179
179
|
:'rate_limit'
|
|
180
180
|
])
|
|
181
181
|
end
|
|
@@ -203,6 +203,16 @@ module PulpNpmClient
|
|
|
203
203
|
self.url = attributes[:'url']
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
+
if attributes.key?(:'pulp_labels')
|
|
207
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
208
|
+
self.pulp_labels = value
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'policy')
|
|
213
|
+
self.policy = attributes[:'policy']
|
|
214
|
+
end
|
|
215
|
+
|
|
206
216
|
if attributes.key?(:'ca_cert')
|
|
207
217
|
self.ca_cert = attributes[:'ca_cert']
|
|
208
218
|
end
|
|
@@ -239,24 +249,10 @@ module PulpNpmClient
|
|
|
239
249
|
self.password = attributes[:'password']
|
|
240
250
|
end
|
|
241
251
|
|
|
242
|
-
if attributes.key?(:'pulp_labels')
|
|
243
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
244
|
-
self.pulp_labels = value
|
|
245
|
-
end
|
|
246
|
-
end
|
|
247
|
-
|
|
248
|
-
if attributes.key?(:'download_concurrency')
|
|
249
|
-
self.download_concurrency = attributes[:'download_concurrency']
|
|
250
|
-
end
|
|
251
|
-
|
|
252
252
|
if attributes.key?(:'max_retries')
|
|
253
253
|
self.max_retries = attributes[:'max_retries']
|
|
254
254
|
end
|
|
255
255
|
|
|
256
|
-
if attributes.key?(:'policy')
|
|
257
|
-
self.policy = attributes[:'policy']
|
|
258
|
-
end
|
|
259
|
-
|
|
260
256
|
if attributes.key?(:'total_timeout')
|
|
261
257
|
self.total_timeout = attributes[:'total_timeout']
|
|
262
258
|
end
|
|
@@ -279,6 +275,10 @@ module PulpNpmClient
|
|
|
279
275
|
end
|
|
280
276
|
end
|
|
281
277
|
|
|
278
|
+
if attributes.key?(:'download_concurrency')
|
|
279
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
280
|
+
end
|
|
281
|
+
|
|
282
282
|
if attributes.key?(:'rate_limit')
|
|
283
283
|
self.rate_limit = attributes[:'rate_limit']
|
|
284
284
|
end
|
|
@@ -524,6 +524,8 @@ module PulpNpmClient
|
|
|
524
524
|
self.class == o.class &&
|
|
525
525
|
name == o.name &&
|
|
526
526
|
url == o.url &&
|
|
527
|
+
pulp_labels == o.pulp_labels &&
|
|
528
|
+
policy == o.policy &&
|
|
527
529
|
ca_cert == o.ca_cert &&
|
|
528
530
|
client_cert == o.client_cert &&
|
|
529
531
|
client_key == o.client_key &&
|
|
@@ -533,15 +535,13 @@ module PulpNpmClient
|
|
|
533
535
|
proxy_password == o.proxy_password &&
|
|
534
536
|
username == o.username &&
|
|
535
537
|
password == o.password &&
|
|
536
|
-
pulp_labels == o.pulp_labels &&
|
|
537
|
-
download_concurrency == o.download_concurrency &&
|
|
538
538
|
max_retries == o.max_retries &&
|
|
539
|
-
policy == o.policy &&
|
|
540
539
|
total_timeout == o.total_timeout &&
|
|
541
540
|
connect_timeout == o.connect_timeout &&
|
|
542
541
|
sock_connect_timeout == o.sock_connect_timeout &&
|
|
543
542
|
sock_read_timeout == o.sock_read_timeout &&
|
|
544
543
|
headers == o.headers &&
|
|
544
|
+
download_concurrency == o.download_concurrency &&
|
|
545
545
|
rate_limit == o.rate_limit
|
|
546
546
|
end
|
|
547
547
|
|
|
@@ -554,7 +554,7 @@ module PulpNpmClient
|
|
|
554
554
|
# Calculates hash code according to all attributes.
|
|
555
555
|
# @return [Integer] Hash code
|
|
556
556
|
def hash
|
|
557
|
-
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password,
|
|
557
|
+
[name, url, pulp_labels, policy, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, max_retries, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, download_concurrency, rate_limit].hash
|
|
558
558
|
end
|
|
559
559
|
|
|
560
560
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module PulpNpmClient
|
|
17
|
-
# A Serializer for NpmRepository. Add any new fields if defined on NpmRepository. Similar to the example above, in
|
|
17
|
+
# A Serializer for NpmRepository. Add any new fields if defined on NpmRepository. Similar to the example above, in NpmPackageSerializer. Additional validators can be added to the parent validators list For example:: class Meta: validators = core_serializers.RepositorySerializer.Meta.validators + [myValidator1, ...]
|
|
18
18
|
class PatchednpmNpmRepository
|
|
19
19
|
attr_accessor :pulp_labels
|
|
20
20
|
|