pulp_gem_client 0.7.5 → 0.8.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -6
  3. data/docs/ContentGemApi.md +17 -9
  4. data/docs/DistributionsGemApi.md +4 -4
  5. data/docs/GemGemDistribution.md +2 -0
  6. data/docs/GemGemDistributionResponse.md +4 -0
  7. data/docs/GemGemRemote.md +6 -6
  8. data/docs/GemGemRemoteResponse.md +8 -8
  9. data/docs/GemGemRepository.md +2 -0
  10. data/docs/GemGemRepositoryResponse.md +2 -0
  11. data/docs/PatchedgemGemDistribution.md +2 -0
  12. data/docs/PatchedgemGemRemote.md +6 -6
  13. data/docs/PatchedgemGemRepository.md +2 -0
  14. data/docs/PublicationsGemApi.md +2 -2
  15. data/docs/RemoteNetworkConfig.md +50 -0
  16. data/docs/RemoteNetworkConfigResponse.md +40 -0
  17. data/docs/RepositoriesGemApi.md +20 -4
  18. data/docs/RepositoryAddRemoveContent.md +3 -1
  19. data/lib/pulp_gem_client/api/content_gem_api.rb +25 -9
  20. data/lib/pulp_gem_client/api/distributions_gem_api.rb +4 -4
  21. data/lib/pulp_gem_client/api/publications_gem_api.rb +2 -2
  22. data/lib/pulp_gem_client/api/repositories_gem_api.rb +29 -5
  23. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +12 -1
  24. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +22 -1
  25. data/lib/pulp_gem_client/models/gem_gem_remote.rb +48 -33
  26. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +60 -45
  27. data/lib/pulp_gem_client/models/gem_gem_repository.rb +42 -1
  28. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +42 -1
  29. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +12 -1
  30. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +48 -33
  31. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +42 -1
  32. data/lib/pulp_gem_client/models/remote_network_config.rb +588 -0
  33. data/lib/pulp_gem_client/models/remote_network_config_response.rb +413 -0
  34. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +16 -4
  35. data/lib/pulp_gem_client/models/set_label.rb +0 -11
  36. data/lib/pulp_gem_client/models/set_label_response.rb +0 -21
  37. data/lib/pulp_gem_client/models/unset_label.rb +0 -11
  38. data/lib/pulp_gem_client/models/unset_label_response.rb +0 -21
  39. data/lib/pulp_gem_client/version.rb +1 -1
  40. data/lib/pulp_gem_client.rb +2 -0
  41. data/spec/api/content_gem_api_spec.rb +8 -4
  42. data/spec/api/distributions_gem_api_spec.rb +2 -2
  43. data/spec/api/publications_gem_api_spec.rb +1 -1
  44. data/spec/api/repositories_gem_api_spec.rb +10 -2
  45. data/spec/models/gem_gem_distribution_response_spec.rb +12 -0
  46. data/spec/models/gem_gem_distribution_spec.rb +6 -0
  47. data/spec/models/gem_gem_remote_response_spec.rb +10 -10
  48. data/spec/models/gem_gem_remote_spec.rb +17 -17
  49. data/spec/models/gem_gem_repository_response_spec.rb +6 -0
  50. data/spec/models/gem_gem_repository_spec.rb +6 -0
  51. data/spec/models/patchedgem_gem_distribution_spec.rb +6 -0
  52. data/spec/models/patchedgem_gem_remote_spec.rb +17 -17
  53. data/spec/models/patchedgem_gem_repository_spec.rb +6 -0
  54. data/spec/models/remote_network_config_response_spec.rb +102 -0
  55. data/spec/models/remote_network_config_spec.rb +132 -0
  56. data/spec/models/repository_add_remove_content_spec.rb +6 -0
  57. metadata +39 -31
@@ -22,6 +22,11 @@ module PulpGemClient
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 PulpGemClient
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 PulpGemClient
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
 
@@ -111,6 +111,8 @@ module PulpGemClient
111
111
  {
112
112
  :'name' => :'name',
113
113
  :'url' => :'url',
114
+ :'pulp_labels' => :'pulp_labels',
115
+ :'policy' => :'policy',
114
116
  :'ca_cert' => :'ca_cert',
115
117
  :'client_cert' => :'client_cert',
116
118
  :'client_key' => :'client_key',
@@ -120,15 +122,13 @@ module PulpGemClient
120
122
  :'proxy_password' => :'proxy_password',
121
123
  :'username' => :'username',
122
124
  :'password' => :'password',
123
- :'pulp_labels' => :'pulp_labels',
124
- :'download_concurrency' => :'download_concurrency',
125
125
  :'max_retries' => :'max_retries',
126
- :'policy' => :'policy',
127
126
  :'total_timeout' => :'total_timeout',
128
127
  :'connect_timeout' => :'connect_timeout',
129
128
  :'sock_connect_timeout' => :'sock_connect_timeout',
130
129
  :'sock_read_timeout' => :'sock_read_timeout',
131
130
  :'headers' => :'headers',
131
+ :'download_concurrency' => :'download_concurrency',
132
132
  :'rate_limit' => :'rate_limit',
133
133
  :'prereleases' => :'prereleases',
134
134
  :'includes' => :'includes',
@@ -146,6 +146,8 @@ module PulpGemClient
146
146
  {
147
147
  :'name' => :'String',
148
148
  :'url' => :'String',
149
+ :'pulp_labels' => :'Hash<String, String>',
150
+ :'policy' => :'PolicyEnum',
149
151
  :'ca_cert' => :'String',
150
152
  :'client_cert' => :'String',
151
153
  :'client_key' => :'String',
@@ -155,15 +157,13 @@ module PulpGemClient
155
157
  :'proxy_password' => :'String',
156
158
  :'username' => :'String',
157
159
  :'password' => :'String',
158
- :'pulp_labels' => :'Hash<String, String>',
159
- :'download_concurrency' => :'Integer',
160
160
  :'max_retries' => :'Integer',
161
- :'policy' => :'PolicyEnum',
162
161
  :'total_timeout' => :'Float',
163
162
  :'connect_timeout' => :'Float',
164
163
  :'sock_connect_timeout' => :'Float',
165
164
  :'sock_read_timeout' => :'Float',
166
165
  :'headers' => :'Array<Object>',
166
+ :'download_concurrency' => :'Integer',
167
167
  :'rate_limit' => :'Integer',
168
168
  :'prereleases' => :'Boolean',
169
169
  :'includes' => :'Hash<String, String>',
@@ -182,12 +182,12 @@ module PulpGemClient
182
182
  :'proxy_password',
183
183
  :'username',
184
184
  :'password',
185
- :'download_concurrency',
186
185
  :'max_retries',
187
186
  :'total_timeout',
188
187
  :'connect_timeout',
189
188
  :'sock_connect_timeout',
190
189
  :'sock_read_timeout',
190
+ :'download_concurrency',
191
191
  :'rate_limit',
192
192
  ])
193
193
  end
@@ -215,6 +215,16 @@ module PulpGemClient
215
215
  self.url = attributes[:'url']
216
216
  end
217
217
 
218
+ if attributes.key?(:'pulp_labels')
219
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
220
+ self.pulp_labels = value
221
+ end
222
+ end
223
+
224
+ if attributes.key?(:'policy')
225
+ self.policy = attributes[:'policy']
226
+ end
227
+
218
228
  if attributes.key?(:'ca_cert')
219
229
  self.ca_cert = attributes[:'ca_cert']
220
230
  end
@@ -251,24 +261,10 @@ module PulpGemClient
251
261
  self.password = attributes[:'password']
252
262
  end
253
263
 
254
- if attributes.key?(:'pulp_labels')
255
- if (value = attributes[:'pulp_labels']).is_a?(Hash)
256
- self.pulp_labels = value
257
- end
258
- end
259
-
260
- if attributes.key?(:'download_concurrency')
261
- self.download_concurrency = attributes[:'download_concurrency']
262
- end
263
-
264
264
  if attributes.key?(:'max_retries')
265
265
  self.max_retries = attributes[:'max_retries']
266
266
  end
267
267
 
268
- if attributes.key?(:'policy')
269
- self.policy = attributes[:'policy']
270
- end
271
-
272
268
  if attributes.key?(:'total_timeout')
273
269
  self.total_timeout = attributes[:'total_timeout']
274
270
  end
@@ -291,6 +287,10 @@ module PulpGemClient
291
287
  end
292
288
  end
293
289
 
290
+ if attributes.key?(:'download_concurrency')
291
+ self.download_concurrency = attributes[:'download_concurrency']
292
+ end
293
+
294
294
  if attributes.key?(:'rate_limit')
295
295
  self.rate_limit = attributes[:'rate_limit']
296
296
  end
@@ -375,6 +375,10 @@ module PulpGemClient
375
375
  invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
376
376
  end
377
377
 
378
+ if !@download_concurrency.nil? && @download_concurrency < 1
379
+ invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
380
+ end
381
+
378
382
  invalid_properties
379
383
  end
380
384
 
@@ -396,6 +400,7 @@ module PulpGemClient
396
400
  return false if !@connect_timeout.nil? && @connect_timeout < 0.0
397
401
  return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
398
402
  return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
403
+ return false if !@download_concurrency.nil? && @download_concurrency < 1
399
404
  true
400
405
  end
401
406
 
@@ -547,6 +552,16 @@ module PulpGemClient
547
552
  @sock_read_timeout = sock_read_timeout
548
553
  end
549
554
 
555
+ # Custom attribute writer method with validation
556
+ # @param [Object] download_concurrency Value to be assigned
557
+ def download_concurrency=(download_concurrency)
558
+ if !download_concurrency.nil? && download_concurrency < 1
559
+ fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
560
+ end
561
+
562
+ @download_concurrency = download_concurrency
563
+ end
564
+
550
565
  # Checks equality by comparing each attribute.
551
566
  # @param [Object] Object to be compared
552
567
  def ==(o)
@@ -554,6 +569,8 @@ module PulpGemClient
554
569
  self.class == o.class &&
555
570
  name == o.name &&
556
571
  url == o.url &&
572
+ pulp_labels == o.pulp_labels &&
573
+ policy == o.policy &&
557
574
  ca_cert == o.ca_cert &&
558
575
  client_cert == o.client_cert &&
559
576
  client_key == o.client_key &&
@@ -563,15 +580,13 @@ module PulpGemClient
563
580
  proxy_password == o.proxy_password &&
564
581
  username == o.username &&
565
582
  password == o.password &&
566
- pulp_labels == o.pulp_labels &&
567
- download_concurrency == o.download_concurrency &&
568
583
  max_retries == o.max_retries &&
569
- policy == o.policy &&
570
584
  total_timeout == o.total_timeout &&
571
585
  connect_timeout == o.connect_timeout &&
572
586
  sock_connect_timeout == o.sock_connect_timeout &&
573
587
  sock_read_timeout == o.sock_read_timeout &&
574
588
  headers == o.headers &&
589
+ download_concurrency == o.download_concurrency &&
575
590
  rate_limit == o.rate_limit &&
576
591
  prereleases == o.prereleases &&
577
592
  includes == o.includes &&
@@ -587,7 +602,7 @@ module PulpGemClient
587
602
  # Calculates hash code according to all attributes.
588
603
  # @return [Integer] Hash code
589
604
  def hash
590
- [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, prereleases, includes, excludes].hash
605
+ [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, prereleases, includes, excludes].hash
591
606
  end
592
607
 
593
608
  # Builds the object from hash
@@ -27,6 +27,9 @@ module PulpGemClient
27
27
  # Retain X versions of the repository. Default is null which retains all versions.
28
28
  attr_accessor :retain_repo_versions
29
29
 
30
+ # Retain X checkpoint publications for the repository. Default is null which retains all checkpoints.
31
+ attr_accessor :retain_checkpoints
32
+
30
33
  # An optional remote to use by default when syncing.
31
34
  attr_accessor :remote
32
35
 
@@ -37,6 +40,7 @@ module PulpGemClient
37
40
  :'name' => :'name',
38
41
  :'description' => :'description',
39
42
  :'retain_repo_versions' => :'retain_repo_versions',
43
+ :'retain_checkpoints' => :'retain_checkpoints',
40
44
  :'remote' => :'remote'
41
45
  }
42
46
  end
@@ -53,6 +57,7 @@ module PulpGemClient
53
57
  :'name' => :'String',
54
58
  :'description' => :'String',
55
59
  :'retain_repo_versions' => :'Integer',
60
+ :'retain_checkpoints' => :'Integer',
56
61
  :'remote' => :'String'
57
62
  }
58
63
  end
@@ -62,6 +67,7 @@ module PulpGemClient
62
67
  Set.new([
63
68
  :'description',
64
69
  :'retain_repo_versions',
70
+ :'retain_checkpoints',
65
71
  :'remote'
66
72
  ])
67
73
  end
@@ -99,6 +105,10 @@ module PulpGemClient
99
105
  self.retain_repo_versions = attributes[:'retain_repo_versions']
100
106
  end
101
107
 
108
+ if attributes.key?(:'retain_checkpoints')
109
+ self.retain_checkpoints = attributes[:'retain_checkpoints']
110
+ end
111
+
102
112
  if attributes.key?(:'remote')
103
113
  self.remote = attributes[:'remote']
104
114
  end
@@ -117,6 +127,14 @@ module PulpGemClient
117
127
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
118
128
  end
119
129
 
130
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
131
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
132
+ end
133
+
134
+ if !@retain_checkpoints.nil? && @retain_checkpoints < 1
135
+ invalid_properties.push('invalid value for "retain_checkpoints", must be greater than or equal to 1.')
136
+ end
137
+
120
138
  invalid_properties
121
139
  end
122
140
 
@@ -126,6 +144,8 @@ module PulpGemClient
126
144
  warn '[DEPRECATED] the `valid?` method is obsolete'
127
145
  return false if !@name.nil? && @name.to_s.length < 1
128
146
  return false if !@description.nil? && @description.to_s.length < 1
147
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
148
+ return false if !@retain_checkpoints.nil? && @retain_checkpoints < 1
129
149
  true
130
150
  end
131
151
 
@@ -153,6 +173,26 @@ module PulpGemClient
153
173
  @description = description
154
174
  end
155
175
 
176
+ # Custom attribute writer method with validation
177
+ # @param [Object] retain_repo_versions Value to be assigned
178
+ def retain_repo_versions=(retain_repo_versions)
179
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
180
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
181
+ end
182
+
183
+ @retain_repo_versions = retain_repo_versions
184
+ end
185
+
186
+ # Custom attribute writer method with validation
187
+ # @param [Object] retain_checkpoints Value to be assigned
188
+ def retain_checkpoints=(retain_checkpoints)
189
+ if !retain_checkpoints.nil? && retain_checkpoints < 1
190
+ fail ArgumentError, 'invalid value for "retain_checkpoints", must be greater than or equal to 1.'
191
+ end
192
+
193
+ @retain_checkpoints = retain_checkpoints
194
+ end
195
+
156
196
  # Checks equality by comparing each attribute.
157
197
  # @param [Object] Object to be compared
158
198
  def ==(o)
@@ -162,6 +202,7 @@ module PulpGemClient
162
202
  name == o.name &&
163
203
  description == o.description &&
164
204
  retain_repo_versions == o.retain_repo_versions &&
205
+ retain_checkpoints == o.retain_checkpoints &&
165
206
  remote == o.remote
166
207
  end
167
208
 
@@ -174,7 +215,7 @@ module PulpGemClient
174
215
  # Calculates hash code according to all attributes.
175
216
  # @return [Integer] Hash code
176
217
  def hash
177
- [pulp_labels, name, description, retain_repo_versions, remote].hash
218
+ [pulp_labels, name, description, retain_repo_versions, retain_checkpoints, remote].hash
178
219
  end
179
220
 
180
221
  # Builds the object from hash