pulpcore_client 3.3.1 → 3.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -14
  3. data/docs/{Artifact.md → ArtifactRead.md} +2 -2
  4. data/docs/ArtifactsApi.md +5 -5
  5. data/docs/ExportersCoreExportsApi.md +13 -13
  6. data/docs/ExportersPulpApi.md +9 -9
  7. data/docs/{Import.md → ImportRead.md} +2 -2
  8. data/docs/ImportersCoreImportsApi.md +13 -13
  9. data/docs/ImportersPulpApi.md +9 -9
  10. data/docs/InlineResponse200.md +1 -1
  11. data/docs/InlineResponse2001.md +1 -1
  12. data/docs/InlineResponse2002.md +1 -1
  13. data/docs/InlineResponse2003.md +1 -1
  14. data/docs/InlineResponse2004.md +1 -1
  15. data/docs/InlineResponse2005.md +1 -1
  16. data/docs/InlineResponse2006.md +1 -1
  17. data/docs/InlineResponse2007.md +1 -1
  18. data/docs/InlineResponse2008.md +1 -1
  19. data/docs/InlineResponse2009.md +1 -1
  20. data/docs/OrphansApi.md +1 -1
  21. data/docs/PulpExport.md +12 -6
  22. data/docs/PulpExportRead.md +27 -0
  23. data/docs/PulpExporterRead.md +27 -0
  24. data/docs/PulpImporterRead.md +23 -0
  25. data/docs/{SigningService.md → SigningServiceRead.md} +2 -2
  26. data/docs/SigningServicesApi.md +3 -3
  27. data/docs/StatusApi.md +1 -1
  28. data/docs/{TaskGroup.md → TaskGroupRead.md} +4 -2
  29. data/docs/TaskGroupsApi.md +3 -3
  30. data/docs/TaskRead.md +43 -0
  31. data/docs/TasksApi.md +3 -3
  32. data/docs/{UploadDetail.md → UploadDetailRead.md} +2 -2
  33. data/docs/UploadRead.md +23 -0
  34. data/docs/UploadsApi.md +5 -5
  35. data/docs/Worker.md +3 -3
  36. data/docs/WorkerRead.md +23 -0
  37. data/docs/WorkersApi.md +3 -3
  38. data/lib/pulpcore_client/api/artifacts_api.rb +6 -6
  39. data/lib/pulpcore_client/api/exporters_core_exports_api.rb +21 -21
  40. data/lib/pulpcore_client/api/exporters_pulp_api.rb +12 -12
  41. data/lib/pulpcore_client/api/importers_core_imports_api.rb +21 -21
  42. data/lib/pulpcore_client/api/importers_pulp_api.rb +12 -12
  43. data/lib/pulpcore_client/api/signing_services_api.rb +3 -3
  44. data/lib/pulpcore_client/api/task_groups_api.rb +3 -3
  45. data/lib/pulpcore_client/api/tasks_api.rb +3 -3
  46. data/lib/pulpcore_client/api/uploads_api.rb +6 -6
  47. data/lib/pulpcore_client/api/workers_api.rb +3 -3
  48. data/lib/pulpcore_client/configuration.rb +2 -2
  49. data/lib/pulpcore_client/models/{artifact.rb → artifact_read.rb} +3 -3
  50. data/lib/pulpcore_client/models/{import.rb → import_read.rb} +3 -3
  51. data/lib/pulpcore_client/models/inline_response200.rb +1 -1
  52. data/lib/pulpcore_client/models/inline_response2001.rb +1 -1
  53. data/lib/pulpcore_client/models/inline_response2002.rb +1 -1
  54. data/lib/pulpcore_client/models/inline_response2003.rb +1 -1
  55. data/lib/pulpcore_client/models/inline_response2004.rb +1 -1
  56. data/lib/pulpcore_client/models/inline_response2005.rb +1 -1
  57. data/lib/pulpcore_client/models/inline_response2006.rb +1 -1
  58. data/lib/pulpcore_client/models/inline_response2007.rb +1 -1
  59. data/lib/pulpcore_client/models/inline_response2008.rb +1 -1
  60. data/lib/pulpcore_client/models/inline_response2009.rb +1 -1
  61. data/lib/pulpcore_client/models/pulp_export.rb +59 -49
  62. data/lib/pulpcore_client/models/pulp_export_read.rb +259 -0
  63. data/lib/pulpcore_client/models/pulp_exporter.rb +1 -0
  64. data/lib/pulpcore_client/models/pulp_exporter_read.rb +311 -0
  65. data/lib/pulpcore_client/models/pulp_importer_read.rb +262 -0
  66. data/lib/pulpcore_client/models/{signing_service.rb → signing_service_read.rb} +3 -3
  67. data/lib/pulpcore_client/models/{task_group.rb → task_group_read.rb} +19 -4
  68. data/lib/pulpcore_client/models/task_read.rb +383 -0
  69. data/lib/pulpcore_client/models/{upload_detail.rb → upload_detail_read.rb} +3 -3
  70. data/lib/pulpcore_client/models/upload_read.rb +241 -0
  71. data/lib/pulpcore_client/models/worker.rb +10 -10
  72. data/lib/pulpcore_client/models/worker_read.rb +251 -0
  73. data/lib/pulpcore_client/version.rb +1 -1
  74. data/lib/pulpcore_client.rb +11 -5
  75. data/spec/api/artifacts_api_spec.rb +2 -2
  76. data/spec/api/exporters_core_exports_api_spec.rb +3 -3
  77. data/spec/api/exporters_pulp_api_spec.rb +4 -4
  78. data/spec/api/importers_core_imports_api_spec.rb +3 -3
  79. data/spec/api/importers_pulp_api_spec.rb +4 -4
  80. data/spec/api/signing_services_api_spec.rb +1 -1
  81. data/spec/api/task_groups_api_spec.rb +1 -1
  82. data/spec/api/tasks_api_spec.rb +1 -1
  83. data/spec/api/uploads_api_spec.rb +2 -2
  84. data/spec/api/workers_api_spec.rb +1 -1
  85. data/spec/configuration_spec.rb +3 -3
  86. data/spec/models/{artifact_spec.rb → artifact_read_spec.rb} +6 -6
  87. data/spec/models/{import_spec.rb → import_read_spec.rb} +6 -6
  88. data/spec/models/pulp_export_read_spec.rb +71 -0
  89. data/spec/models/pulp_export_spec.rb +20 -2
  90. data/spec/models/pulp_exporter_read_spec.rb +71 -0
  91. data/spec/models/pulp_importer_read_spec.rb +59 -0
  92. data/spec/models/{signing_service_spec.rb → signing_service_read_spec.rb} +6 -6
  93. data/spec/models/{task_group_spec.rb → task_group_read_spec.rb} +12 -6
  94. data/spec/models/task_read_spec.rb +119 -0
  95. data/spec/models/{upload_detail_spec.rb → upload_detail_read_spec.rb} +6 -6
  96. data/spec/models/upload_read_spec.rb +59 -0
  97. data/spec/models/worker_read_spec.rb +59 -0
  98. data/spec/models/worker_spec.rb +2 -2
  99. metadata +46 -22
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<Upload>'
41
+ :'results' => :'Array<UploadRead>'
42
42
  }
43
43
  end
44
44
 
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<Worker>'
41
+ :'results' => :'Array<WorkerRead>'
42
42
  }
43
43
  end
44
44
 
@@ -28,11 +28,20 @@ module PulpcoreClient
28
28
  # Any additional parameters that were used to create the export.
29
29
  attr_accessor :params
30
30
 
31
- # The SHA-256 checksum of the exported .tar.gz.
32
- attr_accessor :sha256
31
+ # Do a Full (true) or Incremental (false) export.
32
+ attr_accessor :full
33
33
 
34
- # The full-path filename of the exported .tar.gz.
35
- attr_accessor :filename
34
+ # Generate report on what would be exported and disk-space required.
35
+ attr_accessor :dry_run
36
+
37
+ # List of explicit repo-version hrefs to export
38
+ attr_accessor :versions
39
+
40
+ # Chunk export-tarfile into pieces of chunk_size bytes.Recognizes units of B/KB/MB/GB/TB.
41
+ attr_accessor :chunk_size
42
+
43
+ # Dictionary of filename: sha256hash entries for export-output-file(s)
44
+ attr_accessor :output_file_info
36
45
 
37
46
  # Attribute mapping from ruby-style variable name to JSON key.
38
47
  def self.attribute_map
@@ -42,8 +51,11 @@ module PulpcoreClient
42
51
  :'task' => :'task',
43
52
  :'exported_resources' => :'exported_resources',
44
53
  :'params' => :'params',
45
- :'sha256' => :'sha256',
46
- :'filename' => :'filename'
54
+ :'full' => :'full',
55
+ :'dry_run' => :'dry_run',
56
+ :'versions' => :'versions',
57
+ :'chunk_size' => :'chunk_size',
58
+ :'output_file_info' => :'output_file_info'
47
59
  }
48
60
  end
49
61
 
@@ -55,16 +67,18 @@ module PulpcoreClient
55
67
  :'task' => :'String',
56
68
  :'exported_resources' => :'Array<Object>',
57
69
  :'params' => :'Object',
58
- :'sha256' => :'String',
59
- :'filename' => :'String'
70
+ :'full' => :'Boolean',
71
+ :'dry_run' => :'Boolean',
72
+ :'versions' => :'Array<String>',
73
+ :'chunk_size' => :'String',
74
+ :'output_file_info' => :'Object'
60
75
  }
61
76
  end
62
77
 
63
78
  # List of attributes with nullable: true
64
79
  def self.openapi_nullable
65
80
  Set.new([
66
- :'sha256',
67
- :'filename'
81
+ :'task',
68
82
  ])
69
83
  end
70
84
 
@@ -105,33 +119,39 @@ module PulpcoreClient
105
119
  self.params = attributes[:'params']
106
120
  end
107
121
 
108
- if attributes.key?(:'sha256')
109
- self.sha256 = attributes[:'sha256']
122
+ if attributes.key?(:'full')
123
+ self.full = attributes[:'full']
124
+ else
125
+ self.full = true
110
126
  end
111
127
 
112
- if attributes.key?(:'filename')
113
- self.filename = attributes[:'filename']
128
+ if attributes.key?(:'dry_run')
129
+ self.dry_run = attributes[:'dry_run']
130
+ else
131
+ self.dry_run = false
114
132
  end
115
- end
116
133
 
117
- # Show invalid properties with the reasons. Usually used together with valid?
118
- # @return Array for valid properties with the reasons
119
- def list_invalid_properties
120
- invalid_properties = Array.new
121
- if @task.nil?
122
- invalid_properties.push('invalid value for "task", task cannot be nil.')
134
+ if attributes.key?(:'versions')
135
+ if (value = attributes[:'versions']).is_a?(Array)
136
+ self.versions = value
137
+ end
123
138
  end
124
139
 
125
- if @params.nil?
126
- invalid_properties.push('invalid value for "params", params cannot be nil.')
140
+ if attributes.key?(:'chunk_size')
141
+ self.chunk_size = attributes[:'chunk_size']
127
142
  end
128
143
 
129
- if !@sha256.nil? && @sha256.to_s.length < 1
130
- invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
144
+ if attributes.key?(:'output_file_info')
145
+ self.output_file_info = attributes[:'output_file_info']
131
146
  end
147
+ end
132
148
 
133
- if !@filename.nil? && @filename.to_s.length < 1
134
- invalid_properties.push('invalid value for "filename", the character length must be great than or equal to 1.')
149
+ # Show invalid properties with the reasons. Usually used together with valid?
150
+ # @return Array for valid properties with the reasons
151
+ def list_invalid_properties
152
+ invalid_properties = Array.new
153
+ if !@chunk_size.nil? && @chunk_size.to_s.length < 1
154
+ invalid_properties.push('invalid value for "chunk_size", the character length must be great than or equal to 1.')
135
155
  end
136
156
 
137
157
  invalid_properties
@@ -140,31 +160,18 @@ module PulpcoreClient
140
160
  # Check to see if the all the properties in the model are valid
141
161
  # @return true if the model is valid
142
162
  def valid?
143
- return false if @task.nil?
144
- return false if @params.nil?
145
- return false if !@sha256.nil? && @sha256.to_s.length < 1
146
- return false if !@filename.nil? && @filename.to_s.length < 1
163
+ return false if !@chunk_size.nil? && @chunk_size.to_s.length < 1
147
164
  true
148
165
  end
149
166
 
150
167
  # Custom attribute writer method with validation
151
- # @param [Object] sha256 Value to be assigned
152
- def sha256=(sha256)
153
- if !sha256.nil? && sha256.to_s.length < 1
154
- fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
155
- end
156
-
157
- @sha256 = sha256
158
- end
159
-
160
- # Custom attribute writer method with validation
161
- # @param [Object] filename Value to be assigned
162
- def filename=(filename)
163
- if !filename.nil? && filename.to_s.length < 1
164
- fail ArgumentError, 'invalid value for "filename", the character length must be great than or equal to 1.'
168
+ # @param [Object] chunk_size Value to be assigned
169
+ def chunk_size=(chunk_size)
170
+ if !chunk_size.nil? && chunk_size.to_s.length < 1
171
+ fail ArgumentError, 'invalid value for "chunk_size", the character length must be great than or equal to 1.'
165
172
  end
166
173
 
167
- @filename = filename
174
+ @chunk_size = chunk_size
168
175
  end
169
176
 
170
177
  # Checks equality by comparing each attribute.
@@ -177,8 +184,11 @@ module PulpcoreClient
177
184
  task == o.task &&
178
185
  exported_resources == o.exported_resources &&
179
186
  params == o.params &&
180
- sha256 == o.sha256 &&
181
- filename == o.filename
187
+ full == o.full &&
188
+ dry_run == o.dry_run &&
189
+ versions == o.versions &&
190
+ chunk_size == o.chunk_size &&
191
+ output_file_info == o.output_file_info
182
192
  end
183
193
 
184
194
  # @see the `==` method
@@ -190,7 +200,7 @@ module PulpcoreClient
190
200
  # Calculates hash code according to all attributes.
191
201
  # @return [Integer] Hash code
192
202
  def hash
193
- [pulp_href, pulp_created, task, exported_resources, params, sha256, filename].hash
203
+ [pulp_href, pulp_created, task, exported_resources, params, full, dry_run, versions, chunk_size, output_file_info].hash
194
204
  end
195
205
 
196
206
  # Builds the object from hash
@@ -0,0 +1,259 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ class PulpExportRead
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ # A URI of the task that ran the Export.
23
+ attr_accessor :task
24
+
25
+ # Resources that were exported.
26
+ attr_accessor :exported_resources
27
+
28
+ # Any additional parameters that were used to create the export.
29
+ attr_accessor :params
30
+
31
+ # Dictionary of filename: sha256hash entries for export-output-file(s)
32
+ attr_accessor :output_file_info
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'pulp_href' => :'pulp_href',
38
+ :'pulp_created' => :'pulp_created',
39
+ :'task' => :'task',
40
+ :'exported_resources' => :'exported_resources',
41
+ :'params' => :'params',
42
+ :'output_file_info' => :'output_file_info'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'pulp_href' => :'String',
50
+ :'pulp_created' => :'DateTime',
51
+ :'task' => :'String',
52
+ :'exported_resources' => :'Array<Object>',
53
+ :'params' => :'Object',
54
+ :'output_file_info' => :'Object'
55
+ }
56
+ end
57
+
58
+ # List of attributes with nullable: true
59
+ def self.openapi_nullable
60
+ Set.new([
61
+ :'task',
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PulpExportRead` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PulpExportRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'pulp_href')
81
+ self.pulp_href = attributes[:'pulp_href']
82
+ end
83
+
84
+ if attributes.key?(:'pulp_created')
85
+ self.pulp_created = attributes[:'pulp_created']
86
+ end
87
+
88
+ if attributes.key?(:'task')
89
+ self.task = attributes[:'task']
90
+ end
91
+
92
+ if attributes.key?(:'exported_resources')
93
+ if (value = attributes[:'exported_resources']).is_a?(Array)
94
+ self.exported_resources = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'params')
99
+ self.params = attributes[:'params']
100
+ end
101
+
102
+ if attributes.key?(:'output_file_info')
103
+ self.output_file_info = attributes[:'output_file_info']
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ invalid_properties = Array.new
111
+ invalid_properties
112
+ end
113
+
114
+ # Check to see if the all the properties in the model are valid
115
+ # @return true if the model is valid
116
+ def valid?
117
+ true
118
+ end
119
+
120
+ # Checks equality by comparing each attribute.
121
+ # @param [Object] Object to be compared
122
+ def ==(o)
123
+ return true if self.equal?(o)
124
+ self.class == o.class &&
125
+ pulp_href == o.pulp_href &&
126
+ pulp_created == o.pulp_created &&
127
+ task == o.task &&
128
+ exported_resources == o.exported_resources &&
129
+ params == o.params &&
130
+ output_file_info == o.output_file_info
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [pulp_href, pulp_created, task, exported_resources, params, output_file_info].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ PulpcoreClient.const_get(type).build_from_hash(value)
210
+ end
211
+ end
212
+
213
+ # Returns the string representation of the object
214
+ # @return [String] String presentation of the object
215
+ def to_s
216
+ to_hash.to_s
217
+ end
218
+
219
+ # to_body is an alias to to_hash (backward compatibility)
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_body
222
+ to_hash
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ # Outputs non-array value in the form of hash
242
+ # For object, use to_hash. Otherwise, just return the value
243
+ # @param [Object] value Any valid value
244
+ # @return [Hash] Returns the value in the form of hash
245
+ def _to_hash(value)
246
+ if value.is_a?(Array)
247
+ value.compact.map { |v| _to_hash(v) }
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.each { |k, v| hash[k] = _to_hash(v) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash
254
+ else
255
+ value
256
+ end
257
+ end
258
+ end
259
+ end
@@ -57,6 +57,7 @@ module PulpcoreClient
57
57
  # List of attributes with nullable: true
58
58
  def self.openapi_nullable
59
59
  Set.new([
60
+ :'last_export'
60
61
  ])
61
62
  end
62
63