pulp_ansible_client 0.18.1 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -7
  3. data/docs/AnsibleAnsibleRepositoryResponse.md +1 -1
  4. data/docs/AnsibleCollectionRemoteResponse.md +1 -1
  5. data/docs/AnsibleCollectionVersion.md +5 -5
  6. data/docs/AnsibleCollectionVersionResponse.md +3 -3
  7. data/docs/AnsibleGitRemote.md +26 -26
  8. data/docs/AnsibleGitRemoteResponse.md +26 -26
  9. data/docs/AnsibleRole.md +3 -3
  10. data/docs/AnsibleRoleResponse.md +3 -3
  11. data/docs/CollectionNamespaceResponse.md +1 -1
  12. data/docs/CollectionResponse.md +5 -3
  13. data/docs/CollectionVersionListResponse.md +1 -1
  14. data/docs/CollectionVersionResponse.md +2 -2
  15. data/docs/CollectionVersionSignatureResponse.md +23 -0
  16. data/docs/ContentCollectionVersionsApi.md +6 -6
  17. data/docs/PatchedCollection.md +17 -0
  18. data/docs/PatchedansibleGitRemote.md +26 -26
  19. data/docs/PulpAnsibleApiV3CollectionsApi.md +4 -4
  20. data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +2 -2
  21. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +4 -4
  22. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +2 -2
  23. data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +4 -4
  24. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +2 -2
  25. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +4 -4
  26. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +2 -2
  27. data/docs/UnpaginatedCollectionVersionResponse.md +2 -2
  28. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +9 -9
  29. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_api.rb +9 -9
  30. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_versions_api.rb +3 -3
  31. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api.rb +9 -9
  32. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api.rb +3 -3
  33. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_api.rb +9 -9
  34. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_versions_api.rb +3 -3
  35. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api.rb +9 -9
  36. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api.rb +3 -3
  37. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +1 -1
  38. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +1 -1
  39. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +18 -18
  40. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +10 -10
  41. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +242 -242
  42. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +144 -144
  43. data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
  44. data/lib/pulp_ansible_client/models/ansible_role_response.rb +10 -10
  45. data/lib/pulp_ansible_client/models/collection_namespace_response.rb +1 -0
  46. data/lib/pulp_ansible_client/models/collection_response.rb +19 -6
  47. data/lib/pulp_ansible_client/models/collection_version_list_response.rb +24 -0
  48. data/lib/pulp_ansible_client/models/collection_version_response.rb +33 -2
  49. data/lib/pulp_ansible_client/models/{task.rb → collection_version_signature_response.rb} +49 -56
  50. data/lib/pulp_ansible_client/models/{progress_report_response.rb → patched_collection.rb} +11 -63
  51. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +229 -229
  52. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +33 -2
  53. data/lib/pulp_ansible_client/version.rb +1 -1
  54. data/lib/pulp_ansible_client.rb +2 -3
  55. data/spec/api/content_collection_versions_api_spec.rb +3 -3
  56. data/spec/api/pulp_ansible_api_v3_collections_api_spec.rb +1 -1
  57. data/spec/api/pulp_ansible_api_v3_collections_versions_api_spec.rb +1 -1
  58. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -1
  59. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +1 -1
  60. data/spec/api/pulp_ansible_default_api_v3_collections_api_spec.rb +1 -1
  61. data/spec/api/pulp_ansible_default_api_v3_collections_versions_api_spec.rb +1 -1
  62. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -1
  63. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +1 -1
  64. data/spec/models/ansible_collection_version_response_spec.rb +3 -3
  65. data/spec/models/ansible_collection_version_spec.rb +3 -3
  66. data/spec/models/ansible_git_remote_response_spec.rb +19 -19
  67. data/spec/models/ansible_git_remote_spec.rb +19 -19
  68. data/spec/models/ansible_role_response_spec.rb +3 -3
  69. data/spec/models/ansible_role_spec.rb +2 -2
  70. data/spec/models/collection_response_spec.rb +6 -0
  71. data/spec/models/{progress_report_response_spec.rb → collection_version_signature_response_spec.rb} +10 -22
  72. data/spec/models/{task_spec.rb → patched_collection_spec.rb} +7 -13
  73. data/spec/models/patchedansible_git_remote_spec.rb +19 -19
  74. metadata +10 -14
  75. data/docs/ProgressReportResponse.md +0 -27
  76. data/docs/Task.md +0 -19
  77. data/docs/TaskResponse.md +0 -47
  78. data/lib/pulp_ansible_client/models/task_response.rb +0 -376
  79. data/spec/models/task_response_spec.rb +0 -131
@@ -1,376 +0,0 @@
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
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpAnsibleClient
16
- # Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
17
- class TaskResponse
18
- attr_accessor :pulp_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :pulp_created
22
-
23
- # The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'.
24
- attr_accessor :state
25
-
26
- # The name of task.
27
- attr_accessor :name
28
-
29
- # The logging correlation id associated with this task
30
- attr_accessor :logging_cid
31
-
32
- # User who dispatched this task.
33
- attr_accessor :created_by
34
-
35
- # Timestamp of the when this task started execution.
36
- attr_accessor :started_at
37
-
38
- # Timestamp of the when this task stopped execution.
39
- attr_accessor :finished_at
40
-
41
- # A JSON Object of a fatal error encountered during the execution of this task.
42
- attr_accessor :error
43
-
44
- # The worker associated with this task. This field is empty if a worker is not yet assigned.
45
- attr_accessor :worker
46
-
47
- # The parent task that spawned this task.
48
- attr_accessor :parent_task
49
-
50
- # Any tasks spawned by this task.
51
- attr_accessor :child_tasks
52
-
53
- # The task group that this task is a member of.
54
- attr_accessor :task_group
55
-
56
- attr_accessor :progress_reports
57
-
58
- # Resources created by this task.
59
- attr_accessor :created_resources
60
-
61
- # A list of resources required by that task.
62
- attr_accessor :reserved_resources_record
63
-
64
- # Attribute mapping from ruby-style variable name to JSON key.
65
- def self.attribute_map
66
- {
67
- :'pulp_href' => :'pulp_href',
68
- :'pulp_created' => :'pulp_created',
69
- :'state' => :'state',
70
- :'name' => :'name',
71
- :'logging_cid' => :'logging_cid',
72
- :'created_by' => :'created_by',
73
- :'started_at' => :'started_at',
74
- :'finished_at' => :'finished_at',
75
- :'error' => :'error',
76
- :'worker' => :'worker',
77
- :'parent_task' => :'parent_task',
78
- :'child_tasks' => :'child_tasks',
79
- :'task_group' => :'task_group',
80
- :'progress_reports' => :'progress_reports',
81
- :'created_resources' => :'created_resources',
82
- :'reserved_resources_record' => :'reserved_resources_record'
83
- }
84
- end
85
-
86
- # Attribute type mapping.
87
- def self.openapi_types
88
- {
89
- :'pulp_href' => :'String',
90
- :'pulp_created' => :'DateTime',
91
- :'state' => :'String',
92
- :'name' => :'String',
93
- :'logging_cid' => :'String',
94
- :'created_by' => :'String',
95
- :'started_at' => :'DateTime',
96
- :'finished_at' => :'DateTime',
97
- :'error' => :'Hash<String, Object>',
98
- :'worker' => :'String',
99
- :'parent_task' => :'String',
100
- :'child_tasks' => :'Array<String>',
101
- :'task_group' => :'String',
102
- :'progress_reports' => :'Array<ProgressReportResponse>',
103
- :'created_resources' => :'Array<String>',
104
- :'reserved_resources_record' => :'Array<String>'
105
- }
106
- end
107
-
108
- # List of attributes with nullable: true
109
- def self.openapi_nullable
110
- Set.new([
111
- ])
112
- end
113
-
114
- # Initializes the object
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- def initialize(attributes = {})
117
- if (!attributes.is_a?(Hash))
118
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::TaskResponse` initialize method"
119
- end
120
-
121
- # check to see if the attribute exists and convert string to symbol for hash key
122
- attributes = attributes.each_with_object({}) { |(k, v), h|
123
- if (!self.class.attribute_map.key?(k.to_sym))
124
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::TaskResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
125
- end
126
- h[k.to_sym] = v
127
- }
128
-
129
- if attributes.key?(:'pulp_href')
130
- self.pulp_href = attributes[:'pulp_href']
131
- end
132
-
133
- if attributes.key?(:'pulp_created')
134
- self.pulp_created = attributes[:'pulp_created']
135
- end
136
-
137
- if attributes.key?(:'state')
138
- self.state = attributes[:'state']
139
- end
140
-
141
- if attributes.key?(:'name')
142
- self.name = attributes[:'name']
143
- end
144
-
145
- if attributes.key?(:'logging_cid')
146
- self.logging_cid = attributes[:'logging_cid']
147
- end
148
-
149
- if attributes.key?(:'created_by')
150
- self.created_by = attributes[:'created_by']
151
- end
152
-
153
- if attributes.key?(:'started_at')
154
- self.started_at = attributes[:'started_at']
155
- end
156
-
157
- if attributes.key?(:'finished_at')
158
- self.finished_at = attributes[:'finished_at']
159
- end
160
-
161
- if attributes.key?(:'error')
162
- if (value = attributes[:'error']).is_a?(Hash)
163
- self.error = value
164
- end
165
- end
166
-
167
- if attributes.key?(:'worker')
168
- self.worker = attributes[:'worker']
169
- end
170
-
171
- if attributes.key?(:'parent_task')
172
- self.parent_task = attributes[:'parent_task']
173
- end
174
-
175
- if attributes.key?(:'child_tasks')
176
- if (value = attributes[:'child_tasks']).is_a?(Array)
177
- self.child_tasks = value
178
- end
179
- end
180
-
181
- if attributes.key?(:'task_group')
182
- self.task_group = attributes[:'task_group']
183
- end
184
-
185
- if attributes.key?(:'progress_reports')
186
- if (value = attributes[:'progress_reports']).is_a?(Array)
187
- self.progress_reports = value
188
- end
189
- end
190
-
191
- if attributes.key?(:'created_resources')
192
- if (value = attributes[:'created_resources']).is_a?(Array)
193
- self.created_resources = value
194
- end
195
- end
196
-
197
- if attributes.key?(:'reserved_resources_record')
198
- if (value = attributes[:'reserved_resources_record']).is_a?(Array)
199
- self.reserved_resources_record = value
200
- end
201
- end
202
- end
203
-
204
- # Show invalid properties with the reasons. Usually used together with valid?
205
- # @return Array for valid properties with the reasons
206
- def list_invalid_properties
207
- invalid_properties = Array.new
208
- if @name.nil?
209
- invalid_properties.push('invalid value for "name", name cannot be nil.')
210
- end
211
-
212
- if @logging_cid.nil?
213
- invalid_properties.push('invalid value for "logging_cid", logging_cid cannot be nil.')
214
- end
215
-
216
- invalid_properties
217
- end
218
-
219
- # Check to see if the all the properties in the model are valid
220
- # @return true if the model is valid
221
- def valid?
222
- return false if @name.nil?
223
- return false if @logging_cid.nil?
224
- true
225
- end
226
-
227
- # Checks equality by comparing each attribute.
228
- # @param [Object] Object to be compared
229
- def ==(o)
230
- return true if self.equal?(o)
231
- self.class == o.class &&
232
- pulp_href == o.pulp_href &&
233
- pulp_created == o.pulp_created &&
234
- state == o.state &&
235
- name == o.name &&
236
- logging_cid == o.logging_cid &&
237
- created_by == o.created_by &&
238
- started_at == o.started_at &&
239
- finished_at == o.finished_at &&
240
- error == o.error &&
241
- worker == o.worker &&
242
- parent_task == o.parent_task &&
243
- child_tasks == o.child_tasks &&
244
- task_group == o.task_group &&
245
- progress_reports == o.progress_reports &&
246
- created_resources == o.created_resources &&
247
- reserved_resources_record == o.reserved_resources_record
248
- end
249
-
250
- # @see the `==` method
251
- # @param [Object] Object to be compared
252
- def eql?(o)
253
- self == o
254
- end
255
-
256
- # Calculates hash code according to all attributes.
257
- # @return [Integer] Hash code
258
- def hash
259
- [pulp_href, pulp_created, state, name, logging_cid, created_by, started_at, finished_at, error, worker, parent_task, child_tasks, task_group, progress_reports, created_resources, reserved_resources_record].hash
260
- end
261
-
262
- # Builds the object from hash
263
- # @param [Hash] attributes Model attributes in the form of hash
264
- # @return [Object] Returns the model itself
265
- def self.build_from_hash(attributes)
266
- new.build_from_hash(attributes)
267
- end
268
-
269
- # Builds the object from hash
270
- # @param [Hash] attributes Model attributes in the form of hash
271
- # @return [Object] Returns the model itself
272
- def build_from_hash(attributes)
273
- return nil unless attributes.is_a?(Hash)
274
- self.class.openapi_types.each_pair do |key, type|
275
- if type =~ /\AArray<(.*)>/i
276
- # check to ensure the input is an array given that the attribute
277
- # is documented as an array but the input is not
278
- if attributes[self.class.attribute_map[key]].is_a?(Array)
279
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
280
- end
281
- elsif !attributes[self.class.attribute_map[key]].nil?
282
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
283
- end # or else data not found in attributes(hash), not an issue as the data can be optional
284
- end
285
-
286
- self
287
- end
288
-
289
- # Deserializes the data based on type
290
- # @param string type Data type
291
- # @param string value Value to be deserialized
292
- # @return [Object] Deserialized data
293
- def _deserialize(type, value)
294
- case type.to_sym
295
- when :DateTime
296
- DateTime.parse(value)
297
- when :Date
298
- Date.parse(value)
299
- when :String
300
- value.to_s
301
- when :Integer
302
- value.to_i
303
- when :Float
304
- value.to_f
305
- when :Boolean
306
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
307
- true
308
- else
309
- false
310
- end
311
- when :Object
312
- # generic object (usually a Hash), return directly
313
- value
314
- when /\AArray<(?<inner_type>.+)>\z/
315
- inner_type = Regexp.last_match[:inner_type]
316
- value.map { |v| _deserialize(inner_type, v) }
317
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
318
- k_type = Regexp.last_match[:k_type]
319
- v_type = Regexp.last_match[:v_type]
320
- {}.tap do |hash|
321
- value.each do |k, v|
322
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
323
- end
324
- end
325
- else # model
326
- PulpAnsibleClient.const_get(type).build_from_hash(value)
327
- end
328
- end
329
-
330
- # Returns the string representation of the object
331
- # @return [String] String presentation of the object
332
- def to_s
333
- to_hash.to_s
334
- end
335
-
336
- # to_body is an alias to to_hash (backward compatibility)
337
- # @return [Hash] Returns the object in the form of hash
338
- def to_body
339
- to_hash
340
- end
341
-
342
- # Returns the object in the form of hash
343
- # @return [Hash] Returns the object in the form of hash
344
- def to_hash
345
- hash = {}
346
- self.class.attribute_map.each_pair do |attr, param|
347
- value = self.send(attr)
348
- if value.nil?
349
- is_nullable = self.class.openapi_nullable.include?(attr)
350
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
- end
352
-
353
- hash[param] = _to_hash(value)
354
- end
355
- hash
356
- end
357
-
358
- # Outputs non-array value in the form of hash
359
- # For object, use to_hash. Otherwise, just return the value
360
- # @param [Object] value Any valid value
361
- # @return [Hash] Returns the value in the form of hash
362
- def _to_hash(value)
363
- if value.is_a?(Array)
364
- value.compact.map { |v| _to_hash(v) }
365
- elsif value.is_a?(Hash)
366
- {}.tap do |hash|
367
- value.each { |k, v| hash[k] = _to_hash(v) }
368
- end
369
- elsif value.respond_to? :to_hash
370
- value.to_hash
371
- else
372
- value
373
- end
374
- end
375
- end
376
- end
@@ -1,131 +0,0 @@
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
- OpenAPI Generator version: 4.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpAnsibleClient::TaskResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'TaskResponse' do
21
- before do
22
- # run before each test
23
- @instance = PulpAnsibleClient::TaskResponse.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of TaskResponse' do
31
- it 'should create an instance of TaskResponse' do
32
- expect(@instance).to be_instance_of(PulpAnsibleClient::TaskResponse)
33
- end
34
- end
35
- describe 'test attribute "pulp_href"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "pulp_created"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "state"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- describe 'test attribute "name"' do
54
- it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- describe 'test attribute "logging_cid"' do
60
- it 'should work' do
61
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
- end
63
- end
64
-
65
- describe 'test attribute "created_by"' do
66
- it 'should work' do
67
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
- end
69
- end
70
-
71
- describe 'test attribute "started_at"' do
72
- it 'should work' do
73
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
- end
75
- end
76
-
77
- describe 'test attribute "finished_at"' do
78
- it 'should work' do
79
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
- end
81
- end
82
-
83
- describe 'test attribute "error"' do
84
- it 'should work' do
85
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
- end
87
- end
88
-
89
- describe 'test attribute "worker"' do
90
- it 'should work' do
91
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
- end
93
- end
94
-
95
- describe 'test attribute "parent_task"' do
96
- it 'should work' do
97
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
- end
99
- end
100
-
101
- describe 'test attribute "child_tasks"' do
102
- it 'should work' do
103
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
- end
105
- end
106
-
107
- describe 'test attribute "task_group"' do
108
- it 'should work' do
109
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
- end
111
- end
112
-
113
- describe 'test attribute "progress_reports"' do
114
- it 'should work' do
115
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
116
- end
117
- end
118
-
119
- describe 'test attribute "created_resources"' do
120
- it 'should work' do
121
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
- end
123
- end
124
-
125
- describe 'test attribute "reserved_resources_record"' do
126
- it 'should work' do
127
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
- end
129
- end
130
-
131
- end