pulp_npm_client 0.5.0 → 0.7.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
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
Contact: pulp-list@redhat.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpNpmClient
|
|
17
|
+
# Shared network configuration fields and validation logic used by both RemoteSerializer and UploadSerializerFieldsMixin.
|
|
18
|
+
class RemoteNetworkConfigResponse
|
|
19
|
+
# A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
|
|
20
|
+
attr_accessor :ca_cert
|
|
21
|
+
|
|
22
|
+
# A PEM encoded client certificate used for authentication.
|
|
23
|
+
attr_accessor :client_cert
|
|
24
|
+
|
|
25
|
+
# If True, TLS peer validation must be performed.
|
|
26
|
+
attr_accessor :tls_validation
|
|
27
|
+
|
|
28
|
+
# The proxy URL. Format: scheme://host:port
|
|
29
|
+
attr_accessor :proxy_url
|
|
30
|
+
|
|
31
|
+
# Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
|
|
32
|
+
attr_accessor :max_retries
|
|
33
|
+
|
|
34
|
+
# aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
35
|
+
attr_accessor :total_timeout
|
|
36
|
+
|
|
37
|
+
# aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
|
|
38
|
+
attr_accessor :connect_timeout
|
|
39
|
+
|
|
40
|
+
# 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.
|
|
41
|
+
attr_accessor :sock_connect_timeout
|
|
42
|
+
|
|
43
|
+
# 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.
|
|
44
|
+
attr_accessor :sock_read_timeout
|
|
45
|
+
|
|
46
|
+
# Headers for aiohttp.Clientsession
|
|
47
|
+
attr_accessor :headers
|
|
48
|
+
|
|
49
|
+
# Total number of simultaneous connections. If not set then the default value will be used.
|
|
50
|
+
attr_accessor :download_concurrency
|
|
51
|
+
|
|
52
|
+
# Limits requests per second for each concurrent downloader
|
|
53
|
+
attr_accessor :rate_limit
|
|
54
|
+
|
|
55
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
|
+
def self.attribute_map
|
|
57
|
+
{
|
|
58
|
+
:'ca_cert' => :'ca_cert',
|
|
59
|
+
:'client_cert' => :'client_cert',
|
|
60
|
+
:'tls_validation' => :'tls_validation',
|
|
61
|
+
:'proxy_url' => :'proxy_url',
|
|
62
|
+
:'max_retries' => :'max_retries',
|
|
63
|
+
:'total_timeout' => :'total_timeout',
|
|
64
|
+
:'connect_timeout' => :'connect_timeout',
|
|
65
|
+
:'sock_connect_timeout' => :'sock_connect_timeout',
|
|
66
|
+
:'sock_read_timeout' => :'sock_read_timeout',
|
|
67
|
+
:'headers' => :'headers',
|
|
68
|
+
:'download_concurrency' => :'download_concurrency',
|
|
69
|
+
:'rate_limit' => :'rate_limit'
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns all the JSON keys this model knows about
|
|
74
|
+
def self.acceptable_attributes
|
|
75
|
+
attribute_map.values
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute type mapping.
|
|
79
|
+
def self.openapi_types
|
|
80
|
+
{
|
|
81
|
+
:'ca_cert' => :'String',
|
|
82
|
+
:'client_cert' => :'String',
|
|
83
|
+
:'tls_validation' => :'Boolean',
|
|
84
|
+
:'proxy_url' => :'String',
|
|
85
|
+
:'max_retries' => :'Integer',
|
|
86
|
+
:'total_timeout' => :'Float',
|
|
87
|
+
:'connect_timeout' => :'Float',
|
|
88
|
+
:'sock_connect_timeout' => :'Float',
|
|
89
|
+
:'sock_read_timeout' => :'Float',
|
|
90
|
+
:'headers' => :'Array<Object>',
|
|
91
|
+
:'download_concurrency' => :'Integer',
|
|
92
|
+
:'rate_limit' => :'Integer'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# List of attributes with nullable: true
|
|
97
|
+
def self.openapi_nullable
|
|
98
|
+
Set.new([
|
|
99
|
+
:'ca_cert',
|
|
100
|
+
:'client_cert',
|
|
101
|
+
:'proxy_url',
|
|
102
|
+
:'max_retries',
|
|
103
|
+
:'total_timeout',
|
|
104
|
+
:'connect_timeout',
|
|
105
|
+
:'sock_connect_timeout',
|
|
106
|
+
:'sock_read_timeout',
|
|
107
|
+
:'download_concurrency',
|
|
108
|
+
:'rate_limit'
|
|
109
|
+
])
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Initializes the object
|
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
114
|
+
def initialize(attributes = {})
|
|
115
|
+
if (!attributes.is_a?(Hash))
|
|
116
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpNpmClient::RemoteNetworkConfigResponse` initialize method"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
120
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
121
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
122
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpNpmClient::RemoteNetworkConfigResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
123
|
+
end
|
|
124
|
+
h[k.to_sym] = v
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'ca_cert')
|
|
128
|
+
self.ca_cert = attributes[:'ca_cert']
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'client_cert')
|
|
132
|
+
self.client_cert = attributes[:'client_cert']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'tls_validation')
|
|
136
|
+
self.tls_validation = attributes[:'tls_validation']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'proxy_url')
|
|
140
|
+
self.proxy_url = attributes[:'proxy_url']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'max_retries')
|
|
144
|
+
self.max_retries = attributes[:'max_retries']
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'total_timeout')
|
|
148
|
+
self.total_timeout = attributes[:'total_timeout']
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'connect_timeout')
|
|
152
|
+
self.connect_timeout = attributes[:'connect_timeout']
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'sock_connect_timeout')
|
|
156
|
+
self.sock_connect_timeout = attributes[:'sock_connect_timeout']
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'sock_read_timeout')
|
|
160
|
+
self.sock_read_timeout = attributes[:'sock_read_timeout']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'headers')
|
|
164
|
+
if (value = attributes[:'headers']).is_a?(Array)
|
|
165
|
+
self.headers = value
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'download_concurrency')
|
|
170
|
+
self.download_concurrency = attributes[:'download_concurrency']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'rate_limit')
|
|
174
|
+
self.rate_limit = attributes[:'rate_limit']
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
179
|
+
# @return Array for valid properties with the reasons
|
|
180
|
+
def list_invalid_properties
|
|
181
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
182
|
+
invalid_properties = Array.new
|
|
183
|
+
if !@total_timeout.nil? && @total_timeout < 0.0
|
|
184
|
+
invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
188
|
+
invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
192
|
+
invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
196
|
+
invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
invalid_properties
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Check to see if the all the properties in the model are valid
|
|
203
|
+
# @return true if the model is valid
|
|
204
|
+
def valid?
|
|
205
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
206
|
+
return false if !@total_timeout.nil? && @total_timeout < 0.0
|
|
207
|
+
return false if !@connect_timeout.nil? && @connect_timeout < 0.0
|
|
208
|
+
return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
|
|
209
|
+
return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
|
|
210
|
+
true
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Custom attribute writer method with validation
|
|
214
|
+
# @param [Object] total_timeout Value to be assigned
|
|
215
|
+
def total_timeout=(total_timeout)
|
|
216
|
+
if !total_timeout.nil? && total_timeout < 0.0
|
|
217
|
+
fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
@total_timeout = total_timeout
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
# Custom attribute writer method with validation
|
|
224
|
+
# @param [Object] connect_timeout Value to be assigned
|
|
225
|
+
def connect_timeout=(connect_timeout)
|
|
226
|
+
if !connect_timeout.nil? && connect_timeout < 0.0
|
|
227
|
+
fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
@connect_timeout = connect_timeout
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Custom attribute writer method with validation
|
|
234
|
+
# @param [Object] sock_connect_timeout Value to be assigned
|
|
235
|
+
def sock_connect_timeout=(sock_connect_timeout)
|
|
236
|
+
if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
|
|
237
|
+
fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
@sock_connect_timeout = sock_connect_timeout
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] sock_read_timeout Value to be assigned
|
|
245
|
+
def sock_read_timeout=(sock_read_timeout)
|
|
246
|
+
if !sock_read_timeout.nil? && sock_read_timeout < 0.0
|
|
247
|
+
fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@sock_read_timeout = sock_read_timeout
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Checks equality by comparing each attribute.
|
|
254
|
+
# @param [Object] Object to be compared
|
|
255
|
+
def ==(o)
|
|
256
|
+
return true if self.equal?(o)
|
|
257
|
+
self.class == o.class &&
|
|
258
|
+
ca_cert == o.ca_cert &&
|
|
259
|
+
client_cert == o.client_cert &&
|
|
260
|
+
tls_validation == o.tls_validation &&
|
|
261
|
+
proxy_url == o.proxy_url &&
|
|
262
|
+
max_retries == o.max_retries &&
|
|
263
|
+
total_timeout == o.total_timeout &&
|
|
264
|
+
connect_timeout == o.connect_timeout &&
|
|
265
|
+
sock_connect_timeout == o.sock_connect_timeout &&
|
|
266
|
+
sock_read_timeout == o.sock_read_timeout &&
|
|
267
|
+
headers == o.headers &&
|
|
268
|
+
download_concurrency == o.download_concurrency &&
|
|
269
|
+
rate_limit == o.rate_limit
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# @see the `==` method
|
|
273
|
+
# @param [Object] Object to be compared
|
|
274
|
+
def eql?(o)
|
|
275
|
+
self == o
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Calculates hash code according to all attributes.
|
|
279
|
+
# @return [Integer] Hash code
|
|
280
|
+
def hash
|
|
281
|
+
[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
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Builds the object from hash
|
|
285
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
286
|
+
# @return [Object] Returns the model itself
|
|
287
|
+
def self.build_from_hash(attributes)
|
|
288
|
+
return nil unless attributes.is_a?(Hash)
|
|
289
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
290
|
+
transformed_hash = {}
|
|
291
|
+
openapi_types.each_pair do |key, type|
|
|
292
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
293
|
+
transformed_hash["#{key}"] = nil
|
|
294
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
295
|
+
# check to ensure the input is an array given that the attribute
|
|
296
|
+
# is documented as an array but the input is not
|
|
297
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
298
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
299
|
+
end
|
|
300
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
301
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
new(transformed_hash)
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
# Deserializes the data based on type
|
|
308
|
+
# @param string type Data type
|
|
309
|
+
# @param string value Value to be deserialized
|
|
310
|
+
# @return [Object] Deserialized data
|
|
311
|
+
def self._deserialize(type, value)
|
|
312
|
+
case type.to_sym
|
|
313
|
+
when :Time
|
|
314
|
+
Time.parse(value)
|
|
315
|
+
when :Date
|
|
316
|
+
Date.parse(value)
|
|
317
|
+
when :String
|
|
318
|
+
value.to_s
|
|
319
|
+
when :Integer
|
|
320
|
+
value.to_i
|
|
321
|
+
when :Float
|
|
322
|
+
value.to_f
|
|
323
|
+
when :Boolean
|
|
324
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
325
|
+
true
|
|
326
|
+
else
|
|
327
|
+
false
|
|
328
|
+
end
|
|
329
|
+
when :Object
|
|
330
|
+
# generic object (usually a Hash), return directly
|
|
331
|
+
value
|
|
332
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
333
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
334
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
335
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
336
|
+
k_type = Regexp.last_match[:k_type]
|
|
337
|
+
v_type = Regexp.last_match[:v_type]
|
|
338
|
+
{}.tap do |hash|
|
|
339
|
+
value.each do |k, v|
|
|
340
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
else # model
|
|
344
|
+
# models (e.g. Pet) or oneOf
|
|
345
|
+
klass = PulpNpmClient.const_get(type)
|
|
346
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
347
|
+
end
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# Returns the string representation of the object
|
|
351
|
+
# @return [String] String presentation of the object
|
|
352
|
+
def to_s
|
|
353
|
+
to_hash.to_s
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
357
|
+
# @return [Hash] Returns the object in the form of hash
|
|
358
|
+
def to_body
|
|
359
|
+
to_hash
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Returns the object in the form of hash
|
|
363
|
+
# @return [Hash] Returns the object in the form of hash
|
|
364
|
+
def to_hash
|
|
365
|
+
hash = {}
|
|
366
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
367
|
+
value = self.send(attr)
|
|
368
|
+
if value.nil?
|
|
369
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
370
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
hash[param] = _to_hash(value)
|
|
374
|
+
end
|
|
375
|
+
hash
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
# Outputs non-array value in the form of hash
|
|
379
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
380
|
+
# @param [Object] value Any valid value
|
|
381
|
+
# @return [Hash] Returns the value in the form of hash
|
|
382
|
+
def _to_hash(value)
|
|
383
|
+
if value.is_a?(Array)
|
|
384
|
+
value.compact.map { |v| _to_hash(v) }
|
|
385
|
+
elsif value.is_a?(Hash)
|
|
386
|
+
{}.tap do |hash|
|
|
387
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
388
|
+
end
|
|
389
|
+
elsif value.respond_to? :to_hash
|
|
390
|
+
value.to_hash
|
|
391
|
+
else
|
|
392
|
+
value
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
end
|
data/lib/pulp_npm_client.rb
CHANGED
|
@@ -36,6 +36,8 @@ require 'pulp_npm_client/models/patchednpm_npm_distribution'
|
|
|
36
36
|
require 'pulp_npm_client/models/patchednpm_npm_remote'
|
|
37
37
|
require 'pulp_npm_client/models/patchednpm_npm_repository'
|
|
38
38
|
require 'pulp_npm_client/models/policy_enum'
|
|
39
|
+
require 'pulp_npm_client/models/remote_network_config'
|
|
40
|
+
require 'pulp_npm_client/models/remote_network_config_response'
|
|
39
41
|
require 'pulp_npm_client/models/repair'
|
|
40
42
|
require 'pulp_npm_client/models/repository_add_remove_content'
|
|
41
43
|
require 'pulp_npm_client/models/repository_sync_url'
|
|
@@ -34,19 +34,20 @@ describe 'ContentPackagesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create
|
|
36
36
|
# Create a package
|
|
37
|
-
#
|
|
38
|
-
# @param relative_path
|
|
39
|
-
# @param name
|
|
40
|
-
# @param version
|
|
37
|
+
# Trigger an asynchronous task to create content,optionally create new repository version.
|
|
41
38
|
# @param [Hash] opts the optional parameters
|
|
42
39
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
43
40
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
|
44
41
|
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
45
42
|
# @option opts [String] :artifact Artifact file representing the physical content
|
|
43
|
+
# @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.
|
|
46
44
|
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
47
45
|
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
48
46
|
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
49
|
-
# @
|
|
47
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
48
|
+
# @option opts [String] :name The name of the npm package.
|
|
49
|
+
# @option opts [String] :version The version of the npm package.
|
|
50
|
+
# @return [AsyncOperationResponse]
|
|
50
51
|
describe 'create test' do
|
|
51
52
|
it 'should work' do
|
|
52
53
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -55,7 +56,7 @@ describe 'ContentPackagesApi' do
|
|
|
55
56
|
|
|
56
57
|
# unit tests for list
|
|
57
58
|
# List packages
|
|
58
|
-
# A ViewSet for
|
|
59
|
+
# 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.
|
|
59
60
|
# @param [Hash] opts the optional parameters
|
|
60
61
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
61
62
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
@@ -69,9 +70,9 @@ describe 'ContentPackagesApi' do
|
|
|
69
70
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
70
71
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
71
72
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
72
|
-
# @option opts [String] :repository_version
|
|
73
|
-
# @option opts [String] :repository_version_added
|
|
74
|
-
# @option opts [String] :repository_version_removed
|
|
73
|
+
# @option opts [String] :repository_version
|
|
74
|
+
# @option opts [String] :repository_version_added
|
|
75
|
+
# @option opts [String] :repository_version_removed
|
|
75
76
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
76
77
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
77
78
|
# @return [PaginatednpmPackageResponseList]
|
|
@@ -83,7 +84,7 @@ describe 'ContentPackagesApi' do
|
|
|
83
84
|
|
|
84
85
|
# unit tests for read
|
|
85
86
|
# Inspect a package
|
|
86
|
-
# A ViewSet for
|
|
87
|
+
# 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.
|
|
87
88
|
# @param npm_package_href
|
|
88
89
|
# @param [Hash] opts the optional parameters
|
|
89
90
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -124,4 +125,25 @@ describe 'ContentPackagesApi' do
|
|
|
124
125
|
end
|
|
125
126
|
end
|
|
126
127
|
|
|
128
|
+
# unit tests for upload
|
|
129
|
+
# Synchronous npm package upload
|
|
130
|
+
# Create an npm package content unit synchronously.
|
|
131
|
+
# @param [Hash] opts the optional parameters
|
|
132
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
133
|
+
# @option opts [Hash<String, String>] :pulp_labels A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
|
134
|
+
# @option opts [String] :artifact Artifact file representing the physical content
|
|
135
|
+
# @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.
|
|
136
|
+
# @option opts [File] :file An uploaded file that may be turned into the content unit.
|
|
137
|
+
# @option opts [String] :upload An uncommitted upload that may be turned into the content unit.
|
|
138
|
+
# @option opts [String] :file_url A url that Pulp can download and turn into the content unit.
|
|
139
|
+
# @option opts [RemoteNetworkConfig] :downloader_config Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
|
|
140
|
+
# @option opts [String] :name The name of the npm package.
|
|
141
|
+
# @option opts [String] :version The version of the npm package.
|
|
142
|
+
# @return [NpmPackageResponse]
|
|
143
|
+
describe 'upload test' do
|
|
144
|
+
it 'should work' do
|
|
145
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
127
149
|
end
|
|
@@ -85,8 +85,8 @@ describe 'DistributionsNpmApi' do
|
|
|
85
85
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
86
86
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
87
87
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
88
|
-
# @option opts [String] :repository
|
|
89
|
-
# @option opts [Array<String>] :repository__in
|
|
88
|
+
# @option opts [String] :repository
|
|
89
|
+
# @option opts [Array<String>] :repository__in
|
|
90
90
|
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
91
91
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
|
92
92
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
|
@@ -34,7 +34,7 @@ describe 'RemotesNpmApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create
|
|
36
36
|
# Create a npm remote
|
|
37
|
-
# A ViewSet for NpmRemote. Similar to the
|
|
37
|
+
# A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
38
38
|
# @param npm_npm_remote
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -60,7 +60,7 @@ describe 'RemotesNpmApi' do
|
|
|
60
60
|
|
|
61
61
|
# unit tests for list
|
|
62
62
|
# List npm remotes
|
|
63
|
-
# A ViewSet for NpmRemote. Similar to the
|
|
63
|
+
# A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
64
64
|
# @param [Hash] opts the optional parameters
|
|
65
65
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
66
66
|
# @option opts [Integer] :limit Number of results to return per page.
|
|
@@ -112,7 +112,7 @@ describe 'RemotesNpmApi' do
|
|
|
112
112
|
|
|
113
113
|
# unit tests for read
|
|
114
114
|
# Inspect a npm remote
|
|
115
|
-
# A ViewSet for NpmRemote. Similar to the
|
|
115
|
+
# A ViewSet for NpmRemote. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
116
116
|
# @param npm_npm_remote_href
|
|
117
117
|
# @param [Hash] opts the optional parameters
|
|
118
118
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -34,7 +34,7 @@ describe 'RepositoriesNpmApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create
|
|
36
36
|
# Create a npm repository
|
|
37
|
-
# A ViewSet for NpmRepository. Similar to the
|
|
37
|
+
# A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
38
38
|
# @param npm_npm_repository
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -60,7 +60,7 @@ describe 'RepositoriesNpmApi' do
|
|
|
60
60
|
|
|
61
61
|
# unit tests for list
|
|
62
62
|
# List npm repositorys
|
|
63
|
-
# A ViewSet for NpmRepository. Similar to the
|
|
63
|
+
# A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
64
64
|
# @param [Hash] opts the optional parameters
|
|
65
65
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
66
66
|
# @option opts [String] :latest_with_content Content Unit referenced by HREF/PRN
|
|
@@ -81,7 +81,7 @@ describe 'RepositoriesNpmApi' do
|
|
|
81
81
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
|
82
82
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
83
83
|
# @option opts [String] :q Filter results by using NOT, AND and OR operations on other filters
|
|
84
|
-
# @option opts [String] :remote
|
|
84
|
+
# @option opts [String] :remote
|
|
85
85
|
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
|
86
86
|
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
|
87
87
|
# @option opts [Integer] :retain_repo_versions__gte Filter results where retain_repo_versions is greater than or equal to value
|
|
@@ -130,7 +130,7 @@ describe 'RepositoriesNpmApi' do
|
|
|
130
130
|
|
|
131
131
|
# unit tests for read
|
|
132
132
|
# Inspect a npm repository
|
|
133
|
-
# A ViewSet for NpmRepository. Similar to the
|
|
133
|
+
# A ViewSet for NpmRepository. Similar to the NpmPackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
|
134
134
|
# @param npm_npm_repository_href
|
|
135
135
|
# @param [Hash] opts the optional parameters
|
|
136
136
|
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
@@ -63,49 +63,49 @@ describe PulpNpmClient::NpmNpmRemoteResponse do
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
-
describe 'test attribute "
|
|
66
|
+
describe 'test attribute "pulp_labels"' do
|
|
67
67
|
it 'should work' do
|
|
68
68
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
describe 'test attribute "
|
|
72
|
+
describe 'test attribute "policy"' do
|
|
73
73
|
it 'should work' do
|
|
74
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
-
describe 'test attribute "
|
|
78
|
+
describe 'test attribute "hidden_fields"' do
|
|
79
79
|
it 'should work' do
|
|
80
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
describe 'test attribute "
|
|
84
|
+
describe 'test attribute "ca_cert"' do
|
|
85
85
|
it 'should work' do
|
|
86
86
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
describe 'test attribute "
|
|
90
|
+
describe 'test attribute "client_cert"' do
|
|
91
91
|
it 'should work' do
|
|
92
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
93
|
end
|
|
94
94
|
end
|
|
95
95
|
|
|
96
|
-
describe 'test attribute "
|
|
96
|
+
describe 'test attribute "tls_validation"' do
|
|
97
97
|
it 'should work' do
|
|
98
98
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
99
99
|
end
|
|
100
100
|
end
|
|
101
101
|
|
|
102
|
-
describe 'test attribute "
|
|
102
|
+
describe 'test attribute "proxy_url"' do
|
|
103
103
|
it 'should work' do
|
|
104
104
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
-
describe 'test attribute "
|
|
108
|
+
describe 'test attribute "max_retries"' do
|
|
109
109
|
it 'should work' do
|
|
110
110
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
111
111
|
end
|
|
@@ -141,13 +141,13 @@ describe PulpNpmClient::NpmNpmRemoteResponse do
|
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
-
describe 'test attribute "
|
|
144
|
+
describe 'test attribute "download_concurrency"' do
|
|
145
145
|
it 'should work' do
|
|
146
146
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
-
describe 'test attribute "
|
|
150
|
+
describe 'test attribute "rate_limit"' do
|
|
151
151
|
it 'should work' do
|
|
152
152
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
153
153
|
end
|