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 NpmNpmRemote
|
|
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
|
|
@@ -207,6 +207,16 @@ module PulpNpmClient
|
|
|
207
207
|
self.url = nil
|
|
208
208
|
end
|
|
209
209
|
|
|
210
|
+
if attributes.key?(:'pulp_labels')
|
|
211
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
212
|
+
self.pulp_labels = value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'policy')
|
|
217
|
+
self.policy = attributes[:'policy']
|
|
218
|
+
end
|
|
219
|
+
|
|
210
220
|
if attributes.key?(:'ca_cert')
|
|
211
221
|
self.ca_cert = attributes[:'ca_cert']
|
|
212
222
|
end
|
|
@@ -243,24 +253,10 @@ module PulpNpmClient
|
|
|
243
253
|
self.password = attributes[:'password']
|
|
244
254
|
end
|
|
245
255
|
|
|
246
|
-
if attributes.key?(:'pulp_labels')
|
|
247
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
248
|
-
self.pulp_labels = value
|
|
249
|
-
end
|
|
250
|
-
end
|
|
251
|
-
|
|
252
|
-
if attributes.key?(:'download_concurrency')
|
|
253
|
-
self.download_concurrency = attributes[:'download_concurrency']
|
|
254
|
-
end
|
|
255
|
-
|
|
256
256
|
if attributes.key?(:'max_retries')
|
|
257
257
|
self.max_retries = attributes[:'max_retries']
|
|
258
258
|
end
|
|
259
259
|
|
|
260
|
-
if attributes.key?(:'policy')
|
|
261
|
-
self.policy = attributes[:'policy']
|
|
262
|
-
end
|
|
263
|
-
|
|
264
260
|
if attributes.key?(:'total_timeout')
|
|
265
261
|
self.total_timeout = attributes[:'total_timeout']
|
|
266
262
|
end
|
|
@@ -283,6 +279,10 @@ module PulpNpmClient
|
|
|
283
279
|
end
|
|
284
280
|
end
|
|
285
281
|
|
|
282
|
+
if attributes.key?(:'download_concurrency')
|
|
283
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
284
|
+
end
|
|
285
|
+
|
|
286
286
|
if attributes.key?(:'rate_limit')
|
|
287
287
|
self.rate_limit = attributes[:'rate_limit']
|
|
288
288
|
end
|
|
@@ -538,6 +538,8 @@ module PulpNpmClient
|
|
|
538
538
|
self.class == o.class &&
|
|
539
539
|
name == o.name &&
|
|
540
540
|
url == o.url &&
|
|
541
|
+
pulp_labels == o.pulp_labels &&
|
|
542
|
+
policy == o.policy &&
|
|
541
543
|
ca_cert == o.ca_cert &&
|
|
542
544
|
client_cert == o.client_cert &&
|
|
543
545
|
client_key == o.client_key &&
|
|
@@ -547,15 +549,13 @@ module PulpNpmClient
|
|
|
547
549
|
proxy_password == o.proxy_password &&
|
|
548
550
|
username == o.username &&
|
|
549
551
|
password == o.password &&
|
|
550
|
-
pulp_labels == o.pulp_labels &&
|
|
551
|
-
download_concurrency == o.download_concurrency &&
|
|
552
552
|
max_retries == o.max_retries &&
|
|
553
|
-
policy == o.policy &&
|
|
554
553
|
total_timeout == o.total_timeout &&
|
|
555
554
|
connect_timeout == o.connect_timeout &&
|
|
556
555
|
sock_connect_timeout == o.sock_connect_timeout &&
|
|
557
556
|
sock_read_timeout == o.sock_read_timeout &&
|
|
558
557
|
headers == o.headers &&
|
|
558
|
+
download_concurrency == o.download_concurrency &&
|
|
559
559
|
rate_limit == o.rate_limit
|
|
560
560
|
end
|
|
561
561
|
|
|
@@ -568,7 +568,7 @@ module PulpNpmClient
|
|
|
568
568
|
# Calculates hash code according to all attributes.
|
|
569
569
|
# @return [Integer] Hash code
|
|
570
570
|
def hash
|
|
571
|
-
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password,
|
|
571
|
+
[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
|
|
572
572
|
end
|
|
573
573
|
|
|
574
574
|
# 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 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 NpmNpmRemoteResponse
|
|
19
19
|
attr_accessor :pulp_href
|
|
20
20
|
|
|
@@ -33,6 +33,14 @@ module PulpNpmClient
|
|
|
33
33
|
# The URL of an external content source.
|
|
34
34
|
attr_accessor :url
|
|
35
35
|
|
|
36
|
+
attr_accessor :pulp_labels
|
|
37
|
+
|
|
38
|
+
# 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.
|
|
39
|
+
attr_accessor :policy
|
|
40
|
+
|
|
41
|
+
# List of hidden (write only) fields
|
|
42
|
+
attr_accessor :hidden_fields
|
|
43
|
+
|
|
36
44
|
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
|
37
45
|
attr_accessor :ca_cert
|
|
38
46
|
|
|
@@ -45,17 +53,9 @@ module PulpNpmClient
|
|
|
45
53
|
# The proxy URL. Format: scheme://host:port
|
|
46
54
|
attr_accessor :proxy_url
|
|
47
55
|
|
|
48
|
-
attr_accessor :pulp_labels
|
|
49
|
-
|
|
50
|
-
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
51
|
-
attr_accessor :download_concurrency
|
|
52
|
-
|
|
53
56
|
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
|
54
57
|
attr_accessor :max_retries
|
|
55
58
|
|
|
56
|
-
# 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.
|
|
57
|
-
attr_accessor :policy
|
|
58
|
-
|
|
59
59
|
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
60
60
|
attr_accessor :total_timeout
|
|
61
61
|
|
|
@@ -71,12 +71,12 @@ module PulpNpmClient
|
|
|
71
71
|
# Headers for aiohttp.Clientsession
|
|
72
72
|
attr_accessor :headers
|
|
73
73
|
|
|
74
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
75
|
+
attr_accessor :download_concurrency
|
|
76
|
+
|
|
74
77
|
# Limits requests per second for each concurrent downloader
|
|
75
78
|
attr_accessor :rate_limit
|
|
76
79
|
|
|
77
|
-
# List of hidden (write only) fields
|
|
78
|
-
attr_accessor :hidden_fields
|
|
79
|
-
|
|
80
80
|
class EnumAttributeValidator
|
|
81
81
|
attr_reader :datatype
|
|
82
82
|
attr_reader :allowable_values
|
|
@@ -108,21 +108,21 @@ module PulpNpmClient
|
|
|
108
108
|
:'pulp_last_updated' => :'pulp_last_updated',
|
|
109
109
|
:'name' => :'name',
|
|
110
110
|
:'url' => :'url',
|
|
111
|
+
:'pulp_labels' => :'pulp_labels',
|
|
112
|
+
:'policy' => :'policy',
|
|
113
|
+
:'hidden_fields' => :'hidden_fields',
|
|
111
114
|
:'ca_cert' => :'ca_cert',
|
|
112
115
|
:'client_cert' => :'client_cert',
|
|
113
116
|
:'tls_validation' => :'tls_validation',
|
|
114
117
|
:'proxy_url' => :'proxy_url',
|
|
115
|
-
:'pulp_labels' => :'pulp_labels',
|
|
116
|
-
:'download_concurrency' => :'download_concurrency',
|
|
117
118
|
:'max_retries' => :'max_retries',
|
|
118
|
-
:'policy' => :'policy',
|
|
119
119
|
:'total_timeout' => :'total_timeout',
|
|
120
120
|
:'connect_timeout' => :'connect_timeout',
|
|
121
121
|
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
122
122
|
:'sock_read_timeout' => :'sock_read_timeout',
|
|
123
123
|
:'headers' => :'headers',
|
|
124
|
-
:'
|
|
125
|
-
:'
|
|
124
|
+
:'download_concurrency' => :'download_concurrency',
|
|
125
|
+
:'rate_limit' => :'rate_limit'
|
|
126
126
|
}
|
|
127
127
|
end
|
|
128
128
|
|
|
@@ -140,21 +140,21 @@ module PulpNpmClient
|
|
|
140
140
|
:'pulp_last_updated' => :'Time',
|
|
141
141
|
:'name' => :'String',
|
|
142
142
|
:'url' => :'String',
|
|
143
|
+
:'pulp_labels' => :'Hash<String, String>',
|
|
144
|
+
:'policy' => :'PolicyEnum',
|
|
145
|
+
:'hidden_fields' => :'Array<NpmNpmRemoteResponseHiddenFieldsInner>',
|
|
143
146
|
:'ca_cert' => :'String',
|
|
144
147
|
:'client_cert' => :'String',
|
|
145
148
|
:'tls_validation' => :'Boolean',
|
|
146
149
|
:'proxy_url' => :'String',
|
|
147
|
-
:'pulp_labels' => :'Hash<String, String>',
|
|
148
|
-
:'download_concurrency' => :'Integer',
|
|
149
150
|
:'max_retries' => :'Integer',
|
|
150
|
-
:'policy' => :'PolicyEnum',
|
|
151
151
|
:'total_timeout' => :'Float',
|
|
152
152
|
:'connect_timeout' => :'Float',
|
|
153
153
|
:'sock_connect_timeout' => :'Float',
|
|
154
154
|
:'sock_read_timeout' => :'Float',
|
|
155
155
|
:'headers' => :'Array<Object>',
|
|
156
|
-
:'
|
|
157
|
-
:'
|
|
156
|
+
:'download_concurrency' => :'Integer',
|
|
157
|
+
:'rate_limit' => :'Integer'
|
|
158
158
|
}
|
|
159
159
|
end
|
|
160
160
|
|
|
@@ -164,13 +164,13 @@ module PulpNpmClient
|
|
|
164
164
|
:'ca_cert',
|
|
165
165
|
:'client_cert',
|
|
166
166
|
:'proxy_url',
|
|
167
|
-
:'download_concurrency',
|
|
168
167
|
:'max_retries',
|
|
169
168
|
:'total_timeout',
|
|
170
169
|
:'connect_timeout',
|
|
171
170
|
:'sock_connect_timeout',
|
|
172
171
|
:'sock_read_timeout',
|
|
173
|
-
:'
|
|
172
|
+
:'download_concurrency',
|
|
173
|
+
:'rate_limit'
|
|
174
174
|
])
|
|
175
175
|
end
|
|
176
176
|
|
|
@@ -217,6 +217,22 @@ module PulpNpmClient
|
|
|
217
217
|
self.url = nil
|
|
218
218
|
end
|
|
219
219
|
|
|
220
|
+
if attributes.key?(:'pulp_labels')
|
|
221
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
222
|
+
self.pulp_labels = value
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if attributes.key?(:'policy')
|
|
227
|
+
self.policy = attributes[:'policy']
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if attributes.key?(:'hidden_fields')
|
|
231
|
+
if (value = attributes[:'hidden_fields']).is_a?(Array)
|
|
232
|
+
self.hidden_fields = value
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
220
236
|
if attributes.key?(:'ca_cert')
|
|
221
237
|
self.ca_cert = attributes[:'ca_cert']
|
|
222
238
|
end
|
|
@@ -233,24 +249,10 @@ module PulpNpmClient
|
|
|
233
249
|
self.proxy_url = attributes[:'proxy_url']
|
|
234
250
|
end
|
|
235
251
|
|
|
236
|
-
if attributes.key?(:'pulp_labels')
|
|
237
|
-
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
|
238
|
-
self.pulp_labels = value
|
|
239
|
-
end
|
|
240
|
-
end
|
|
241
|
-
|
|
242
|
-
if attributes.key?(:'download_concurrency')
|
|
243
|
-
self.download_concurrency = attributes[:'download_concurrency']
|
|
244
|
-
end
|
|
245
|
-
|
|
246
252
|
if attributes.key?(:'max_retries')
|
|
247
253
|
self.max_retries = attributes[:'max_retries']
|
|
248
254
|
end
|
|
249
255
|
|
|
250
|
-
if attributes.key?(:'policy')
|
|
251
|
-
self.policy = attributes[:'policy']
|
|
252
|
-
end
|
|
253
|
-
|
|
254
256
|
if attributes.key?(:'total_timeout')
|
|
255
257
|
self.total_timeout = attributes[:'total_timeout']
|
|
256
258
|
end
|
|
@@ -273,14 +275,12 @@ module PulpNpmClient
|
|
|
273
275
|
end
|
|
274
276
|
end
|
|
275
277
|
|
|
276
|
-
if attributes.key?(:'
|
|
277
|
-
self.
|
|
278
|
+
if attributes.key?(:'download_concurrency')
|
|
279
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
278
280
|
end
|
|
279
281
|
|
|
280
|
-
if attributes.key?(:'
|
|
281
|
-
|
|
282
|
-
self.hidden_fields = value
|
|
283
|
-
end
|
|
282
|
+
if attributes.key?(:'rate_limit')
|
|
283
|
+
self.rate_limit = attributes[:'rate_limit']
|
|
284
284
|
end
|
|
285
285
|
end
|
|
286
286
|
|
|
@@ -380,21 +380,21 @@ module PulpNpmClient
|
|
|
380
380
|
pulp_last_updated == o.pulp_last_updated &&
|
|
381
381
|
name == o.name &&
|
|
382
382
|
url == o.url &&
|
|
383
|
+
pulp_labels == o.pulp_labels &&
|
|
384
|
+
policy == o.policy &&
|
|
385
|
+
hidden_fields == o.hidden_fields &&
|
|
383
386
|
ca_cert == o.ca_cert &&
|
|
384
387
|
client_cert == o.client_cert &&
|
|
385
388
|
tls_validation == o.tls_validation &&
|
|
386
389
|
proxy_url == o.proxy_url &&
|
|
387
|
-
pulp_labels == o.pulp_labels &&
|
|
388
|
-
download_concurrency == o.download_concurrency &&
|
|
389
390
|
max_retries == o.max_retries &&
|
|
390
|
-
policy == o.policy &&
|
|
391
391
|
total_timeout == o.total_timeout &&
|
|
392
392
|
connect_timeout == o.connect_timeout &&
|
|
393
393
|
sock_connect_timeout == o.sock_connect_timeout &&
|
|
394
394
|
sock_read_timeout == o.sock_read_timeout &&
|
|
395
395
|
headers == o.headers &&
|
|
396
|
-
|
|
397
|
-
|
|
396
|
+
download_concurrency == o.download_concurrency &&
|
|
397
|
+
rate_limit == o.rate_limit
|
|
398
398
|
end
|
|
399
399
|
|
|
400
400
|
# @see the `==` method
|
|
@@ -406,7 +406,7 @@ module PulpNpmClient
|
|
|
406
406
|
# Calculates hash code according to all attributes.
|
|
407
407
|
# @return [Integer] Hash code
|
|
408
408
|
def hash
|
|
409
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, name, url,
|
|
409
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, name, url, pulp_labels, policy, hidden_fields, ca_cert, client_cert, tls_validation, proxy_url, max_retries, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, download_concurrency, rate_limit].hash
|
|
410
410
|
end
|
|
411
411
|
|
|
412
412
|
# 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 NpmNpmRepository
|
|
19
19
|
attr_accessor :pulp_labels
|
|
20
20
|
|
|
@@ -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 NpmNpmRepositoryResponse
|
|
19
19
|
attr_accessor :pulp_href
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module PulpNpmClient
|
|
17
|
-
# A Serializer for
|
|
17
|
+
# A Serializer for NpmPackage.
|
|
18
18
|
class NpmPackageResponse
|
|
19
19
|
attr_accessor :pulp_href
|
|
20
20
|
|
|
@@ -35,10 +35,13 @@ module PulpNpmClient
|
|
|
35
35
|
# Artifact file representing the physical content
|
|
36
36
|
attr_accessor :artifact
|
|
37
37
|
|
|
38
|
+
# Path where the artifact is located relative to distributions base_path. If not provided, it will be computed from name and version.
|
|
38
39
|
attr_accessor :relative_path
|
|
39
40
|
|
|
41
|
+
# The name of the npm package.
|
|
40
42
|
attr_accessor :name
|
|
41
43
|
|
|
44
|
+
# The version of the npm package.
|
|
42
45
|
attr_accessor :version
|
|
43
46
|
|
|
44
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -131,20 +134,14 @@ module PulpNpmClient
|
|
|
131
134
|
|
|
132
135
|
if attributes.key?(:'relative_path')
|
|
133
136
|
self.relative_path = attributes[:'relative_path']
|
|
134
|
-
else
|
|
135
|
-
self.relative_path = nil
|
|
136
137
|
end
|
|
137
138
|
|
|
138
139
|
if attributes.key?(:'name')
|
|
139
140
|
self.name = attributes[:'name']
|
|
140
|
-
else
|
|
141
|
-
self.name = nil
|
|
142
141
|
end
|
|
143
142
|
|
|
144
143
|
if attributes.key?(:'version')
|
|
145
144
|
self.version = attributes[:'version']
|
|
146
|
-
else
|
|
147
|
-
self.version = nil
|
|
148
145
|
end
|
|
149
146
|
end
|
|
150
147
|
|
|
@@ -153,18 +150,6 @@ module PulpNpmClient
|
|
|
153
150
|
def list_invalid_properties
|
|
154
151
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
155
152
|
invalid_properties = Array.new
|
|
156
|
-
if @relative_path.nil?
|
|
157
|
-
invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
|
|
158
|
-
end
|
|
159
|
-
|
|
160
|
-
if @name.nil?
|
|
161
|
-
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
if @version.nil?
|
|
165
|
-
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
|
166
|
-
end
|
|
167
|
-
|
|
168
153
|
invalid_properties
|
|
169
154
|
end
|
|
170
155
|
|
|
@@ -172,9 +157,6 @@ module PulpNpmClient
|
|
|
172
157
|
# @return true if the model is valid
|
|
173
158
|
def valid?
|
|
174
159
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
175
|
-
return false if @relative_path.nil?
|
|
176
|
-
return false if @name.nil?
|
|
177
|
-
return false if @version.nil?
|
|
178
160
|
true
|
|
179
161
|
end
|
|
180
162
|
|