pulp_2to3_migration_client 0.3.0b1.dev01595360000
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +114 -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/InlineResponse2002.md +23 -0
- data/docs/MigrationPlanRun.md +19 -0
- data/docs/MigrationPlansApi.md +295 -0
- data/docs/Pulp2contentApi.md +154 -0
- data/docs/Pulp2repositoriesApi.md +140 -0
- data/docs/Pulp2to3MigrationMigrationPlan.md +21 -0
- data/docs/Pulp2to3MigrationPulp2Content.md +33 -0
- data/docs/Pulp2to3MigrationPulp2Repository.md +39 -0
- data/git_push.sh +58 -0
- data/lib/pulp_2to3_migration_client.rb +50 -0
- data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +355 -0
- data/lib/pulp_2to3_migration_client/api/pulp2content_api.rb +194 -0
- data/lib/pulp_2to3_migration_client/api/pulp2repositories_api.rb +173 -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 +212 -0
- data/lib/pulp_2to3_migration_client/models/inline_response200.rb +247 -0
- data/lib/pulp_2to3_migration_client/models/inline_response2001.rb +247 -0
- data/lib/pulp_2to3_migration_client/models/inline_response2002.rb +247 -0
- data/lib/pulp_2to3_migration_client/models/migration_plan_run.rb +221 -0
- data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan.rb +231 -0
- data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_content.rb +393 -0
- data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_repository.rb +444 -0
- data/lib/pulp_2to3_migration_client/version.rb +15 -0
- data/pulp_2to3_migration_client.gemspec +39 -0
- data/spec/api/migration_plans_api_spec.rb +102 -0
- data/spec/api/pulp2content_api_spec.rb +76 -0
- data/spec/api/pulp2repositories_api_spec.rb +69 -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_response2002_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/migration_plan_run_spec.rb +47 -0
- data/spec/models/pulp2to3_migration_migration_plan_spec.rb +53 -0
- data/spec/models/pulp2to3_migration_pulp2_content_spec.rb +89 -0
- data/spec/models/pulp2to3_migration_pulp2_repository_spec.rb +107 -0
- data/spec/spec_helper.rb +111 -0
- metadata +157 -0
@@ -0,0 +1,50 @@
|
|
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
|
+
# 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/inline_response2002'
|
24
|
+
require 'pulp_2to3_migration_client/models/migration_plan_run'
|
25
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan'
|
26
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_content'
|
27
|
+
require 'pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_repository'
|
28
|
+
|
29
|
+
# APIs
|
30
|
+
require 'pulp_2to3_migration_client/api/migration_plans_api'
|
31
|
+
require 'pulp_2to3_migration_client/api/pulp2content_api'
|
32
|
+
require 'pulp_2to3_migration_client/api/pulp2repositories_api'
|
33
|
+
|
34
|
+
module Pulp2to3MigrationClient
|
35
|
+
class << self
|
36
|
+
# Customize default settings for the SDK using block.
|
37
|
+
# Pulp2to3MigrationClient.configure do |config|
|
38
|
+
# config.username = "xxx"
|
39
|
+
# config.password = "xxx"
|
40
|
+
# end
|
41
|
+
# If no block given, return the default Configuration object.
|
42
|
+
def configure
|
43
|
+
if block_given?
|
44
|
+
yield(Configuration.default)
|
45
|
+
else
|
46
|
+
Configuration.default
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,355 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module Pulp2to3MigrationClient
|
16
|
+
class MigrationPlansApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a migration plan
|
23
|
+
# MigrationPlan ViewSet.
|
24
|
+
# @param data [Pulp2to3MigrationMigrationPlan]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Pulp2to3MigrationMigrationPlan]
|
27
|
+
def create(data, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a migration plan
|
33
|
+
# MigrationPlan ViewSet.
|
34
|
+
# @param data [Pulp2to3MigrationMigrationPlan]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Pulp2to3MigrationMigrationPlan, Integer, Hash)>] Pulp2to3MigrationMigrationPlan data, response status code and response headers
|
37
|
+
def create_with_http_info(data, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'data' is set
|
42
|
+
if @api_client.config.client_side_validation && data.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling MigrationPlansApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/migration-plans/'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationMigrationPlan'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['Basic']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: MigrationPlansApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a migration plan
|
87
|
+
# MigrationPlan ViewSet.
|
88
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [nil]
|
91
|
+
def delete(migration_plan_href, opts = {})
|
92
|
+
delete_with_http_info(migration_plan_href, opts)
|
93
|
+
nil
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a migration plan
|
97
|
+
# MigrationPlan ViewSet.
|
98
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
101
|
+
def delete_with_http_info(migration_plan_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'migration_plan_href' is set
|
106
|
+
if @api_client.config.client_side_validation && migration_plan_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'migration_plan_href' when calling MigrationPlansApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{migration_plan_href}'.sub('{' + 'migration_plan_href' + '}', CGI.escape(migration_plan_href.to_s).gsub('%2F', '/'))
|
111
|
+
|
112
|
+
# query parameters
|
113
|
+
query_params = opts[:query_params] || {}
|
114
|
+
|
115
|
+
# header parameters
|
116
|
+
header_params = opts[:header_params] || {}
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body]
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type]
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['Basic']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: MigrationPlansApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
146
|
+
# List migration plans
|
147
|
+
# MigrationPlan ViewSet.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
150
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
151
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
152
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
153
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
154
|
+
# @return [InlineResponse200]
|
155
|
+
def list(opts = {})
|
156
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
157
|
+
data
|
158
|
+
end
|
159
|
+
|
160
|
+
# List migration plans
|
161
|
+
# MigrationPlan ViewSet.
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
164
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
165
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
166
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
167
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
168
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
169
|
+
def list_with_http_info(opts = {})
|
170
|
+
if @api_client.config.debugging
|
171
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.list ...'
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/pulp/api/v3/migration-plans/'
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = opts[:query_params] || {}
|
178
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
179
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
180
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
181
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
182
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
183
|
+
|
184
|
+
# header parameters
|
185
|
+
header_params = opts[:header_params] || {}
|
186
|
+
# HTTP header 'Accept' (if needed)
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
188
|
+
|
189
|
+
# form parameters
|
190
|
+
form_params = opts[:form_params] || {}
|
191
|
+
|
192
|
+
# http body (model)
|
193
|
+
post_body = opts[:body]
|
194
|
+
|
195
|
+
# return_type
|
196
|
+
return_type = opts[:return_type] || 'InlineResponse200'
|
197
|
+
|
198
|
+
# auth_names
|
199
|
+
auth_names = opts[:auth_names] || ['Basic']
|
200
|
+
|
201
|
+
new_options = opts.merge(
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: MigrationPlansApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Inspect a migration plan
|
218
|
+
# MigrationPlan ViewSet.
|
219
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
222
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
223
|
+
# @return [Pulp2to3MigrationMigrationPlan]
|
224
|
+
def read(migration_plan_href, opts = {})
|
225
|
+
data, _status_code, _headers = read_with_http_info(migration_plan_href, opts)
|
226
|
+
data
|
227
|
+
end
|
228
|
+
|
229
|
+
# Inspect a migration plan
|
230
|
+
# MigrationPlan ViewSet.
|
231
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
234
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
235
|
+
# @return [Array<(Pulp2to3MigrationMigrationPlan, Integer, Hash)>] Pulp2to3MigrationMigrationPlan data, response status code and response headers
|
236
|
+
def read_with_http_info(migration_plan_href, opts = {})
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.read ...'
|
239
|
+
end
|
240
|
+
# verify the required parameter 'migration_plan_href' is set
|
241
|
+
if @api_client.config.client_side_validation && migration_plan_href.nil?
|
242
|
+
fail ArgumentError, "Missing the required parameter 'migration_plan_href' when calling MigrationPlansApi.read"
|
243
|
+
end
|
244
|
+
# resource path
|
245
|
+
local_var_path = '{migration_plan_href}'.sub('{' + 'migration_plan_href' + '}', CGI.escape(migration_plan_href.to_s).gsub('%2F', '/'))
|
246
|
+
|
247
|
+
# query parameters
|
248
|
+
query_params = opts[:query_params] || {}
|
249
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
250
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
251
|
+
|
252
|
+
# header parameters
|
253
|
+
header_params = opts[:header_params] || {}
|
254
|
+
# HTTP header 'Accept' (if needed)
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
256
|
+
|
257
|
+
# form parameters
|
258
|
+
form_params = opts[:form_params] || {}
|
259
|
+
|
260
|
+
# http body (model)
|
261
|
+
post_body = opts[:body]
|
262
|
+
|
263
|
+
# return_type
|
264
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationMigrationPlan'
|
265
|
+
|
266
|
+
# auth_names
|
267
|
+
auth_names = opts[:auth_names] || ['Basic']
|
268
|
+
|
269
|
+
new_options = opts.merge(
|
270
|
+
:header_params => header_params,
|
271
|
+
:query_params => query_params,
|
272
|
+
:form_params => form_params,
|
273
|
+
:body => post_body,
|
274
|
+
:auth_names => auth_names,
|
275
|
+
:return_type => return_type
|
276
|
+
)
|
277
|
+
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
279
|
+
if @api_client.config.debugging
|
280
|
+
@api_client.config.logger.debug "API called: MigrationPlansApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
281
|
+
end
|
282
|
+
return data, status_code, headers
|
283
|
+
end
|
284
|
+
|
285
|
+
# Run migration plan
|
286
|
+
# Trigger an asynchronous task to run a migration from Pulp 2.
|
287
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
288
|
+
# @param data [MigrationPlanRun]
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @return [AsyncOperationResponse]
|
291
|
+
def run(migration_plan_href, data, opts = {})
|
292
|
+
data, _status_code, _headers = run_with_http_info(migration_plan_href, data, opts)
|
293
|
+
data
|
294
|
+
end
|
295
|
+
|
296
|
+
# Run migration plan
|
297
|
+
# Trigger an asynchronous task to run a migration from Pulp 2.
|
298
|
+
# @param migration_plan_href [String] URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/
|
299
|
+
# @param data [MigrationPlanRun]
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
302
|
+
def run_with_http_info(migration_plan_href, data, opts = {})
|
303
|
+
if @api_client.config.debugging
|
304
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.run ...'
|
305
|
+
end
|
306
|
+
# verify the required parameter 'migration_plan_href' is set
|
307
|
+
if @api_client.config.client_side_validation && migration_plan_href.nil?
|
308
|
+
fail ArgumentError, "Missing the required parameter 'migration_plan_href' when calling MigrationPlansApi.run"
|
309
|
+
end
|
310
|
+
# verify the required parameter 'data' is set
|
311
|
+
if @api_client.config.client_side_validation && data.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling MigrationPlansApi.run"
|
313
|
+
end
|
314
|
+
# resource path
|
315
|
+
local_var_path = '{migration_plan_href}run/'.sub('{' + 'migration_plan_href' + '}', CGI.escape(migration_plan_href.to_s).gsub('%2F', '/'))
|
316
|
+
|
317
|
+
# query parameters
|
318
|
+
query_params = opts[:query_params] || {}
|
319
|
+
|
320
|
+
# header parameters
|
321
|
+
header_params = opts[:header_params] || {}
|
322
|
+
# HTTP header 'Accept' (if needed)
|
323
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
324
|
+
# HTTP header 'Content-Type'
|
325
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
326
|
+
|
327
|
+
# form parameters
|
328
|
+
form_params = opts[:form_params] || {}
|
329
|
+
|
330
|
+
# http body (model)
|
331
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
332
|
+
|
333
|
+
# return_type
|
334
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
335
|
+
|
336
|
+
# auth_names
|
337
|
+
auth_names = opts[:auth_names] || ['Basic']
|
338
|
+
|
339
|
+
new_options = opts.merge(
|
340
|
+
:header_params => header_params,
|
341
|
+
:query_params => query_params,
|
342
|
+
:form_params => form_params,
|
343
|
+
:body => post_body,
|
344
|
+
:auth_names => auth_names,
|
345
|
+
:return_type => return_type
|
346
|
+
)
|
347
|
+
|
348
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
349
|
+
if @api_client.config.debugging
|
350
|
+
@api_client.config.logger.debug "API called: MigrationPlansApi#run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
return data, status_code, headers
|
353
|
+
end
|
354
|
+
end
|
355
|
+
end
|
@@ -0,0 +1,194 @@
|
|
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 'cgi'
|
14
|
+
|
15
|
+
module Pulp2to3MigrationClient
|
16
|
+
class Pulp2contentApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# List pulp2 contents
|
23
|
+
# ViewSet for Pulp2Content model.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
26
|
+
# @option opts [String] :pulp2_id
|
27
|
+
# @option opts [String] :pulp2_id__in Filter results where pulp2_id is in a comma-separated list of values
|
28
|
+
# @option opts [String] :pulp2_content_type_id
|
29
|
+
# @option opts [String] :pulp2_content_type_id__in Filter results where pulp2_content_type_id is in a comma-separated list of values
|
30
|
+
# @option opts [Float] :pulp2_last_updated__lt Filter results where pulp2_last_updated is less than value
|
31
|
+
# @option opts [Float] :pulp2_last_updated__lte Filter results where pulp2_last_updated is less than or equal to value
|
32
|
+
# @option opts [Float] :pulp2_last_updated__gt Filter results where pulp2_last_updated is greater than value
|
33
|
+
# @option opts [Float] :pulp2_last_updated__gte Filter results where pulp2_last_updated is greater than or equal to value
|
34
|
+
# @option opts [Float] :pulp2_last_updated__range Filter results where pulp2_last_updated is between two comma separated values
|
35
|
+
# @option opts [String] :pulp3_content Foreign Key referenced by HREF
|
36
|
+
# @option opts [String] :pulp2_last_updated ISO 8601 formatted dates are supported
|
37
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
38
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
39
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
40
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
41
|
+
# @return [InlineResponse2001]
|
42
|
+
def list(opts = {})
|
43
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
44
|
+
data
|
45
|
+
end
|
46
|
+
|
47
|
+
# List pulp2 contents
|
48
|
+
# ViewSet for Pulp2Content model.
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
51
|
+
# @option opts [String] :pulp2_id
|
52
|
+
# @option opts [String] :pulp2_id__in Filter results where pulp2_id is in a comma-separated list of values
|
53
|
+
# @option opts [String] :pulp2_content_type_id
|
54
|
+
# @option opts [String] :pulp2_content_type_id__in Filter results where pulp2_content_type_id is in a comma-separated list of values
|
55
|
+
# @option opts [Float] :pulp2_last_updated__lt Filter results where pulp2_last_updated is less than value
|
56
|
+
# @option opts [Float] :pulp2_last_updated__lte Filter results where pulp2_last_updated is less than or equal to value
|
57
|
+
# @option opts [Float] :pulp2_last_updated__gt Filter results where pulp2_last_updated is greater than value
|
58
|
+
# @option opts [Float] :pulp2_last_updated__gte Filter results where pulp2_last_updated is greater than or equal to value
|
59
|
+
# @option opts [Float] :pulp2_last_updated__range Filter results where pulp2_last_updated is between two comma separated values
|
60
|
+
# @option opts [String] :pulp3_content Foreign Key referenced by HREF
|
61
|
+
# @option opts [String] :pulp2_last_updated ISO 8601 formatted dates are supported
|
62
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
63
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
64
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
65
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
66
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
67
|
+
def list_with_http_info(opts = {})
|
68
|
+
if @api_client.config.debugging
|
69
|
+
@api_client.config.logger.debug 'Calling API: Pulp2contentApi.list ...'
|
70
|
+
end
|
71
|
+
# resource path
|
72
|
+
local_var_path = '/pulp/api/v3/pulp2content/'
|
73
|
+
|
74
|
+
# query parameters
|
75
|
+
query_params = opts[:query_params] || {}
|
76
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
77
|
+
query_params[:'pulp2_id'] = opts[:'pulp2_id'] if !opts[:'pulp2_id'].nil?
|
78
|
+
query_params[:'pulp2_id__in'] = opts[:'pulp2_id__in'] if !opts[:'pulp2_id__in'].nil?
|
79
|
+
query_params[:'pulp2_content_type_id'] = opts[:'pulp2_content_type_id'] if !opts[:'pulp2_content_type_id'].nil?
|
80
|
+
query_params[:'pulp2_content_type_id__in'] = opts[:'pulp2_content_type_id__in'] if !opts[:'pulp2_content_type_id__in'].nil?
|
81
|
+
query_params[:'pulp2_last_updated__lt'] = opts[:'pulp2_last_updated__lt'] if !opts[:'pulp2_last_updated__lt'].nil?
|
82
|
+
query_params[:'pulp2_last_updated__lte'] = opts[:'pulp2_last_updated__lte'] if !opts[:'pulp2_last_updated__lte'].nil?
|
83
|
+
query_params[:'pulp2_last_updated__gt'] = opts[:'pulp2_last_updated__gt'] if !opts[:'pulp2_last_updated__gt'].nil?
|
84
|
+
query_params[:'pulp2_last_updated__gte'] = opts[:'pulp2_last_updated__gte'] if !opts[:'pulp2_last_updated__gte'].nil?
|
85
|
+
query_params[:'pulp2_last_updated__range'] = opts[:'pulp2_last_updated__range'] if !opts[:'pulp2_last_updated__range'].nil?
|
86
|
+
query_params[:'pulp3_content'] = opts[:'pulp3_content'] if !opts[:'pulp3_content'].nil?
|
87
|
+
query_params[:'pulp2_last_updated'] = opts[:'pulp2_last_updated'] if !opts[:'pulp2_last_updated'].nil?
|
88
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
89
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
90
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
91
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
92
|
+
|
93
|
+
# header parameters
|
94
|
+
header_params = opts[:header_params] || {}
|
95
|
+
# HTTP header 'Accept' (if needed)
|
96
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
97
|
+
|
98
|
+
# form parameters
|
99
|
+
form_params = opts[:form_params] || {}
|
100
|
+
|
101
|
+
# http body (model)
|
102
|
+
post_body = opts[:body]
|
103
|
+
|
104
|
+
# return_type
|
105
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
106
|
+
|
107
|
+
# auth_names
|
108
|
+
auth_names = opts[:auth_names] || ['Basic']
|
109
|
+
|
110
|
+
new_options = opts.merge(
|
111
|
+
:header_params => header_params,
|
112
|
+
:query_params => query_params,
|
113
|
+
:form_params => form_params,
|
114
|
+
:body => post_body,
|
115
|
+
:auth_names => auth_names,
|
116
|
+
:return_type => return_type
|
117
|
+
)
|
118
|
+
|
119
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
120
|
+
if @api_client.config.debugging
|
121
|
+
@api_client.config.logger.debug "API called: Pulp2contentApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
122
|
+
end
|
123
|
+
return data, status_code, headers
|
124
|
+
end
|
125
|
+
|
126
|
+
# Inspect a pulp2 content
|
127
|
+
# ViewSet for Pulp2Content model.
|
128
|
+
# @param pulp2_content_href [String] URI of Pulp2 Content. e.g.: /pulp/api/v3/pulp2content/1/
|
129
|
+
# @param [Hash] opts the optional parameters
|
130
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
131
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
132
|
+
# @return [Pulp2to3MigrationPulp2Content]
|
133
|
+
def read(pulp2_content_href, opts = {})
|
134
|
+
data, _status_code, _headers = read_with_http_info(pulp2_content_href, opts)
|
135
|
+
data
|
136
|
+
end
|
137
|
+
|
138
|
+
# Inspect a pulp2 content
|
139
|
+
# ViewSet for Pulp2Content model.
|
140
|
+
# @param pulp2_content_href [String] URI of Pulp2 Content. e.g.: /pulp/api/v3/pulp2content/1/
|
141
|
+
# @param [Hash] opts the optional parameters
|
142
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
143
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
144
|
+
# @return [Array<(Pulp2to3MigrationPulp2Content, Integer, Hash)>] Pulp2to3MigrationPulp2Content data, response status code and response headers
|
145
|
+
def read_with_http_info(pulp2_content_href, opts = {})
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug 'Calling API: Pulp2contentApi.read ...'
|
148
|
+
end
|
149
|
+
# verify the required parameter 'pulp2_content_href' is set
|
150
|
+
if @api_client.config.client_side_validation && pulp2_content_href.nil?
|
151
|
+
fail ArgumentError, "Missing the required parameter 'pulp2_content_href' when calling Pulp2contentApi.read"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '{pulp2_content_href}'.sub('{' + 'pulp2_content_href' + '}', CGI.escape(pulp2_content_href.to_s).gsub('%2F', '/'))
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
159
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
160
|
+
|
161
|
+
# header parameters
|
162
|
+
header_params = opts[:header_params] || {}
|
163
|
+
# HTTP header 'Accept' (if needed)
|
164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
|
+
|
166
|
+
# form parameters
|
167
|
+
form_params = opts[:form_params] || {}
|
168
|
+
|
169
|
+
# http body (model)
|
170
|
+
post_body = opts[:body]
|
171
|
+
|
172
|
+
# return_type
|
173
|
+
return_type = opts[:return_type] || 'Pulp2to3MigrationPulp2Content'
|
174
|
+
|
175
|
+
# auth_names
|
176
|
+
auth_names = opts[:auth_names] || ['Basic']
|
177
|
+
|
178
|
+
new_options = opts.merge(
|
179
|
+
:header_params => header_params,
|
180
|
+
:query_params => query_params,
|
181
|
+
:form_params => form_params,
|
182
|
+
:body => post_body,
|
183
|
+
:auth_names => auth_names,
|
184
|
+
:return_type => return_type
|
185
|
+
)
|
186
|
+
|
187
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
188
|
+
if @api_client.config.debugging
|
189
|
+
@api_client.config.logger.debug "API called: Pulp2contentApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
190
|
+
end
|
191
|
+
return data, status_code, headers
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|