pulp_2to3_migration_client 0.0.1a1.dev01569436440
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +110 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/MigrationPlan.md +21 -0
- data/docs/MigrationPlanRun.md +17 -0
- data/docs/MigrationPlansApi.md +289 -0
- data/docs/Pulp2Content.md +31 -0
- data/docs/Pulp2contentApi.md +148 -0
- data/git_push.sh +58 -0
- data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +346 -0
- data/lib/pulp_2to3_migration_client/api/pulp2content_api.rb +185 -0
- data/lib/pulp_2to3_migration_client/api_client.rb +402 -0
- data/lib/pulp_2to3_migration_client/api_error.rb +57 -0
- data/lib/pulp_2to3_migration_client/configuration.rb +243 -0
- data/lib/pulp_2to3_migration_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_2to3_migration_client/models/inline_response200.rb +235 -0
- data/lib/pulp_2to3_migration_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_2to3_migration_client/models/migration_plan.rb +221 -0
- data/lib/pulp_2to3_migration_client/models/migration_plan_run.rb +199 -0
- data/lib/pulp_2to3_migration_client/models/pulp2_content.rb +357 -0
- data/lib/pulp_2to3_migration_client/version.rb +15 -0
- data/lib/pulp_2to3_migration_client.rb +47 -0
- data/pulp_2to3_migration_client.gemspec +39 -0
- data/spec/api/migration_plans_api_spec.rb +99 -0
- data/spec/api/pulp2content_api_spec.rb +73 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/migration_plan_run_spec.rb +41 -0
- data/spec/models/migration_plan_spec.rb +53 -0
- data/spec/models/pulp2_content_spec.rb +83 -0
- data/spec/spec_helper.rb +111 -0
- metadata +146 -0
@@ -0,0 +1,357 @@
|
|
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.1.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module Pulp2to3MigrationClient
|
16
|
+
class Pulp2Content
|
17
|
+
attr_accessor :_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :_created
|
21
|
+
|
22
|
+
attr_accessor :pulp2_id
|
23
|
+
|
24
|
+
attr_accessor :pulp2_content_type_id
|
25
|
+
|
26
|
+
attr_accessor :pulp2_last_updated
|
27
|
+
|
28
|
+
attr_accessor :pulp2_storage_path
|
29
|
+
|
30
|
+
attr_accessor :downloaded
|
31
|
+
|
32
|
+
attr_accessor :pulp3_content
|
33
|
+
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
+
def self.attribute_map
|
36
|
+
{
|
37
|
+
:'_href' => :'_href',
|
38
|
+
:'_created' => :'_created',
|
39
|
+
:'pulp2_id' => :'pulp2_id',
|
40
|
+
:'pulp2_content_type_id' => :'pulp2_content_type_id',
|
41
|
+
:'pulp2_last_updated' => :'pulp2_last_updated',
|
42
|
+
:'pulp2_storage_path' => :'pulp2_storage_path',
|
43
|
+
:'downloaded' => :'downloaded',
|
44
|
+
:'pulp3_content' => :'pulp3_content'
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
# Attribute type mapping.
|
49
|
+
def self.openapi_types
|
50
|
+
{
|
51
|
+
:'_href' => :'String',
|
52
|
+
:'_created' => :'DateTime',
|
53
|
+
:'pulp2_id' => :'String',
|
54
|
+
:'pulp2_content_type_id' => :'String',
|
55
|
+
:'pulp2_last_updated' => :'Integer',
|
56
|
+
:'pulp2_storage_path' => :'String',
|
57
|
+
:'downloaded' => :'Boolean',
|
58
|
+
:'pulp3_content' => :'String'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2Content` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2Content`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'_href')
|
78
|
+
self._href = attributes[:'_href']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'_created')
|
82
|
+
self._created = attributes[:'_created']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'pulp2_id')
|
86
|
+
self.pulp2_id = attributes[:'pulp2_id']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'pulp2_content_type_id')
|
90
|
+
self.pulp2_content_type_id = attributes[:'pulp2_content_type_id']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'pulp2_last_updated')
|
94
|
+
self.pulp2_last_updated = attributes[:'pulp2_last_updated']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'pulp2_storage_path')
|
98
|
+
self.pulp2_storage_path = attributes[:'pulp2_storage_path']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'downloaded')
|
102
|
+
self.downloaded = attributes[:'downloaded']
|
103
|
+
else
|
104
|
+
self.downloaded = false
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'pulp3_content')
|
108
|
+
self.pulp3_content = attributes[:'pulp3_content']
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
113
|
+
# @return Array for valid properties with the reasons
|
114
|
+
def list_invalid_properties
|
115
|
+
invalid_properties = Array.new
|
116
|
+
if @pulp2_id.nil?
|
117
|
+
invalid_properties.push('invalid value for "pulp2_id", pulp2_id cannot be nil.')
|
118
|
+
end
|
119
|
+
|
120
|
+
if @pulp2_id.to_s.length > 255
|
121
|
+
invalid_properties.push('invalid value for "pulp2_id", the character length must be smaller than or equal to 255.')
|
122
|
+
end
|
123
|
+
|
124
|
+
if @pulp2_id.to_s.length < 1
|
125
|
+
invalid_properties.push('invalid value for "pulp2_id", the character length must be great than or equal to 1.')
|
126
|
+
end
|
127
|
+
|
128
|
+
if @pulp2_content_type_id.nil?
|
129
|
+
invalid_properties.push('invalid value for "pulp2_content_type_id", pulp2_content_type_id cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if @pulp2_content_type_id.to_s.length > 255
|
133
|
+
invalid_properties.push('invalid value for "pulp2_content_type_id", the character length must be smaller than or equal to 255.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if @pulp2_content_type_id.to_s.length < 1
|
137
|
+
invalid_properties.push('invalid value for "pulp2_content_type_id", the character length must be great than or equal to 1.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if @pulp2_last_updated.nil?
|
141
|
+
invalid_properties.push('invalid value for "pulp2_last_updated", pulp2_last_updated cannot be nil.')
|
142
|
+
end
|
143
|
+
|
144
|
+
if @pulp2_storage_path.nil?
|
145
|
+
invalid_properties.push('invalid value for "pulp2_storage_path", pulp2_storage_path cannot be nil.')
|
146
|
+
end
|
147
|
+
|
148
|
+
if @pulp2_storage_path.to_s.length < 1
|
149
|
+
invalid_properties.push('invalid value for "pulp2_storage_path", the character length must be great than or equal to 1.')
|
150
|
+
end
|
151
|
+
|
152
|
+
invalid_properties
|
153
|
+
end
|
154
|
+
|
155
|
+
# Check to see if the all the properties in the model are valid
|
156
|
+
# @return true if the model is valid
|
157
|
+
def valid?
|
158
|
+
return false if @pulp2_id.nil?
|
159
|
+
return false if @pulp2_id.to_s.length > 255
|
160
|
+
return false if @pulp2_id.to_s.length < 1
|
161
|
+
return false if @pulp2_content_type_id.nil?
|
162
|
+
return false if @pulp2_content_type_id.to_s.length > 255
|
163
|
+
return false if @pulp2_content_type_id.to_s.length < 1
|
164
|
+
return false if @pulp2_last_updated.nil?
|
165
|
+
return false if @pulp2_storage_path.nil?
|
166
|
+
return false if @pulp2_storage_path.to_s.length < 1
|
167
|
+
true
|
168
|
+
end
|
169
|
+
|
170
|
+
# Custom attribute writer method with validation
|
171
|
+
# @param [Object] pulp2_id Value to be assigned
|
172
|
+
def pulp2_id=(pulp2_id)
|
173
|
+
if pulp2_id.nil?
|
174
|
+
fail ArgumentError, 'pulp2_id cannot be nil'
|
175
|
+
end
|
176
|
+
|
177
|
+
if pulp2_id.to_s.length > 255
|
178
|
+
fail ArgumentError, 'invalid value for "pulp2_id", the character length must be smaller than or equal to 255.'
|
179
|
+
end
|
180
|
+
|
181
|
+
if pulp2_id.to_s.length < 1
|
182
|
+
fail ArgumentError, 'invalid value for "pulp2_id", the character length must be great than or equal to 1.'
|
183
|
+
end
|
184
|
+
|
185
|
+
@pulp2_id = pulp2_id
|
186
|
+
end
|
187
|
+
|
188
|
+
# Custom attribute writer method with validation
|
189
|
+
# @param [Object] pulp2_content_type_id Value to be assigned
|
190
|
+
def pulp2_content_type_id=(pulp2_content_type_id)
|
191
|
+
if pulp2_content_type_id.nil?
|
192
|
+
fail ArgumentError, 'pulp2_content_type_id cannot be nil'
|
193
|
+
end
|
194
|
+
|
195
|
+
if pulp2_content_type_id.to_s.length > 255
|
196
|
+
fail ArgumentError, 'invalid value for "pulp2_content_type_id", the character length must be smaller than or equal to 255.'
|
197
|
+
end
|
198
|
+
|
199
|
+
if pulp2_content_type_id.to_s.length < 1
|
200
|
+
fail ArgumentError, 'invalid value for "pulp2_content_type_id", the character length must be great than or equal to 1.'
|
201
|
+
end
|
202
|
+
|
203
|
+
@pulp2_content_type_id = pulp2_content_type_id
|
204
|
+
end
|
205
|
+
|
206
|
+
# Custom attribute writer method with validation
|
207
|
+
# @param [Object] pulp2_storage_path Value to be assigned
|
208
|
+
def pulp2_storage_path=(pulp2_storage_path)
|
209
|
+
if pulp2_storage_path.nil?
|
210
|
+
fail ArgumentError, 'pulp2_storage_path cannot be nil'
|
211
|
+
end
|
212
|
+
|
213
|
+
if pulp2_storage_path.to_s.length < 1
|
214
|
+
fail ArgumentError, 'invalid value for "pulp2_storage_path", the character length must be great than or equal to 1.'
|
215
|
+
end
|
216
|
+
|
217
|
+
@pulp2_storage_path = pulp2_storage_path
|
218
|
+
end
|
219
|
+
|
220
|
+
# Checks equality by comparing each attribute.
|
221
|
+
# @param [Object] Object to be compared
|
222
|
+
def ==(o)
|
223
|
+
return true if self.equal?(o)
|
224
|
+
self.class == o.class &&
|
225
|
+
_href == o._href &&
|
226
|
+
_created == o._created &&
|
227
|
+
pulp2_id == o.pulp2_id &&
|
228
|
+
pulp2_content_type_id == o.pulp2_content_type_id &&
|
229
|
+
pulp2_last_updated == o.pulp2_last_updated &&
|
230
|
+
pulp2_storage_path == o.pulp2_storage_path &&
|
231
|
+
downloaded == o.downloaded &&
|
232
|
+
pulp3_content == o.pulp3_content
|
233
|
+
end
|
234
|
+
|
235
|
+
# @see the `==` method
|
236
|
+
# @param [Object] Object to be compared
|
237
|
+
def eql?(o)
|
238
|
+
self == o
|
239
|
+
end
|
240
|
+
|
241
|
+
# Calculates hash code according to all attributes.
|
242
|
+
# @return [Integer] Hash code
|
243
|
+
def hash
|
244
|
+
[_href, _created, pulp2_id, pulp2_content_type_id, pulp2_last_updated, pulp2_storage_path, downloaded, pulp3_content].hash
|
245
|
+
end
|
246
|
+
|
247
|
+
# Builds the object from hash
|
248
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
249
|
+
# @return [Object] Returns the model itself
|
250
|
+
def self.build_from_hash(attributes)
|
251
|
+
new.build_from_hash(attributes)
|
252
|
+
end
|
253
|
+
|
254
|
+
# Builds the object from hash
|
255
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
256
|
+
# @return [Object] Returns the model itself
|
257
|
+
def build_from_hash(attributes)
|
258
|
+
return nil unless attributes.is_a?(Hash)
|
259
|
+
self.class.openapi_types.each_pair do |key, type|
|
260
|
+
if type =~ /\AArray<(.*)>/i
|
261
|
+
# check to ensure the input is an array given that the attribute
|
262
|
+
# is documented as an array but the input is not
|
263
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
264
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
265
|
+
end
|
266
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
267
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
268
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
269
|
+
end
|
270
|
+
|
271
|
+
self
|
272
|
+
end
|
273
|
+
|
274
|
+
# Deserializes the data based on type
|
275
|
+
# @param string type Data type
|
276
|
+
# @param string value Value to be deserialized
|
277
|
+
# @return [Object] Deserialized data
|
278
|
+
def _deserialize(type, value)
|
279
|
+
case type.to_sym
|
280
|
+
when :DateTime
|
281
|
+
DateTime.parse(value)
|
282
|
+
when :Date
|
283
|
+
Date.parse(value)
|
284
|
+
when :String
|
285
|
+
value.to_s
|
286
|
+
when :Integer
|
287
|
+
value.to_i
|
288
|
+
when :Float
|
289
|
+
value.to_f
|
290
|
+
when :Boolean
|
291
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
292
|
+
true
|
293
|
+
else
|
294
|
+
false
|
295
|
+
end
|
296
|
+
when :Object
|
297
|
+
# generic object (usually a Hash), return directly
|
298
|
+
value
|
299
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
300
|
+
inner_type = Regexp.last_match[:inner_type]
|
301
|
+
value.map { |v| _deserialize(inner_type, v) }
|
302
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
303
|
+
k_type = Regexp.last_match[:k_type]
|
304
|
+
v_type = Regexp.last_match[:v_type]
|
305
|
+
{}.tap do |hash|
|
306
|
+
value.each do |k, v|
|
307
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
308
|
+
end
|
309
|
+
end
|
310
|
+
else # model
|
311
|
+
Pulp2to3MigrationClient.const_get(type).build_from_hash(value)
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
# Returns the string representation of the object
|
316
|
+
# @return [String] String presentation of the object
|
317
|
+
def to_s
|
318
|
+
to_hash.to_s
|
319
|
+
end
|
320
|
+
|
321
|
+
# to_body is an alias to to_hash (backward compatibility)
|
322
|
+
# @return [Hash] Returns the object in the form of hash
|
323
|
+
def to_body
|
324
|
+
to_hash
|
325
|
+
end
|
326
|
+
|
327
|
+
# Returns the object in the form of hash
|
328
|
+
# @return [Hash] Returns the object in the form of hash
|
329
|
+
def to_hash
|
330
|
+
hash = {}
|
331
|
+
self.class.attribute_map.each_pair do |attr, param|
|
332
|
+
value = self.send(attr)
|
333
|
+
next if value.nil?
|
334
|
+
hash[param] = _to_hash(value)
|
335
|
+
end
|
336
|
+
hash
|
337
|
+
end
|
338
|
+
|
339
|
+
# Outputs non-array value in the form of hash
|
340
|
+
# For object, use to_hash. Otherwise, just return the value
|
341
|
+
# @param [Object] value Any valid value
|
342
|
+
# @return [Hash] Returns the value in the form of hash
|
343
|
+
def _to_hash(value)
|
344
|
+
if value.is_a?(Array)
|
345
|
+
value.compact.map { |v| _to_hash(v) }
|
346
|
+
elsif value.is_a?(Hash)
|
347
|
+
{}.tap do |hash|
|
348
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
349
|
+
end
|
350
|
+
elsif value.respond_to? :to_hash
|
351
|
+
value.to_hash
|
352
|
+
else
|
353
|
+
value
|
354
|
+
end
|
355
|
+
end
|
356
|
+
end
|
357
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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.1.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
module Pulp2to3MigrationClient
|
14
|
+
VERSION = '0.0.1a1.dev01569436440'
|
15
|
+
end
|
@@ -0,0 +1,47 @@
|
|
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.1.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
# Common files
|
14
|
+
require 'pulp_2to3_migration_client/api_client'
|
15
|
+
require 'pulp_2to3_migration_client/api_error'
|
16
|
+
require 'pulp_2to3_migration_client/version'
|
17
|
+
require 'pulp_2to3_migration_client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'pulp_2to3_migration_client/models/async_operation_response'
|
21
|
+
require 'pulp_2to3_migration_client/models/inline_response200'
|
22
|
+
require 'pulp_2to3_migration_client/models/inline_response2001'
|
23
|
+
require 'pulp_2to3_migration_client/models/migration_plan'
|
24
|
+
require 'pulp_2to3_migration_client/models/migration_plan_run'
|
25
|
+
require 'pulp_2to3_migration_client/models/pulp2_content'
|
26
|
+
|
27
|
+
# APIs
|
28
|
+
require 'pulp_2to3_migration_client/api/migration_plans_api'
|
29
|
+
require 'pulp_2to3_migration_client/api/pulp2content_api'
|
30
|
+
|
31
|
+
module Pulp2to3MigrationClient
|
32
|
+
class << self
|
33
|
+
# Customize default settings for the SDK using block.
|
34
|
+
# Pulp2to3MigrationClient.configure do |config|
|
35
|
+
# config.username = "xxx"
|
36
|
+
# config.password = "xxx"
|
37
|
+
# end
|
38
|
+
# If no block given, return the default Configuration object.
|
39
|
+
def configure
|
40
|
+
if block_given?
|
41
|
+
yield(Configuration.default)
|
42
|
+
else
|
43
|
+
Configuration.default
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Pulp 3 API
|
5
|
+
|
6
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 4.1.3-SNAPSHOT
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "pulp_2to3_migration_client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "pulp_2to3_migration_client"
|
20
|
+
s.version = Pulp2to3MigrationClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["OpenAPI-Generator"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://openapi-generator.tech"
|
25
|
+
s.summary = "Pulp 3 API Ruby Gem"
|
26
|
+
s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
|
27
|
+
s.license = 'GPL-2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'faraday', '>= 0.14.0'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
37
|
+
s.executables = []
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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.1.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Pulp2to3MigrationClient::MigrationPlansApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'MigrationPlansApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Pulp2to3MigrationClient::MigrationPlansApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of MigrationPlansApi' do
|
30
|
+
it 'should create an instance of MigrationPlansApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Pulp2to3MigrationClient::MigrationPlansApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create
|
36
|
+
# Create a migration plan
|
37
|
+
# MigrationPlan ViewSet.
|
38
|
+
# @param data
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [MigrationPlan]
|
41
|
+
describe 'create test' 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
|
+
# unit tests for delete
|
48
|
+
# Delete a migration plan
|
49
|
+
# MigrationPlan ViewSet.
|
50
|
+
# @param migration_plan_href URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
51
|
+
# @param [Hash] opts the optional parameters
|
52
|
+
# @return [nil]
|
53
|
+
describe 'delete test' 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
|
+
# unit tests for list
|
60
|
+
# List migration plans
|
61
|
+
# MigrationPlan ViewSet.
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
64
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
65
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
66
|
+
# @return [InlineResponse200]
|
67
|
+
describe 'list test' do
|
68
|
+
it 'should work' do
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
# unit tests for read
|
74
|
+
# Inspect a migration plan
|
75
|
+
# MigrationPlan ViewSet.
|
76
|
+
# @param migration_plan_href URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
77
|
+
# @param [Hash] opts the optional parameters
|
78
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
79
|
+
# @return [MigrationPlan]
|
80
|
+
describe 'read test' do
|
81
|
+
it 'should work' do
|
82
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# unit tests for run
|
87
|
+
# Run migration plan
|
88
|
+
# Trigger an asynchronous task to run a migration from Pulp 2.
|
89
|
+
# @param migration_plan_href URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
90
|
+
# @param data
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @return [AsyncOperationResponse]
|
93
|
+
describe 'run test' do
|
94
|
+
it 'should work' do
|
95
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
@@ -0,0 +1,73 @@
|
|
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.1.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for Pulp2to3MigrationClient::Pulp2contentApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'Pulp2contentApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = Pulp2to3MigrationClient::Pulp2contentApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of Pulp2contentApi' do
|
30
|
+
it 'should create an instance of Pulp2contentApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(Pulp2to3MigrationClient::Pulp2contentApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for list
|
36
|
+
# List pulp2 contents
|
37
|
+
# ViewSet for Pulp2Content model.
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :pulp2_id
|
40
|
+
# @option opts [String] :pulp2_id__in Filter results where pulp2_id is in a comma-separated list of values
|
41
|
+
# @option opts [String] :pulp2_content_type_id
|
42
|
+
# @option opts [String] :pulp2_content_type_id__in Filter results where pulp2_content_type_id is in a comma-separated list of values
|
43
|
+
# @option opts [Float] :pulp2_last_updated__lt Filter results where pulp2_last_updated is less than value
|
44
|
+
# @option opts [Float] :pulp2_last_updated__lte Filter results where pulp2_last_updated is less than or equal to value
|
45
|
+
# @option opts [Float] :pulp2_last_updated__gt Filter results where pulp2_last_updated is greater than value
|
46
|
+
# @option opts [Float] :pulp2_last_updated__gte Filter results where pulp2_last_updated is greater than or equal to value
|
47
|
+
# @option opts [Float] :pulp2_last_updated__range Filter results where pulp2_last_updated is between two comma separated values
|
48
|
+
# @option opts [String] :pulp3_content Foreign Key referenced by HREF
|
49
|
+
# @option opts [String] :pulp2_last_updated ISO 8601 formatted dates are supported
|
50
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
51
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
52
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
53
|
+
# @return [InlineResponse2001]
|
54
|
+
describe 'list test' do
|
55
|
+
it 'should work' do
|
56
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# unit tests for read
|
61
|
+
# Inspect a pulp2 content
|
62
|
+
# ViewSet for Pulp2Content model.
|
63
|
+
# @param pulp2_content_href URI of Pulp2 Content. e.g.: /pulp/api/v3/pulp2content/1/
|
64
|
+
# @param [Hash] opts the optional parameters
|
65
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
66
|
+
# @return [Pulp2Content]
|
67
|
+
describe 'read test' do
|
68
|
+
it 'should work' do
|
69
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|