pulp_2to3_migration_client 0.6.0.dev01605193866 → 0.7.0.dev01607743897
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 +4 -4
- data/README.md +5 -4
- data/docs/MigrationPlanRun.md +4 -2
- data/docs/MigrationPlansApi.md +56 -0
- data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +70 -0
- data/lib/pulp_2to3_migration_client/models/migration_plan_run.rb +17 -5
- data/lib/pulp_2to3_migration_client/version.rb +1 -1
- data/spec/api/migration_plans_api_spec.rb +13 -0
- data/spec/models/migration_plan_run_spec.rb +6 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6765527edf629b92546a00241f1efadc9ab02604641325de18e5d2dc67b44542
|
4
|
+
data.tar.gz: 28d1eb697ebc85e0c79c87c350a147f841a35ed2f2e099b63a7e2d4ec04ddd43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba084fdf92074f529a31b20e9a40e8ffd65de4aca095ea54844f971503881f980b1a4ca80ca0ed28c73296ec0937a38ef3bfd964e48591f6d45fe0f5f5177ea4
|
7
|
+
data.tar.gz: 614017afa71bcf42937b1287bf9d1e7a21d4fcff6f6a248c1c4030cf2ac600f4a0636e2cf09b064fe7bb18d39d1522d3d3a0d7350a0b48f1a5f4e3dbc69410b9
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v3
|
10
|
-
- Package version: 0.
|
10
|
+
- Package version: 0.7.0.dev01607743897
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build pulp_2to3_migration_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulp_2to3_migration_client-0.
|
27
|
+
gem install ./pulp_2to3_migration_client-0.7.0.dev01607743897.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulp_2to3_migration_client-0.
|
30
|
+
(for development, run `gem install --dev ./pulp_2to3_migration_client-0.7.0.dev01607743897.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'pulp_2to3_migration_client', '~> 0.
|
36
|
+
gem 'pulp_2to3_migration_client', '~> 0.7.0.dev01607743897'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -87,6 +87,7 @@ Class | Method | HTTP request | Description
|
|
87
87
|
*Pulp2to3MigrationClient::MigrationPlansApi* | [**delete**](docs/MigrationPlansApi.md#delete) | **DELETE** {pulp_2to3_migration_migration_plan_href} | Delete a migration plan
|
88
88
|
*Pulp2to3MigrationClient::MigrationPlansApi* | [**list**](docs/MigrationPlansApi.md#list) | **GET** /pulp/api/v3/migration-plans/ | List migration plans
|
89
89
|
*Pulp2to3MigrationClient::MigrationPlansApi* | [**read**](docs/MigrationPlansApi.md#read) | **GET** {pulp_2to3_migration_migration_plan_href} | Inspect a migration plan
|
90
|
+
*Pulp2to3MigrationClient::MigrationPlansApi* | [**reset**](docs/MigrationPlansApi.md#reset) | **POST** {pulp_2to3_migration_migration_plan_href}reset/ | Reset Pulp 3 data for plugins specified in the migration plan
|
90
91
|
*Pulp2to3MigrationClient::MigrationPlansApi* | [**run**](docs/MigrationPlansApi.md#run) | **POST** {pulp_2to3_migration_migration_plan_href}run/ | Run migration plan
|
91
92
|
*Pulp2to3MigrationClient::Pulp2ContentApi* | [**list**](docs/Pulp2ContentApi.md#list) | **GET** /pulp/api/v3/pulp2content/ | List pulp2 contents
|
92
93
|
*Pulp2to3MigrationClient::Pulp2ContentApi* | [**read**](docs/Pulp2ContentApi.md#read) | **GET** {pulp_2to3_migration_pulp2_content_href} | Inspect a pulp2 content
|
data/docs/MigrationPlanRun.md
CHANGED
@@ -4,8 +4,9 @@
|
|
4
4
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
|
-
**validate** | **Boolean** | If ``True``, migration cannot happen without successful validation of the Migration Plan | [optional] [default to false]
|
7
|
+
**validate** | **Boolean** | If ``True``, migration cannot happen without successful validation of the Migration Plan. | [optional] [default to false]
|
8
8
|
**dry_run** | **Boolean** | If ``True``, performs validation of a Migration Plan only, no migration is run. | [optional] [default to false]
|
9
|
+
**skip_corrupted** | **Boolean** | If ``True``, skips corrupted or missing Pulp 2 content without causing a task failure. If you need this content, run a sync task in Pulp 3 for a repo of interest to bring any missing content back. Alternatively, repair it in Pulp 2and re-run the migration task. | [optional] [default to false]
|
9
10
|
|
10
11
|
## Code Sample
|
11
12
|
|
@@ -13,7 +14,8 @@ Name | Type | Description | Notes
|
|
13
14
|
require 'Pulp2to3MigrationClient'
|
14
15
|
|
15
16
|
instance = Pulp2to3MigrationClient::MigrationPlanRun.new(validate: null,
|
16
|
-
dry_run: null
|
17
|
+
dry_run: null,
|
18
|
+
skip_corrupted: null)
|
17
19
|
```
|
18
20
|
|
19
21
|
|
data/docs/MigrationPlansApi.md
CHANGED
@@ -8,6 +8,7 @@ Method | HTTP request | Description
|
|
8
8
|
[**delete**](MigrationPlansApi.md#delete) | **DELETE** {pulp_2to3_migration_migration_plan_href} | Delete a migration plan
|
9
9
|
[**list**](MigrationPlansApi.md#list) | **GET** /pulp/api/v3/migration-plans/ | List migration plans
|
10
10
|
[**read**](MigrationPlansApi.md#read) | **GET** {pulp_2to3_migration_migration_plan_href} | Inspect a migration plan
|
11
|
+
[**reset**](MigrationPlansApi.md#reset) | **POST** {pulp_2to3_migration_migration_plan_href}reset/ | Reset Pulp 3 data for plugins specified in the migration plan
|
11
12
|
[**run**](MigrationPlansApi.md#run) | **POST** {pulp_2to3_migration_migration_plan_href}run/ | Run migration plan
|
12
13
|
|
13
14
|
|
@@ -239,6 +240,61 @@ Name | Type | Description | Notes
|
|
239
240
|
- **Accept**: application/json
|
240
241
|
|
241
242
|
|
243
|
+
## reset
|
244
|
+
|
245
|
+
> AsyncOperationResponse reset(pulp_2to3_migration_migration_plan_href, pulp2to3_migration_migration_plan)
|
246
|
+
|
247
|
+
Reset Pulp 3 data for plugins specified in the migration plan
|
248
|
+
|
249
|
+
Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan.
|
250
|
+
|
251
|
+
### Example
|
252
|
+
|
253
|
+
```ruby
|
254
|
+
# load the gem
|
255
|
+
require 'pulp_2to3_migration_client'
|
256
|
+
# setup authorization
|
257
|
+
Pulp2to3MigrationClient.configure do |config|
|
258
|
+
# Configure HTTP basic authorization: basicAuth
|
259
|
+
config.username = 'YOUR USERNAME'
|
260
|
+
config.password = 'YOUR PASSWORD'
|
261
|
+
end
|
262
|
+
|
263
|
+
api_instance = Pulp2to3MigrationClient::MigrationPlansApi.new
|
264
|
+
pulp_2to3_migration_migration_plan_href = 'pulp_2to3_migration_migration_plan_href_example' # String |
|
265
|
+
pulp2to3_migration_migration_plan = Pulp2to3MigrationClient::Pulp2to3MigrationMigrationPlan.new # Pulp2to3MigrationMigrationPlan |
|
266
|
+
|
267
|
+
begin
|
268
|
+
#Reset Pulp 3 data for plugins specified in the migration plan
|
269
|
+
result = api_instance.reset(pulp_2to3_migration_migration_plan_href, pulp2to3_migration_migration_plan)
|
270
|
+
p result
|
271
|
+
rescue Pulp2to3MigrationClient::ApiError => e
|
272
|
+
puts "Exception when calling MigrationPlansApi->reset: #{e}"
|
273
|
+
end
|
274
|
+
```
|
275
|
+
|
276
|
+
### Parameters
|
277
|
+
|
278
|
+
|
279
|
+
Name | Type | Description | Notes
|
280
|
+
------------- | ------------- | ------------- | -------------
|
281
|
+
**pulp_2to3_migration_migration_plan_href** | **String**| |
|
282
|
+
**pulp2to3_migration_migration_plan** | [**Pulp2to3MigrationMigrationPlan**](Pulp2to3MigrationMigrationPlan.md)| |
|
283
|
+
|
284
|
+
### Return type
|
285
|
+
|
286
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
287
|
+
|
288
|
+
### Authorization
|
289
|
+
|
290
|
+
[basicAuth](../README.md#basicAuth)
|
291
|
+
|
292
|
+
### HTTP request headers
|
293
|
+
|
294
|
+
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
|
295
|
+
- **Accept**: application/json
|
296
|
+
|
297
|
+
|
242
298
|
## run
|
243
299
|
|
244
300
|
> AsyncOperationResponse run(pulp_2to3_migration_migration_plan_href, migration_plan_run)
|
@@ -282,6 +282,76 @@ module Pulp2to3MigrationClient
|
|
282
282
|
return data, status_code, headers
|
283
283
|
end
|
284
284
|
|
285
|
+
# Reset Pulp 3 data for plugins specified in the migration plan
|
286
|
+
# Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan.
|
287
|
+
# @param pulp_2to3_migration_migration_plan_href [String]
|
288
|
+
# @param pulp2to3_migration_migration_plan [Pulp2to3MigrationMigrationPlan]
|
289
|
+
# @param [Hash] opts the optional parameters
|
290
|
+
# @return [AsyncOperationResponse]
|
291
|
+
def reset(pulp_2to3_migration_migration_plan_href, pulp2to3_migration_migration_plan, opts = {})
|
292
|
+
data, _status_code, _headers = reset_with_http_info(pulp_2to3_migration_migration_plan_href, pulp2to3_migration_migration_plan, opts)
|
293
|
+
data
|
294
|
+
end
|
295
|
+
|
296
|
+
# Reset Pulp 3 data for plugins specified in the migration plan
|
297
|
+
# Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan.
|
298
|
+
# @param pulp_2to3_migration_migration_plan_href [String]
|
299
|
+
# @param pulp2to3_migration_migration_plan [Pulp2to3MigrationMigrationPlan]
|
300
|
+
# @param [Hash] opts the optional parameters
|
301
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
302
|
+
def reset_with_http_info(pulp_2to3_migration_migration_plan_href, pulp2to3_migration_migration_plan, opts = {})
|
303
|
+
if @api_client.config.debugging
|
304
|
+
@api_client.config.logger.debug 'Calling API: MigrationPlansApi.reset ...'
|
305
|
+
end
|
306
|
+
# verify the required parameter 'pulp_2to3_migration_migration_plan_href' is set
|
307
|
+
if @api_client.config.client_side_validation && pulp_2to3_migration_migration_plan_href.nil?
|
308
|
+
fail ArgumentError, "Missing the required parameter 'pulp_2to3_migration_migration_plan_href' when calling MigrationPlansApi.reset"
|
309
|
+
end
|
310
|
+
# verify the required parameter 'pulp2to3_migration_migration_plan' is set
|
311
|
+
if @api_client.config.client_side_validation && pulp2to3_migration_migration_plan.nil?
|
312
|
+
fail ArgumentError, "Missing the required parameter 'pulp2to3_migration_migration_plan' when calling MigrationPlansApi.reset"
|
313
|
+
end
|
314
|
+
# resource path
|
315
|
+
local_var_path = '{pulp_2to3_migration_migration_plan_href}reset/'.sub('{' + 'pulp_2to3_migration_migration_plan_href' + '}', CGI.escape(pulp_2to3_migration_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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
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(pulp2to3_migration_migration_plan)
|
332
|
+
|
333
|
+
# return_type
|
334
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
335
|
+
|
336
|
+
# auth_names
|
337
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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#reset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
351
|
+
end
|
352
|
+
return data, status_code, headers
|
353
|
+
end
|
354
|
+
|
285
355
|
# Run migration plan
|
286
356
|
# Trigger an asynchronous task to run a migration from Pulp 2.
|
287
357
|
# @param pulp_2to3_migration_migration_plan_href [String]
|
@@ -15,17 +15,21 @@ require 'date'
|
|
15
15
|
module Pulp2to3MigrationClient
|
16
16
|
# A serializer for running a migration plan.
|
17
17
|
class MigrationPlanRun
|
18
|
-
# If ``True``, migration cannot happen without successful validation of the Migration Plan
|
18
|
+
# If ``True``, migration cannot happen without successful validation of the Migration Plan.
|
19
19
|
attr_accessor :validate
|
20
20
|
|
21
21
|
# If ``True``, performs validation of a Migration Plan only, no migration is run.
|
22
22
|
attr_accessor :dry_run
|
23
23
|
|
24
|
+
# If ``True``, skips corrupted or missing Pulp 2 content without causing a task failure. If you need this content, run a sync task in Pulp 3 for a repo of interest to bring any missing content back. Alternatively, repair it in Pulp 2and re-run the migration task.
|
25
|
+
attr_accessor :skip_corrupted
|
26
|
+
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
27
30
|
:'validate' => :'validate',
|
28
|
-
:'dry_run' => :'dry_run'
|
31
|
+
:'dry_run' => :'dry_run',
|
32
|
+
:'skip_corrupted' => :'skip_corrupted'
|
29
33
|
}
|
30
34
|
end
|
31
35
|
|
@@ -33,7 +37,8 @@ module Pulp2to3MigrationClient
|
|
33
37
|
def self.openapi_types
|
34
38
|
{
|
35
39
|
:'validate' => :'Boolean',
|
36
|
-
:'dry_run' => :'Boolean'
|
40
|
+
:'dry_run' => :'Boolean',
|
41
|
+
:'skip_corrupted' => :'Boolean'
|
37
42
|
}
|
38
43
|
end
|
39
44
|
|
@@ -69,6 +74,12 @@ module Pulp2to3MigrationClient
|
|
69
74
|
else
|
70
75
|
self.dry_run = false
|
71
76
|
end
|
77
|
+
|
78
|
+
if attributes.key?(:'skip_corrupted')
|
79
|
+
self.skip_corrupted = attributes[:'skip_corrupted']
|
80
|
+
else
|
81
|
+
self.skip_corrupted = false
|
82
|
+
end
|
72
83
|
end
|
73
84
|
|
74
85
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -90,7 +101,8 @@ module Pulp2to3MigrationClient
|
|
90
101
|
return true if self.equal?(o)
|
91
102
|
self.class == o.class &&
|
92
103
|
validate == o.validate &&
|
93
|
-
dry_run == o.dry_run
|
104
|
+
dry_run == o.dry_run &&
|
105
|
+
skip_corrupted == o.skip_corrupted
|
94
106
|
end
|
95
107
|
|
96
108
|
# @see the `==` method
|
@@ -102,7 +114,7 @@ module Pulp2to3MigrationClient
|
|
102
114
|
# Calculates hash code according to all attributes.
|
103
115
|
# @return [Integer] Hash code
|
104
116
|
def hash
|
105
|
-
[validate, dry_run].hash
|
117
|
+
[validate, dry_run, skip_corrupted].hash
|
106
118
|
end
|
107
119
|
|
108
120
|
# Builds the object from hash
|
@@ -86,6 +86,19 @@ describe 'MigrationPlansApi' do
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
+
# unit tests for reset
|
90
|
+
# Reset Pulp 3 data for plugins specified in the migration plan
|
91
|
+
# Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan.
|
92
|
+
# @param pulp_2to3_migration_migration_plan_href
|
93
|
+
# @param pulp2to3_migration_migration_plan
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [AsyncOperationResponse]
|
96
|
+
describe 'reset test' do
|
97
|
+
it 'should work' do
|
98
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
89
102
|
# unit tests for run
|
90
103
|
# Run migration plan
|
91
104
|
# Trigger an asynchronous task to run a migration from Pulp 2.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulp_2to3_migration_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0.dev01607743897
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -139,23 +139,23 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: 1.3.1
|
141
141
|
requirements: []
|
142
|
-
rubygems_version: 3.0.
|
142
|
+
rubygems_version: 3.0.3
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Pulp 3 API Ruby Gem
|
146
146
|
test_files:
|
147
|
-
- spec/api/migration_plans_api_spec.rb
|
148
147
|
- spec/api/pulp2_content_api_spec.rb
|
149
148
|
- spec/api/pulp2_repositories_api_spec.rb
|
149
|
+
- spec/api/migration_plans_api_spec.rb
|
150
150
|
- spec/api_client_spec.rb
|
151
151
|
- spec/configuration_spec.rb
|
152
152
|
- spec/models/pulp2to3_migration_migration_plan_spec.rb
|
153
|
-
- spec/models/async_operation_response_spec.rb
|
154
|
-
- spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb
|
155
|
-
- spec/models/pulp2to3_migration_migration_plan_response_spec.rb
|
156
|
-
- spec/models/migration_plan_run_spec.rb
|
157
153
|
- spec/models/paginatedpulp2to3_migration_pulp2_content_response_list_spec.rb
|
154
|
+
- spec/models/paginatedpulp2to3_migration_pulp2_repository_response_list_spec.rb
|
155
|
+
- spec/models/migration_plan_run_spec.rb
|
156
|
+
- spec/models/pulp2to3_migration_migration_plan_response_spec.rb
|
158
157
|
- spec/models/pulp2to3_migration_pulp2_content_response_spec.rb
|
158
|
+
- spec/models/async_operation_response_spec.rb
|
159
|
+
- spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb
|
159
160
|
- spec/models/paginatedpulp2to3_migration_migration_plan_response_list_spec.rb
|
160
|
-
- spec/models/paginatedpulp2to3_migration_pulp2_repository_response_list_spec.rb
|
161
161
|
- spec/spec_helper.rb
|