pulp_ansible_client 0.11.0.dev1636686953 → 0.11.0.dev1637032524

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_ansible_client might be problematic. Click here for more details.

@@ -15,64 +15,64 @@ require 'date'
15
15
  module PulpAnsibleClient
16
16
  # A serializer for Git Collection Remotes.
17
17
  class AnsibleGitRemote
18
- # The URL of an external content source.
19
- attr_accessor :url
18
+ # Headers for aiohttp.Clientsession
19
+ attr_accessor :headers
20
20
 
21
- # The proxy URL. Format: scheme://host:port
22
- attr_accessor :proxy_url
21
+ # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
22
+ attr_accessor :ca_cert
23
23
 
24
- # The username to be used for authentication when syncing.
25
- attr_accessor :username
24
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
25
+ attr_accessor :connect_timeout
26
26
 
27
27
  # The username to authenticte to the proxy.
28
28
  attr_accessor :proxy_username
29
29
 
30
- # If True, TLS peer validation must be performed.
31
- attr_accessor :tls_validation
30
+ # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
31
+ attr_accessor :max_retries
32
32
 
33
- # The password to be used for authentication when syncing.
34
- attr_accessor :password
33
+ # The username to be used for authentication when syncing.
34
+ attr_accessor :username
35
35
 
36
- # A PEM encoded client certificate used for authentication.
37
- attr_accessor :client_cert
36
+ # A PEM encoded private key used for authentication.
37
+ attr_accessor :client_key
38
+
39
+ # Limits total download rate in requests per second
40
+ attr_accessor :rate_limit
41
+
42
+ # Total number of simultaneous connections. If not set then the default value will be used.
43
+ attr_accessor :download_concurrency
44
+
45
+ attr_accessor :pulp_labels
46
+
47
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
48
+ attr_accessor :total_timeout
38
49
 
39
50
  # The password to authenticte to the proxy.
40
51
  attr_accessor :proxy_password
41
52
 
42
- # A PEM encoded private key used for authentication.
43
- attr_accessor :client_key
53
+ # The proxy URL. Format: scheme://host:port
54
+ attr_accessor :proxy_url
44
55
 
45
- attr_accessor :pulp_labels
56
+ # The URL of an external content source.
57
+ attr_accessor :url
46
58
 
47
59
  # 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.
48
60
  attr_accessor :sock_read_timeout
49
61
 
50
- # aiohttp.ClientTimeout.connect (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
51
- attr_accessor :connect_timeout
52
-
53
- # 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.
54
- attr_accessor :sock_connect_timeout
55
-
56
62
  # A unique name for this remote.
57
63
  attr_accessor :name
58
64
 
59
- # Headers for aiohttp.Clientsession
60
- attr_accessor :headers
61
-
62
- # Total number of simultaneous connections. If not set then the default value will be used.
63
- attr_accessor :download_concurrency
64
-
65
- # Maximum number of retry attempts after a download failure. If not set then the default value (3) will be used.
66
- attr_accessor :max_retries
65
+ # A PEM encoded client certificate used for authentication.
66
+ attr_accessor :client_cert
67
67
 
68
- # aiohttp.ClientTimeout.total (q.v.) for download-connections. The default is null, which will cause the default from the aiohttp library to be used.
69
- attr_accessor :total_timeout
68
+ # If True, TLS peer validation must be performed.
69
+ attr_accessor :tls_validation
70
70
 
71
- # A PEM encoded CA certificate used to validate the server certificate presented by the remote server.
72
- attr_accessor :ca_cert
71
+ # The password to be used for authentication when syncing.
72
+ attr_accessor :password
73
73
 
74
- # Limits total download rate in requests per second
75
- attr_accessor :rate_limit
74
+ # 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.
75
+ attr_accessor :sock_connect_timeout
76
76
 
77
77
  # If True, only metadata about the content will be stored in Pulp. Clients will retrieve content from the remote URL.
78
78
  attr_accessor :metadata_only
@@ -80,26 +80,26 @@ module PulpAnsibleClient
80
80
  # Attribute mapping from ruby-style variable name to JSON key.
81
81
  def self.attribute_map
82
82
  {
83
- :'url' => :'url',
84
- :'proxy_url' => :'proxy_url',
85
- :'username' => :'username',
83
+ :'headers' => :'headers',
84
+ :'ca_cert' => :'ca_cert',
85
+ :'connect_timeout' => :'connect_timeout',
86
86
  :'proxy_username' => :'proxy_username',
87
- :'tls_validation' => :'tls_validation',
88
- :'password' => :'password',
89
- :'client_cert' => :'client_cert',
90
- :'proxy_password' => :'proxy_password',
87
+ :'max_retries' => :'max_retries',
88
+ :'username' => :'username',
91
89
  :'client_key' => :'client_key',
90
+ :'rate_limit' => :'rate_limit',
91
+ :'download_concurrency' => :'download_concurrency',
92
92
  :'pulp_labels' => :'pulp_labels',
93
+ :'total_timeout' => :'total_timeout',
94
+ :'proxy_password' => :'proxy_password',
95
+ :'proxy_url' => :'proxy_url',
96
+ :'url' => :'url',
93
97
  :'sock_read_timeout' => :'sock_read_timeout',
94
- :'connect_timeout' => :'connect_timeout',
95
- :'sock_connect_timeout' => :'sock_connect_timeout',
96
98
  :'name' => :'name',
97
- :'headers' => :'headers',
98
- :'download_concurrency' => :'download_concurrency',
99
- :'max_retries' => :'max_retries',
100
- :'total_timeout' => :'total_timeout',
101
- :'ca_cert' => :'ca_cert',
102
- :'rate_limit' => :'rate_limit',
99
+ :'client_cert' => :'client_cert',
100
+ :'tls_validation' => :'tls_validation',
101
+ :'password' => :'password',
102
+ :'sock_connect_timeout' => :'sock_connect_timeout',
103
103
  :'metadata_only' => :'metadata_only'
104
104
  }
105
105
  end
@@ -107,26 +107,26 @@ module PulpAnsibleClient
107
107
  # Attribute type mapping.
108
108
  def self.openapi_types
109
109
  {
110
- :'url' => :'String',
111
- :'proxy_url' => :'String',
112
- :'username' => :'String',
110
+ :'headers' => :'Array<Object>',
111
+ :'ca_cert' => :'String',
112
+ :'connect_timeout' => :'Float',
113
113
  :'proxy_username' => :'String',
114
- :'tls_validation' => :'Boolean',
115
- :'password' => :'String',
116
- :'client_cert' => :'String',
117
- :'proxy_password' => :'String',
114
+ :'max_retries' => :'Integer',
115
+ :'username' => :'String',
118
116
  :'client_key' => :'String',
117
+ :'rate_limit' => :'Integer',
118
+ :'download_concurrency' => :'Integer',
119
119
  :'pulp_labels' => :'Object',
120
+ :'total_timeout' => :'Float',
121
+ :'proxy_password' => :'String',
122
+ :'proxy_url' => :'String',
123
+ :'url' => :'String',
120
124
  :'sock_read_timeout' => :'Float',
121
- :'connect_timeout' => :'Float',
122
- :'sock_connect_timeout' => :'Float',
123
125
  :'name' => :'String',
124
- :'headers' => :'Array<Object>',
125
- :'download_concurrency' => :'Integer',
126
- :'max_retries' => :'Integer',
127
- :'total_timeout' => :'Float',
128
- :'ca_cert' => :'String',
129
- :'rate_limit' => :'Integer',
126
+ :'client_cert' => :'String',
127
+ :'tls_validation' => :'Boolean',
128
+ :'password' => :'String',
129
+ :'sock_connect_timeout' => :'Float',
130
130
  :'metadata_only' => :'Boolean'
131
131
  }
132
132
  end
@@ -134,21 +134,21 @@ module PulpAnsibleClient
134
134
  # List of attributes with nullable: true
135
135
  def self.openapi_nullable
136
136
  Set.new([
137
- :'proxy_url',
138
- :'username',
137
+ :'ca_cert',
138
+ :'connect_timeout',
139
139
  :'proxy_username',
140
- :'password',
141
- :'client_cert',
142
- :'proxy_password',
140
+ :'max_retries',
141
+ :'username',
143
142
  :'client_key',
144
- :'sock_read_timeout',
145
- :'connect_timeout',
146
- :'sock_connect_timeout',
143
+ :'rate_limit',
147
144
  :'download_concurrency',
148
- :'max_retries',
149
145
  :'total_timeout',
150
- :'ca_cert',
151
- :'rate_limit',
146
+ :'proxy_password',
147
+ :'proxy_url',
148
+ :'sock_read_timeout',
149
+ :'client_cert',
150
+ :'password',
151
+ :'sock_connect_timeout',
152
152
  ])
153
153
  end
154
154
 
@@ -167,86 +167,86 @@ module PulpAnsibleClient
167
167
  h[k.to_sym] = v
168
168
  }
169
169
 
170
- if attributes.key?(:'url')
171
- self.url = attributes[:'url']
170
+ if attributes.key?(:'headers')
171
+ if (value = attributes[:'headers']).is_a?(Array)
172
+ self.headers = value
173
+ end
172
174
  end
173
175
 
174
- if attributes.key?(:'proxy_url')
175
- self.proxy_url = attributes[:'proxy_url']
176
+ if attributes.key?(:'ca_cert')
177
+ self.ca_cert = attributes[:'ca_cert']
176
178
  end
177
179
 
178
- if attributes.key?(:'username')
179
- self.username = attributes[:'username']
180
+ if attributes.key?(:'connect_timeout')
181
+ self.connect_timeout = attributes[:'connect_timeout']
180
182
  end
181
183
 
182
184
  if attributes.key?(:'proxy_username')
183
185
  self.proxy_username = attributes[:'proxy_username']
184
186
  end
185
187
 
186
- if attributes.key?(:'tls_validation')
187
- self.tls_validation = attributes[:'tls_validation']
188
+ if attributes.key?(:'max_retries')
189
+ self.max_retries = attributes[:'max_retries']
188
190
  end
189
191
 
190
- if attributes.key?(:'password')
191
- self.password = attributes[:'password']
192
+ if attributes.key?(:'username')
193
+ self.username = attributes[:'username']
192
194
  end
193
195
 
194
- if attributes.key?(:'client_cert')
195
- self.client_cert = attributes[:'client_cert']
196
+ if attributes.key?(:'client_key')
197
+ self.client_key = attributes[:'client_key']
196
198
  end
197
199
 
198
- if attributes.key?(:'proxy_password')
199
- self.proxy_password = attributes[:'proxy_password']
200
+ if attributes.key?(:'rate_limit')
201
+ self.rate_limit = attributes[:'rate_limit']
200
202
  end
201
203
 
202
- if attributes.key?(:'client_key')
203
- self.client_key = attributes[:'client_key']
204
+ if attributes.key?(:'download_concurrency')
205
+ self.download_concurrency = attributes[:'download_concurrency']
204
206
  end
205
207
 
206
208
  if attributes.key?(:'pulp_labels')
207
209
  self.pulp_labels = attributes[:'pulp_labels']
208
210
  end
209
211
 
210
- if attributes.key?(:'sock_read_timeout')
211
- self.sock_read_timeout = attributes[:'sock_read_timeout']
212
+ if attributes.key?(:'total_timeout')
213
+ self.total_timeout = attributes[:'total_timeout']
212
214
  end
213
215
 
214
- if attributes.key?(:'connect_timeout')
215
- self.connect_timeout = attributes[:'connect_timeout']
216
+ if attributes.key?(:'proxy_password')
217
+ self.proxy_password = attributes[:'proxy_password']
216
218
  end
217
219
 
218
- if attributes.key?(:'sock_connect_timeout')
219
- self.sock_connect_timeout = attributes[:'sock_connect_timeout']
220
+ if attributes.key?(:'proxy_url')
221
+ self.proxy_url = attributes[:'proxy_url']
220
222
  end
221
223
 
222
- if attributes.key?(:'name')
223
- self.name = attributes[:'name']
224
+ if attributes.key?(:'url')
225
+ self.url = attributes[:'url']
224
226
  end
225
227
 
226
- if attributes.key?(:'headers')
227
- if (value = attributes[:'headers']).is_a?(Array)
228
- self.headers = value
229
- end
228
+ if attributes.key?(:'sock_read_timeout')
229
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
230
230
  end
231
231
 
232
- if attributes.key?(:'download_concurrency')
233
- self.download_concurrency = attributes[:'download_concurrency']
232
+ if attributes.key?(:'name')
233
+ self.name = attributes[:'name']
234
234
  end
235
235
 
236
- if attributes.key?(:'max_retries')
237
- self.max_retries = attributes[:'max_retries']
236
+ if attributes.key?(:'client_cert')
237
+ self.client_cert = attributes[:'client_cert']
238
238
  end
239
239
 
240
- if attributes.key?(:'total_timeout')
241
- self.total_timeout = attributes[:'total_timeout']
240
+ if attributes.key?(:'tls_validation')
241
+ self.tls_validation = attributes[:'tls_validation']
242
242
  end
243
243
 
244
- if attributes.key?(:'ca_cert')
245
- self.ca_cert = attributes[:'ca_cert']
244
+ if attributes.key?(:'password')
245
+ self.password = attributes[:'password']
246
246
  end
247
247
 
248
- if attributes.key?(:'rate_limit')
249
- self.rate_limit = attributes[:'rate_limit']
248
+ if attributes.key?(:'sock_connect_timeout')
249
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
250
250
  end
251
251
 
252
252
  if attributes.key?(:'metadata_only')
@@ -258,32 +258,32 @@ module PulpAnsibleClient
258
258
  # @return Array for valid properties with the reasons
259
259
  def list_invalid_properties
260
260
  invalid_properties = Array.new
261
- if @url.nil?
262
- invalid_properties.push('invalid value for "url", url cannot be nil.')
261
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
262
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
263
263
  end
264
264
 
265
- if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
266
- invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
265
+ if !@download_concurrency.nil? && @download_concurrency < 1
266
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
267
267
  end
268
268
 
269
- if !@connect_timeout.nil? && @connect_timeout < 0.0
270
- invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
269
+ if !@total_timeout.nil? && @total_timeout < 0.0
270
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
271
271
  end
272
272
 
273
- if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
274
- invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
273
+ if @url.nil?
274
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
275
275
  end
276
276
 
277
- if @name.nil?
278
- invalid_properties.push('invalid value for "name", name cannot be nil.')
277
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
278
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
279
279
  end
280
280
 
281
- if !@download_concurrency.nil? && @download_concurrency < 1
282
- invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
281
+ if @name.nil?
282
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
283
283
  end
284
284
 
285
- if !@total_timeout.nil? && @total_timeout < 0.0
286
- invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
285
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
286
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
287
287
  end
288
288
 
289
289
  invalid_properties
@@ -292,26 +292,16 @@ module PulpAnsibleClient
292
292
  # Check to see if the all the properties in the model are valid
293
293
  # @return true if the model is valid
294
294
  def valid?
295
- return false if @url.nil?
296
- return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
297
295
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
298
- return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
299
- return false if @name.nil?
300
296
  return false if !@download_concurrency.nil? && @download_concurrency < 1
301
297
  return false if !@total_timeout.nil? && @total_timeout < 0.0
298
+ return false if @url.nil?
299
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
300
+ return false if @name.nil?
301
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
302
302
  true
303
303
  end
304
304
 
305
- # Custom attribute writer method with validation
306
- # @param [Object] sock_read_timeout Value to be assigned
307
- def sock_read_timeout=(sock_read_timeout)
308
- if !sock_read_timeout.nil? && sock_read_timeout < 0.0
309
- fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
310
- end
311
-
312
- @sock_read_timeout = sock_read_timeout
313
- end
314
-
315
305
  # Custom attribute writer method with validation
316
306
  # @param [Object] connect_timeout Value to be assigned
317
307
  def connect_timeout=(connect_timeout)
@@ -322,16 +312,6 @@ module PulpAnsibleClient
322
312
  @connect_timeout = connect_timeout
323
313
  end
324
314
 
325
- # Custom attribute writer method with validation
326
- # @param [Object] sock_connect_timeout Value to be assigned
327
- def sock_connect_timeout=(sock_connect_timeout)
328
- if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
329
- fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
330
- end
331
-
332
- @sock_connect_timeout = sock_connect_timeout
333
- end
334
-
335
315
  # Custom attribute writer method with validation
336
316
  # @param [Object] download_concurrency Value to be assigned
337
317
  def download_concurrency=(download_concurrency)
@@ -352,31 +332,51 @@ module PulpAnsibleClient
352
332
  @total_timeout = total_timeout
353
333
  end
354
334
 
335
+ # Custom attribute writer method with validation
336
+ # @param [Object] sock_read_timeout Value to be assigned
337
+ def sock_read_timeout=(sock_read_timeout)
338
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
339
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
340
+ end
341
+
342
+ @sock_read_timeout = sock_read_timeout
343
+ end
344
+
345
+ # Custom attribute writer method with validation
346
+ # @param [Object] sock_connect_timeout Value to be assigned
347
+ def sock_connect_timeout=(sock_connect_timeout)
348
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
349
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
350
+ end
351
+
352
+ @sock_connect_timeout = sock_connect_timeout
353
+ end
354
+
355
355
  # Checks equality by comparing each attribute.
356
356
  # @param [Object] Object to be compared
357
357
  def ==(o)
358
358
  return true if self.equal?(o)
359
359
  self.class == o.class &&
360
- url == o.url &&
361
- proxy_url == o.proxy_url &&
362
- username == o.username &&
360
+ headers == o.headers &&
361
+ ca_cert == o.ca_cert &&
362
+ connect_timeout == o.connect_timeout &&
363
363
  proxy_username == o.proxy_username &&
364
- tls_validation == o.tls_validation &&
365
- password == o.password &&
366
- client_cert == o.client_cert &&
367
- proxy_password == o.proxy_password &&
364
+ max_retries == o.max_retries &&
365
+ username == o.username &&
368
366
  client_key == o.client_key &&
367
+ rate_limit == o.rate_limit &&
368
+ download_concurrency == o.download_concurrency &&
369
369
  pulp_labels == o.pulp_labels &&
370
+ total_timeout == o.total_timeout &&
371
+ proxy_password == o.proxy_password &&
372
+ proxy_url == o.proxy_url &&
373
+ url == o.url &&
370
374
  sock_read_timeout == o.sock_read_timeout &&
371
- connect_timeout == o.connect_timeout &&
372
- sock_connect_timeout == o.sock_connect_timeout &&
373
375
  name == o.name &&
374
- headers == o.headers &&
375
- download_concurrency == o.download_concurrency &&
376
- max_retries == o.max_retries &&
377
- total_timeout == o.total_timeout &&
378
- ca_cert == o.ca_cert &&
379
- rate_limit == o.rate_limit &&
376
+ client_cert == o.client_cert &&
377
+ tls_validation == o.tls_validation &&
378
+ password == o.password &&
379
+ sock_connect_timeout == o.sock_connect_timeout &&
380
380
  metadata_only == o.metadata_only
381
381
  end
382
382
 
@@ -389,7 +389,7 @@ module PulpAnsibleClient
389
389
  # Calculates hash code according to all attributes.
390
390
  # @return [Integer] Hash code
391
391
  def hash
392
- [url, proxy_url, username, proxy_username, tls_validation, password, client_cert, proxy_password, client_key, pulp_labels, sock_read_timeout, connect_timeout, sock_connect_timeout, name, headers, download_concurrency, max_retries, total_timeout, ca_cert, rate_limit, metadata_only].hash
392
+ [headers, ca_cert, connect_timeout, proxy_username, max_retries, username, client_key, rate_limit, download_concurrency, pulp_labels, total_timeout, proxy_password, proxy_url, url, sock_read_timeout, name, client_cert, tls_validation, password, sock_connect_timeout, metadata_only].hash
393
393
  end
394
394
 
395
395
  # Builds the object from hash