pulp_2to3_migration_client 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/pulp_2to3_migration_client/api_client.rb +4 -2
  4. data/lib/pulp_2to3_migration_client/configuration.rb +7 -0
  5. data/lib/pulp_2to3_migration_client/version.rb +1 -1
  6. metadata +8 -75
  7. data/build/lib/pulpcore/__init__.py +0 -2
  8. data/build/lib/pulpcore/client/__init__.py +0 -2
  9. data/build/lib/pulpcore/client/pulp_2to3_migration/__init__.py +0 -43
  10. data/build/lib/pulpcore/client/pulp_2to3_migration/api/__init__.py +0 -8
  11. data/build/lib/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +0 -761
  12. data/build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py +0 -350
  13. data/build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py +0 -313
  14. data/build/lib/pulpcore/client/pulp_2to3_migration/api_client.py +0 -667
  15. data/build/lib/pulpcore/client/pulp_2to3_migration/configuration.py +0 -427
  16. data/build/lib/pulpcore/client/pulp_2to3_migration/exceptions.py +0 -121
  17. data/build/lib/pulpcore/client/pulp_2to3_migration/models/__init__.py +0 -26
  18. data/build/lib/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +0 -124
  19. data/build/lib/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +0 -179
  20. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py +0 -197
  21. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py +0 -197
  22. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py +0 -197
  23. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +0 -124
  24. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py +0 -178
  25. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py +0 -338
  26. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py +0 -416
  27. data/build/lib/pulpcore/client/pulp_2to3_migration/rest.py +0 -292
  28. data/dist/pulp_2to3_migration-client-0.12.0.tar.gz +0 -0
  29. data/dist/pulp_2to3_migration_client-0.12.0-py3-none-any.whl +0 -0
  30. data/pulp_2to3_migration_client.egg-info/PKG-INFO +0 -15
  31. data/pulp_2to3_migration_client.egg-info/SOURCES.txt +0 -41
  32. data/pulp_2to3_migration_client.egg-info/dependency_links.txt +0 -1
  33. data/pulp_2to3_migration_client.egg-info/requires.txt +0 -4
  34. data/pulp_2to3_migration_client.egg-info/top_level.txt +0 -1
  35. data/pulpcore/__init__.py +0 -2
  36. data/pulpcore/client/__init__.py +0 -2
  37. data/pulpcore/client/pulp_2to3_migration/__init__.py +0 -43
  38. data/pulpcore/client/pulp_2to3_migration/api/__init__.py +0 -8
  39. data/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +0 -761
  40. data/pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py +0 -350
  41. data/pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py +0 -313
  42. data/pulpcore/client/pulp_2to3_migration/api_client.py +0 -667
  43. data/pulpcore/client/pulp_2to3_migration/configuration.py +0 -427
  44. data/pulpcore/client/pulp_2to3_migration/exceptions.py +0 -121
  45. data/pulpcore/client/pulp_2to3_migration/models/__init__.py +0 -26
  46. data/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +0 -124
  47. data/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +0 -179
  48. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py +0 -197
  49. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py +0 -197
  50. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py +0 -197
  51. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +0 -124
  52. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py +0 -178
  53. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py +0 -338
  54. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py +0 -416
  55. data/pulpcore/client/pulp_2to3_migration/rest.py +0 -292
  56. data/requirements.txt +0 -6
  57. data/setup.cfg +0 -2
  58. data/setup.py +0 -42
  59. data/test-requirements.txt +0 -3
  60. data/test/__init__.py +0 -0
  61. data/test/test_async_operation_response.py +0 -54
  62. data/test/test_migration_plan_run.py +0 -55
  63. data/test/test_migration_plans_api.py +0 -76
  64. data/test/test_paginatedpulp2to3_migration_migration_plan_response_list.py +0 -61
  65. data/test/test_paginatedpulp2to3_migration_pulp2_content_response_list.py +0 -67
  66. data/test/test_paginatedpulp2to3_migration_pulp2_repository_response_list.py +0 -72
  67. data/test/test_pulp2_content_api.py +0 -48
  68. data/test/test_pulp2_repositories_api.py +0 -48
  69. data/test/test_pulp2to3_migration_migration_plan.py +0 -54
  70. data/test/test_pulp2to3_migration_migration_plan_response.py +0 -56
  71. data/test/test_pulp2to3_migration_pulp2_content_response.py +0 -65
  72. data/test/test_pulp2to3_migration_pulp2_repository_response.py +0 -69
  73. data/tox.ini +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5e7326240fb964e217f0e202bbd7eaa86513509ee9b5503b3b1fc4ad9b5a9b8
4
- data.tar.gz: 4ed1c9f6323037ee4d35399b3fe541ad570818e27b5455303959d6866056a317
3
+ metadata.gz: 9bfa6307b99367ecb23a2a0a65b67d45ae2035828326dcac1a90c2425ce1c966
4
+ data.tar.gz: 7cc5a471aed0a832e3f4fa200620aa51948e569f3a2895a976ac9880916b3c99
5
5
  SHA512:
6
- metadata.gz: ef81253e037d74e8751d847cd7f4a9048b7eac23b9b5bc28b68678dc844dc5bb329b8bec376e9ce6ed95033d25b5afdf865a52152d76c20b44bd69cfc9bc5039
7
- data.tar.gz: 45a06f5f598ec9dfae3d6cd5f4df5888e78082d0dd06fa1a1a36cca500ec4fcd37dc459d73a6b1eaedd700352f7c86ab71e8816c4e96295869abb47fa15a2f5b
6
+ metadata.gz: 98a58b40dc7be999c610e53e6418b83ede64d737d06287a2a3752f40fc2f4390b6dd165b52b1f851da7a9b90d8489b576425e01cf1df21f5206ec45f726b4890
7
+ data.tar.gz: d1bb0d786d100e35e49a595e6f4c2545a93c0b1bc1999d4523cd0079dd9298ec4f9698c81572e37349e0b8654acd581daaffd797702a37f806a9df806a988aab
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.12.0
10
+ - Package version: 0.12.1
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.12.0.gem
27
+ gem install ./pulp_2to3_migration_client-0.12.1.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./pulp_2to3_migration_client-0.12.0.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./pulp_2to3_migration_client-0.12.1.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.12.0'
36
+ gem 'pulp_2to3_migration_client', '~> 0.12.1'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -53,8 +53,10 @@ module Pulp2to3MigrationClient
53
53
  :client_cert => @config.ssl_client_cert,
54
54
  :client_key => @config.ssl_client_key
55
55
  }
56
-
57
- connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
56
+ request_options = {
57
+ :params_encoder => @config.params_encoder
58
+ }
59
+ connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
58
60
  conn.basic_auth(config.username, config.password)
59
61
  if opts[:header_params]["Content-Type"] == "multipart/form-data"
60
62
  conn.request :multipart
@@ -109,6 +109,12 @@ module Pulp2to3MigrationClient
109
109
  # Client private key file (for client certificate)
110
110
  attr_accessor :ssl_client_key
111
111
 
112
+ # Set this to customize parameters encoder of array parameter.
113
+ # Default to nil. Faraday uses NestedParamsEncoder when nil.
114
+ #
115
+ # @see The params_encoder option of Faraday. Related source code:
116
+ # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
117
+ attr_accessor :params_encoder
112
118
  # Set this to customize parameters encoding of array parameter with multi collectionFormat.
113
119
  # Default to nil.
114
120
  #
@@ -133,6 +139,7 @@ module Pulp2to3MigrationClient
133
139
  @ssl_ca_file = nil
134
140
  @ssl_client_cert = nil
135
141
  @ssl_client_key = nil
142
+ @params_encoder = nil
136
143
  @debugging = false
137
144
  @inject_format = false
138
145
  @force_ending_format = false
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module Pulp2to3MigrationClient
14
- VERSION = '0.12.0'
14
+ VERSION = '0.12.1'
15
15
  end
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.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2021-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -74,29 +74,6 @@ files:
74
74
  - Gemfile
75
75
  - README.md
76
76
  - Rakefile
77
- - build/lib/pulpcore/__init__.py
78
- - build/lib/pulpcore/client/__init__.py
79
- - build/lib/pulpcore/client/pulp_2to3_migration/__init__.py
80
- - build/lib/pulpcore/client/pulp_2to3_migration/api/__init__.py
81
- - build/lib/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py
82
- - build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py
83
- - build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py
84
- - build/lib/pulpcore/client/pulp_2to3_migration/api_client.py
85
- - build/lib/pulpcore/client/pulp_2to3_migration/configuration.py
86
- - build/lib/pulpcore/client/pulp_2to3_migration/exceptions.py
87
- - build/lib/pulpcore/client/pulp_2to3_migration/models/__init__.py
88
- - build/lib/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py
89
- - build/lib/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py
90
- - build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py
91
- - build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py
92
- - build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py
93
- - build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py
94
- - build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py
95
- - build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py
96
- - build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py
97
- - build/lib/pulpcore/client/pulp_2to3_migration/rest.py
98
- - dist/pulp_2to3_migration-client-0.12.0.tar.gz
99
- - dist/pulp_2to3_migration_client-0.12.0-py3-none-any.whl
100
77
  - docs/AsyncOperationResponse.md
101
78
  - docs/MigrationPlanRun.md
102
79
  - docs/MigrationPlansApi.md
@@ -127,36 +104,7 @@ files:
127
104
  - lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_content_response.rb
128
105
  - lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_repository_response.rb
129
106
  - lib/pulp_2to3_migration_client/version.rb
130
- - pulp_2to3_migration_client.egg-info/PKG-INFO
131
- - pulp_2to3_migration_client.egg-info/SOURCES.txt
132
- - pulp_2to3_migration_client.egg-info/dependency_links.txt
133
- - pulp_2to3_migration_client.egg-info/requires.txt
134
- - pulp_2to3_migration_client.egg-info/top_level.txt
135
107
  - pulp_2to3_migration_client.gemspec
136
- - pulpcore/__init__.py
137
- - pulpcore/client/__init__.py
138
- - pulpcore/client/pulp_2to3_migration/__init__.py
139
- - pulpcore/client/pulp_2to3_migration/api/__init__.py
140
- - pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py
141
- - pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py
142
- - pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py
143
- - pulpcore/client/pulp_2to3_migration/api_client.py
144
- - pulpcore/client/pulp_2to3_migration/configuration.py
145
- - pulpcore/client/pulp_2to3_migration/exceptions.py
146
- - pulpcore/client/pulp_2to3_migration/models/__init__.py
147
- - pulpcore/client/pulp_2to3_migration/models/async_operation_response.py
148
- - pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py
149
- - pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py
150
- - pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py
151
- - pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py
152
- - pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py
153
- - pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py
154
- - pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py
155
- - pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py
156
- - pulpcore/client/pulp_2to3_migration/rest.py
157
- - requirements.txt
158
- - setup.cfg
159
- - setup.py
160
108
  - spec/api/migration_plans_api_spec.rb
161
109
  - spec/api/pulp2_content_api_spec.rb
162
110
  - spec/api/pulp2_repositories_api_spec.rb
@@ -172,21 +120,6 @@ files:
172
120
  - spec/models/pulp2to3_migration_pulp2_content_response_spec.rb
173
121
  - spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb
174
122
  - spec/spec_helper.rb
175
- - test-requirements.txt
176
- - test/__init__.py
177
- - test/test_async_operation_response.py
178
- - test/test_migration_plan_run.py
179
- - test/test_migration_plans_api.py
180
- - test/test_paginatedpulp2to3_migration_migration_plan_response_list.py
181
- - test/test_paginatedpulp2to3_migration_pulp2_content_response_list.py
182
- - test/test_paginatedpulp2to3_migration_pulp2_repository_response_list.py
183
- - test/test_pulp2_content_api.py
184
- - test/test_pulp2_repositories_api.py
185
- - test/test_pulp2to3_migration_migration_plan.py
186
- - test/test_pulp2to3_migration_migration_plan_response.py
187
- - test/test_pulp2to3_migration_pulp2_content_response.py
188
- - test/test_pulp2to3_migration_pulp2_repository_response.py
189
- - tox.ini
190
123
  homepage: https://openapi-generator.tech
191
124
  licenses:
192
125
  - GPL-2.0+
@@ -211,18 +144,18 @@ signing_key:
211
144
  specification_version: 4
212
145
  summary: Pulp 3 API Ruby Gem
213
146
  test_files:
214
- - spec/api/pulp2_content_api_spec.rb
215
147
  - spec/api/migration_plans_api_spec.rb
148
+ - spec/api/pulp2_content_api_spec.rb
216
149
  - spec/api/pulp2_repositories_api_spec.rb
217
150
  - spec/api_client_spec.rb
218
151
  - spec/configuration_spec.rb
219
- - spec/models/async_operation_response_spec.rb
152
+ - spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb
220
153
  - spec/models/pulp2to3_migration_migration_plan_response_spec.rb
154
+ - spec/models/async_operation_response_spec.rb
155
+ - spec/models/paginatedpulp2to3_migration_pulp2_repository_response_list_spec.rb
156
+ - spec/models/paginatedpulp2to3_migration_pulp2_content_response_list_spec.rb
221
157
  - spec/models/migration_plan_run_spec.rb
222
158
  - spec/models/pulp2to3_migration_pulp2_content_response_spec.rb
223
- - spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb
224
- - spec/models/paginatedpulp2to3_migration_migration_plan_response_list_spec.rb
225
159
  - spec/models/pulp2to3_migration_migration_plan_spec.rb
226
- - spec/models/paginatedpulp2to3_migration_pulp2_content_response_list_spec.rb
227
- - spec/models/paginatedpulp2to3_migration_pulp2_repository_response_list_spec.rb
160
+ - spec/models/paginatedpulp2to3_migration_migration_plan_response_list_spec.rb
228
161
  - spec/spec_helper.rb
@@ -1,2 +0,0 @@
1
- from pkgutil import extend_path
2
- __path__ = extend_path(__path__, __name__)
@@ -1,2 +0,0 @@
1
- from pkgutil import extend_path
2
- __path__ = extend_path(__path__, __name__)
@@ -1,43 +0,0 @@
1
- # coding: utf-8
2
-
3
- # flake8: noqa
4
-
5
- """
6
- Pulp 3 API
7
-
8
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
9
-
10
- The version of the OpenAPI document: v3
11
- Contact: pulp-list@redhat.com
12
- Generated by: https://openapi-generator.tech
13
- """
14
-
15
-
16
- from __future__ import absolute_import
17
-
18
- __version__ = "0.12.0"
19
-
20
- # import apis into sdk package
21
- from pulpcore.client.pulp_2to3_migration.api.migration_plans_api import MigrationPlansApi
22
- from pulpcore.client.pulp_2to3_migration.api.pulp2_content_api import Pulp2ContentApi
23
- from pulpcore.client.pulp_2to3_migration.api.pulp2_repositories_api import Pulp2RepositoriesApi
24
-
25
- # import ApiClient
26
- from pulpcore.client.pulp_2to3_migration.api_client import ApiClient
27
- from pulpcore.client.pulp_2to3_migration.configuration import Configuration
28
- from pulpcore.client.pulp_2to3_migration.exceptions import OpenApiException
29
- from pulpcore.client.pulp_2to3_migration.exceptions import ApiTypeError
30
- from pulpcore.client.pulp_2to3_migration.exceptions import ApiValueError
31
- from pulpcore.client.pulp_2to3_migration.exceptions import ApiKeyError
32
- from pulpcore.client.pulp_2to3_migration.exceptions import ApiException
33
- # import models into sdk package
34
- from pulpcore.client.pulp_2to3_migration.models.async_operation_response import AsyncOperationResponse
35
- from pulpcore.client.pulp_2to3_migration.models.migration_plan_run import MigrationPlanRun
36
- from pulpcore.client.pulp_2to3_migration.models.paginatedpulp2to3_migration_migration_plan_response_list import Paginatedpulp2to3MigrationMigrationPlanResponseList
37
- from pulpcore.client.pulp_2to3_migration.models.paginatedpulp2to3_migration_pulp2_content_response_list import Paginatedpulp2to3MigrationPulp2ContentResponseList
38
- from pulpcore.client.pulp_2to3_migration.models.paginatedpulp2to3_migration_pulp2_repository_response_list import Paginatedpulp2to3MigrationPulp2RepositoryResponseList
39
- from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan import Pulp2to3MigrationMigrationPlan
40
- from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan_response import Pulp2to3MigrationMigrationPlanResponse
41
- from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_content_response import Pulp2to3MigrationPulp2ContentResponse
42
- from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_repository_response import Pulp2to3MigrationPulp2RepositoryResponse
43
-
@@ -1,8 +0,0 @@
1
- from __future__ import absolute_import
2
-
3
- # flake8: noqa
4
-
5
- # import apis into api package
6
- from pulpcore.client.pulp_2to3_migration.api.migration_plans_api import MigrationPlansApi
7
- from pulpcore.client.pulp_2to3_migration.api.pulp2_content_api import Pulp2ContentApi
8
- from pulpcore.client.pulp_2to3_migration.api.pulp2_repositories_api import Pulp2RepositoriesApi
@@ -1,761 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Pulp 3 API
5
-
6
- Fetch, Upload, Organize, and Distribute Software Packages # noqa: E501
7
-
8
- The version of the OpenAPI document: v3
9
- Contact: pulp-list@redhat.com
10
- Generated by: https://openapi-generator.tech
11
- """
12
-
13
-
14
- from __future__ import absolute_import
15
-
16
- import re # noqa: F401
17
-
18
- # python 2 and python 3 compatibility library
19
- import six
20
-
21
- from pulpcore.client.pulp_2to3_migration.api_client import ApiClient
22
- from pulpcore.client.pulp_2to3_migration.exceptions import ( # noqa: F401
23
- ApiTypeError,
24
- ApiValueError
25
- )
26
-
27
-
28
- class MigrationPlansApi(object):
29
- """NOTE: This class is auto generated by OpenAPI Generator
30
- Ref: https://openapi-generator.tech
31
-
32
- Do not edit the class manually.
33
- """
34
-
35
- def __init__(self, api_client=None):
36
- if api_client is None:
37
- api_client = ApiClient()
38
- self.api_client = api_client
39
-
40
- def create(self, pulp2to3_migration_migration_plan, **kwargs): # noqa: E501
41
- """Create a migration plan # noqa: E501
42
-
43
- MigrationPlan ViewSet. # noqa: E501
44
- This method makes a synchronous HTTP request by default. To make an
45
- asynchronous HTTP request, please pass async_req=True
46
- >>> thread = api.create(pulp2to3_migration_migration_plan, async_req=True)
47
- >>> result = thread.get()
48
-
49
- :param async_req bool: execute request asynchronously
50
- :param Pulp2to3MigrationMigrationPlan pulp2to3_migration_migration_plan: (required)
51
- :param _preload_content: if False, the urllib3.HTTPResponse object will
52
- be returned without reading/decoding response
53
- data. Default is True.
54
- :param _request_timeout: timeout setting for this request. If one
55
- number provided, it will be total request
56
- timeout. It can also be a pair (tuple) of
57
- (connection, read) timeouts.
58
- :return: Pulp2to3MigrationMigrationPlanResponse
59
- If the method is called asynchronously,
60
- returns the request thread.
61
- """
62
- kwargs['_return_http_data_only'] = True
63
- return self.create_with_http_info(pulp2to3_migration_migration_plan, **kwargs) # noqa: E501
64
-
65
- def create_with_http_info(self, pulp2to3_migration_migration_plan, **kwargs): # noqa: E501
66
- """Create a migration plan # noqa: E501
67
-
68
- MigrationPlan ViewSet. # noqa: E501
69
- This method makes a synchronous HTTP request by default. To make an
70
- asynchronous HTTP request, please pass async_req=True
71
- >>> thread = api.create_with_http_info(pulp2to3_migration_migration_plan, async_req=True)
72
- >>> result = thread.get()
73
-
74
- :param async_req bool: execute request asynchronously
75
- :param Pulp2to3MigrationMigrationPlan pulp2to3_migration_migration_plan: (required)
76
- :param _return_http_data_only: response data without head status code
77
- and headers
78
- :param _preload_content: if False, the urllib3.HTTPResponse object will
79
- be returned without reading/decoding response
80
- data. Default is True.
81
- :param _request_timeout: timeout setting for this request. If one
82
- number provided, it will be total request
83
- timeout. It can also be a pair (tuple) of
84
- (connection, read) timeouts.
85
- :return: tuple(Pulp2to3MigrationMigrationPlanResponse, status_code(int), headers(HTTPHeaderDict))
86
- If the method is called asynchronously,
87
- returns the request thread.
88
- """
89
-
90
- local_var_params = locals()
91
-
92
- all_params = [
93
- 'pulp2to3_migration_migration_plan'
94
- ]
95
- all_params.extend(
96
- [
97
- 'async_req',
98
- '_return_http_data_only',
99
- '_preload_content',
100
- '_request_timeout'
101
- ]
102
- )
103
-
104
- for key, val in six.iteritems(local_var_params['kwargs']):
105
- if key not in all_params:
106
- raise ApiTypeError(
107
- "Got an unexpected keyword argument '%s'"
108
- " to method create" % key
109
- )
110
- local_var_params[key] = val
111
- del local_var_params['kwargs']
112
- # verify the required parameter 'pulp2to3_migration_migration_plan' is set
113
- if self.api_client.client_side_validation and ('pulp2to3_migration_migration_plan' not in local_var_params or # noqa: E501
114
- local_var_params['pulp2to3_migration_migration_plan'] is None): # noqa: E501
115
- raise ApiValueError("Missing the required parameter `pulp2to3_migration_migration_plan` when calling `create`") # noqa: E501
116
-
117
- collection_formats = {}
118
-
119
- path_params = {}
120
-
121
- query_params = []
122
-
123
- header_params = {}
124
-
125
- form_params = []
126
- local_var_files = {}
127
-
128
- body_params = None
129
- if 'pulp2to3_migration_migration_plan' in local_var_params:
130
- body_params = local_var_params['pulp2to3_migration_migration_plan']
131
- # HTTP header `Accept`
132
- header_params['Accept'] = self.api_client.select_header_accept(
133
- ['application/json']) # noqa: E501
134
-
135
- # HTTP header `Content-Type`
136
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
137
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
138
-
139
- # Authentication setting
140
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
141
-
142
- return self.api_client.call_api(
143
- '/pulp/api/v3/migration-plans/', 'POST',
144
- path_params,
145
- query_params,
146
- header_params,
147
- body=body_params,
148
- post_params=form_params,
149
- files=local_var_files,
150
- response_type='Pulp2to3MigrationMigrationPlanResponse', # noqa: E501
151
- auth_settings=auth_settings,
152
- async_req=local_var_params.get('async_req'),
153
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
154
- _preload_content=local_var_params.get('_preload_content', True),
155
- _request_timeout=local_var_params.get('_request_timeout'),
156
- collection_formats=collection_formats)
157
-
158
- def delete(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
159
- """Delete a migration plan # noqa: E501
160
-
161
- MigrationPlan ViewSet. # noqa: E501
162
- This method makes a synchronous HTTP request by default. To make an
163
- asynchronous HTTP request, please pass async_req=True
164
- >>> thread = api.delete(pulp_2to3_migration_migration_plan_href, async_req=True)
165
- >>> result = thread.get()
166
-
167
- :param async_req bool: execute request asynchronously
168
- :param str pulp_2to3_migration_migration_plan_href: (required)
169
- :param _preload_content: if False, the urllib3.HTTPResponse object will
170
- be returned without reading/decoding response
171
- data. Default is True.
172
- :param _request_timeout: timeout setting for this request. If one
173
- number provided, it will be total request
174
- timeout. It can also be a pair (tuple) of
175
- (connection, read) timeouts.
176
- :return: None
177
- If the method is called asynchronously,
178
- returns the request thread.
179
- """
180
- kwargs['_return_http_data_only'] = True
181
- return self.delete_with_http_info(pulp_2to3_migration_migration_plan_href, **kwargs) # noqa: E501
182
-
183
- def delete_with_http_info(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
184
- """Delete a migration plan # noqa: E501
185
-
186
- MigrationPlan ViewSet. # noqa: E501
187
- This method makes a synchronous HTTP request by default. To make an
188
- asynchronous HTTP request, please pass async_req=True
189
- >>> thread = api.delete_with_http_info(pulp_2to3_migration_migration_plan_href, async_req=True)
190
- >>> result = thread.get()
191
-
192
- :param async_req bool: execute request asynchronously
193
- :param str pulp_2to3_migration_migration_plan_href: (required)
194
- :param _return_http_data_only: response data without head status code
195
- and headers
196
- :param _preload_content: if False, the urllib3.HTTPResponse object will
197
- be returned without reading/decoding response
198
- data. Default is True.
199
- :param _request_timeout: timeout setting for this request. If one
200
- number provided, it will be total request
201
- timeout. It can also be a pair (tuple) of
202
- (connection, read) timeouts.
203
- :return: None
204
- If the method is called asynchronously,
205
- returns the request thread.
206
- """
207
-
208
- local_var_params = locals()
209
-
210
- all_params = [
211
- 'pulp_2to3_migration_migration_plan_href'
212
- ]
213
- all_params.extend(
214
- [
215
- 'async_req',
216
- '_return_http_data_only',
217
- '_preload_content',
218
- '_request_timeout'
219
- ]
220
- )
221
-
222
- for key, val in six.iteritems(local_var_params['kwargs']):
223
- if key not in all_params:
224
- raise ApiTypeError(
225
- "Got an unexpected keyword argument '%s'"
226
- " to method delete" % key
227
- )
228
- local_var_params[key] = val
229
- del local_var_params['kwargs']
230
- # verify the required parameter 'pulp_2to3_migration_migration_plan_href' is set
231
- if self.api_client.client_side_validation and ('pulp_2to3_migration_migration_plan_href' not in local_var_params or # noqa: E501
232
- local_var_params['pulp_2to3_migration_migration_plan_href'] is None): # noqa: E501
233
- raise ApiValueError("Missing the required parameter `pulp_2to3_migration_migration_plan_href` when calling `delete`") # noqa: E501
234
-
235
- collection_formats = {}
236
-
237
- path_params = {}
238
- if 'pulp_2to3_migration_migration_plan_href' in local_var_params:
239
- path_params['pulp_2to3_migration_migration_plan_href'] = local_var_params['pulp_2to3_migration_migration_plan_href'] # noqa: E501
240
-
241
- query_params = []
242
-
243
- header_params = {}
244
-
245
- form_params = []
246
- local_var_files = {}
247
-
248
- body_params = None
249
- # Authentication setting
250
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
251
-
252
- return self.api_client.call_api(
253
- '{pulp_2to3_migration_migration_plan_href}', 'DELETE',
254
- path_params,
255
- query_params,
256
- header_params,
257
- body=body_params,
258
- post_params=form_params,
259
- files=local_var_files,
260
- response_type=None, # noqa: E501
261
- auth_settings=auth_settings,
262
- async_req=local_var_params.get('async_req'),
263
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
264
- _preload_content=local_var_params.get('_preload_content', True),
265
- _request_timeout=local_var_params.get('_request_timeout'),
266
- collection_formats=collection_formats)
267
-
268
- def list(self, **kwargs): # noqa: E501
269
- """List migration plans # noqa: E501
270
-
271
- MigrationPlan ViewSet. # noqa: E501
272
- This method makes a synchronous HTTP request by default. To make an
273
- asynchronous HTTP request, please pass async_req=True
274
- >>> thread = api.list(async_req=True)
275
- >>> result = thread.get()
276
-
277
- :param async_req bool: execute request asynchronously
278
- :param int limit: Number of results to return per page.
279
- :param int offset: The initial index from which to return the results.
280
- :param str ordering: Which field to use when ordering the results.
281
- :param str fields: A list of fields to include in the response.
282
- :param str exclude_fields: A list of fields to exclude from the response.
283
- :param _preload_content: if False, the urllib3.HTTPResponse object will
284
- be returned without reading/decoding response
285
- data. Default is True.
286
- :param _request_timeout: timeout setting for this request. If one
287
- number provided, it will be total request
288
- timeout. It can also be a pair (tuple) of
289
- (connection, read) timeouts.
290
- :return: Paginatedpulp2to3MigrationMigrationPlanResponseList
291
- If the method is called asynchronously,
292
- returns the request thread.
293
- """
294
- kwargs['_return_http_data_only'] = True
295
- return self.list_with_http_info(**kwargs) # noqa: E501
296
-
297
- def list_with_http_info(self, **kwargs): # noqa: E501
298
- """List migration plans # noqa: E501
299
-
300
- MigrationPlan ViewSet. # noqa: E501
301
- This method makes a synchronous HTTP request by default. To make an
302
- asynchronous HTTP request, please pass async_req=True
303
- >>> thread = api.list_with_http_info(async_req=True)
304
- >>> result = thread.get()
305
-
306
- :param async_req bool: execute request asynchronously
307
- :param int limit: Number of results to return per page.
308
- :param int offset: The initial index from which to return the results.
309
- :param str ordering: Which field to use when ordering the results.
310
- :param str fields: A list of fields to include in the response.
311
- :param str exclude_fields: A list of fields to exclude from the response.
312
- :param _return_http_data_only: response data without head status code
313
- and headers
314
- :param _preload_content: if False, the urllib3.HTTPResponse object will
315
- be returned without reading/decoding response
316
- data. Default is True.
317
- :param _request_timeout: timeout setting for this request. If one
318
- number provided, it will be total request
319
- timeout. It can also be a pair (tuple) of
320
- (connection, read) timeouts.
321
- :return: tuple(Paginatedpulp2to3MigrationMigrationPlanResponseList, status_code(int), headers(HTTPHeaderDict))
322
- If the method is called asynchronously,
323
- returns the request thread.
324
- """
325
-
326
- local_var_params = locals()
327
-
328
- all_params = [
329
- 'limit',
330
- 'offset',
331
- 'ordering',
332
- 'fields',
333
- 'exclude_fields'
334
- ]
335
- all_params.extend(
336
- [
337
- 'async_req',
338
- '_return_http_data_only',
339
- '_preload_content',
340
- '_request_timeout'
341
- ]
342
- )
343
-
344
- for key, val in six.iteritems(local_var_params['kwargs']):
345
- if key not in all_params:
346
- raise ApiTypeError(
347
- "Got an unexpected keyword argument '%s'"
348
- " to method list" % key
349
- )
350
- local_var_params[key] = val
351
- del local_var_params['kwargs']
352
-
353
- collection_formats = {}
354
-
355
- path_params = {}
356
-
357
- query_params = []
358
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
359
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
360
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
361
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
362
- if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
363
- query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
364
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
365
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
366
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
367
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
368
-
369
- header_params = {}
370
-
371
- form_params = []
372
- local_var_files = {}
373
-
374
- body_params = None
375
- # HTTP header `Accept`
376
- header_params['Accept'] = self.api_client.select_header_accept(
377
- ['application/json']) # noqa: E501
378
-
379
- # Authentication setting
380
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
381
-
382
- return self.api_client.call_api(
383
- '/pulp/api/v3/migration-plans/', 'GET',
384
- path_params,
385
- query_params,
386
- header_params,
387
- body=body_params,
388
- post_params=form_params,
389
- files=local_var_files,
390
- response_type='Paginatedpulp2to3MigrationMigrationPlanResponseList', # noqa: E501
391
- auth_settings=auth_settings,
392
- async_req=local_var_params.get('async_req'),
393
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
394
- _preload_content=local_var_params.get('_preload_content', True),
395
- _request_timeout=local_var_params.get('_request_timeout'),
396
- collection_formats=collection_formats)
397
-
398
- def read(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
399
- """Inspect a migration plan # noqa: E501
400
-
401
- MigrationPlan ViewSet. # noqa: E501
402
- This method makes a synchronous HTTP request by default. To make an
403
- asynchronous HTTP request, please pass async_req=True
404
- >>> thread = api.read(pulp_2to3_migration_migration_plan_href, async_req=True)
405
- >>> result = thread.get()
406
-
407
- :param async_req bool: execute request asynchronously
408
- :param str pulp_2to3_migration_migration_plan_href: (required)
409
- :param str fields: A list of fields to include in the response.
410
- :param str exclude_fields: A list of fields to exclude from the response.
411
- :param _preload_content: if False, the urllib3.HTTPResponse object will
412
- be returned without reading/decoding response
413
- data. Default is True.
414
- :param _request_timeout: timeout setting for this request. If one
415
- number provided, it will be total request
416
- timeout. It can also be a pair (tuple) of
417
- (connection, read) timeouts.
418
- :return: Pulp2to3MigrationMigrationPlanResponse
419
- If the method is called asynchronously,
420
- returns the request thread.
421
- """
422
- kwargs['_return_http_data_only'] = True
423
- return self.read_with_http_info(pulp_2to3_migration_migration_plan_href, **kwargs) # noqa: E501
424
-
425
- def read_with_http_info(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
426
- """Inspect a migration plan # noqa: E501
427
-
428
- MigrationPlan ViewSet. # noqa: E501
429
- This method makes a synchronous HTTP request by default. To make an
430
- asynchronous HTTP request, please pass async_req=True
431
- >>> thread = api.read_with_http_info(pulp_2to3_migration_migration_plan_href, async_req=True)
432
- >>> result = thread.get()
433
-
434
- :param async_req bool: execute request asynchronously
435
- :param str pulp_2to3_migration_migration_plan_href: (required)
436
- :param str fields: A list of fields to include in the response.
437
- :param str exclude_fields: A list of fields to exclude from the response.
438
- :param _return_http_data_only: response data without head status code
439
- and headers
440
- :param _preload_content: if False, the urllib3.HTTPResponse object will
441
- be returned without reading/decoding response
442
- data. Default is True.
443
- :param _request_timeout: timeout setting for this request. If one
444
- number provided, it will be total request
445
- timeout. It can also be a pair (tuple) of
446
- (connection, read) timeouts.
447
- :return: tuple(Pulp2to3MigrationMigrationPlanResponse, status_code(int), headers(HTTPHeaderDict))
448
- If the method is called asynchronously,
449
- returns the request thread.
450
- """
451
-
452
- local_var_params = locals()
453
-
454
- all_params = [
455
- 'pulp_2to3_migration_migration_plan_href',
456
- 'fields',
457
- 'exclude_fields'
458
- ]
459
- all_params.extend(
460
- [
461
- 'async_req',
462
- '_return_http_data_only',
463
- '_preload_content',
464
- '_request_timeout'
465
- ]
466
- )
467
-
468
- for key, val in six.iteritems(local_var_params['kwargs']):
469
- if key not in all_params:
470
- raise ApiTypeError(
471
- "Got an unexpected keyword argument '%s'"
472
- " to method read" % key
473
- )
474
- local_var_params[key] = val
475
- del local_var_params['kwargs']
476
- # verify the required parameter 'pulp_2to3_migration_migration_plan_href' is set
477
- if self.api_client.client_side_validation and ('pulp_2to3_migration_migration_plan_href' not in local_var_params or # noqa: E501
478
- local_var_params['pulp_2to3_migration_migration_plan_href'] is None): # noqa: E501
479
- raise ApiValueError("Missing the required parameter `pulp_2to3_migration_migration_plan_href` when calling `read`") # noqa: E501
480
-
481
- collection_formats = {}
482
-
483
- path_params = {}
484
- if 'pulp_2to3_migration_migration_plan_href' in local_var_params:
485
- path_params['pulp_2to3_migration_migration_plan_href'] = local_var_params['pulp_2to3_migration_migration_plan_href'] # noqa: E501
486
-
487
- query_params = []
488
- if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
489
- query_params.append(('fields', local_var_params['fields'])) # noqa: E501
490
- if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
491
- query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
492
-
493
- header_params = {}
494
-
495
- form_params = []
496
- local_var_files = {}
497
-
498
- body_params = None
499
- # HTTP header `Accept`
500
- header_params['Accept'] = self.api_client.select_header_accept(
501
- ['application/json']) # noqa: E501
502
-
503
- # Authentication setting
504
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
505
-
506
- return self.api_client.call_api(
507
- '{pulp_2to3_migration_migration_plan_href}', 'GET',
508
- path_params,
509
- query_params,
510
- header_params,
511
- body=body_params,
512
- post_params=form_params,
513
- files=local_var_files,
514
- response_type='Pulp2to3MigrationMigrationPlanResponse', # noqa: E501
515
- auth_settings=auth_settings,
516
- async_req=local_var_params.get('async_req'),
517
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
518
- _preload_content=local_var_params.get('_preload_content', True),
519
- _request_timeout=local_var_params.get('_request_timeout'),
520
- collection_formats=collection_formats)
521
-
522
- def reset(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
523
- """Reset Pulp 3 data for plugins specified in the migration plan # noqa: E501
524
-
525
- Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan. # noqa: E501
526
- This method makes a synchronous HTTP request by default. To make an
527
- asynchronous HTTP request, please pass async_req=True
528
- >>> thread = api.reset(pulp_2to3_migration_migration_plan_href, async_req=True)
529
- >>> result = thread.get()
530
-
531
- :param async_req bool: execute request asynchronously
532
- :param str pulp_2to3_migration_migration_plan_href: (required)
533
- :param _preload_content: if False, the urllib3.HTTPResponse object will
534
- be returned without reading/decoding response
535
- data. Default is True.
536
- :param _request_timeout: timeout setting for this request. If one
537
- number provided, it will be total request
538
- timeout. It can also be a pair (tuple) of
539
- (connection, read) timeouts.
540
- :return: AsyncOperationResponse
541
- If the method is called asynchronously,
542
- returns the request thread.
543
- """
544
- kwargs['_return_http_data_only'] = True
545
- return self.reset_with_http_info(pulp_2to3_migration_migration_plan_href, **kwargs) # noqa: E501
546
-
547
- def reset_with_http_info(self, pulp_2to3_migration_migration_plan_href, **kwargs): # noqa: E501
548
- """Reset Pulp 3 data for plugins specified in the migration plan # noqa: E501
549
-
550
- Trigger an asynchronous task to remove data from Pulp 3 related to the plugins specified in the migration plan. # noqa: E501
551
- This method makes a synchronous HTTP request by default. To make an
552
- asynchronous HTTP request, please pass async_req=True
553
- >>> thread = api.reset_with_http_info(pulp_2to3_migration_migration_plan_href, async_req=True)
554
- >>> result = thread.get()
555
-
556
- :param async_req bool: execute request asynchronously
557
- :param str pulp_2to3_migration_migration_plan_href: (required)
558
- :param _return_http_data_only: response data without head status code
559
- and headers
560
- :param _preload_content: if False, the urllib3.HTTPResponse object will
561
- be returned without reading/decoding response
562
- data. Default is True.
563
- :param _request_timeout: timeout setting for this request. If one
564
- number provided, it will be total request
565
- timeout. It can also be a pair (tuple) of
566
- (connection, read) timeouts.
567
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
568
- If the method is called asynchronously,
569
- returns the request thread.
570
- """
571
-
572
- local_var_params = locals()
573
-
574
- all_params = [
575
- 'pulp_2to3_migration_migration_plan_href'
576
- ]
577
- all_params.extend(
578
- [
579
- 'async_req',
580
- '_return_http_data_only',
581
- '_preload_content',
582
- '_request_timeout'
583
- ]
584
- )
585
-
586
- for key, val in six.iteritems(local_var_params['kwargs']):
587
- if key not in all_params:
588
- raise ApiTypeError(
589
- "Got an unexpected keyword argument '%s'"
590
- " to method reset" % key
591
- )
592
- local_var_params[key] = val
593
- del local_var_params['kwargs']
594
- # verify the required parameter 'pulp_2to3_migration_migration_plan_href' is set
595
- if self.api_client.client_side_validation and ('pulp_2to3_migration_migration_plan_href' not in local_var_params or # noqa: E501
596
- local_var_params['pulp_2to3_migration_migration_plan_href'] is None): # noqa: E501
597
- raise ApiValueError("Missing the required parameter `pulp_2to3_migration_migration_plan_href` when calling `reset`") # noqa: E501
598
-
599
- collection_formats = {}
600
-
601
- path_params = {}
602
- if 'pulp_2to3_migration_migration_plan_href' in local_var_params:
603
- path_params['pulp_2to3_migration_migration_plan_href'] = local_var_params['pulp_2to3_migration_migration_plan_href'] # noqa: E501
604
-
605
- query_params = []
606
-
607
- header_params = {}
608
-
609
- form_params = []
610
- local_var_files = {}
611
-
612
- body_params = None
613
- # HTTP header `Accept`
614
- header_params['Accept'] = self.api_client.select_header_accept(
615
- ['application/json']) # noqa: E501
616
-
617
- # Authentication setting
618
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
619
-
620
- return self.api_client.call_api(
621
- '{pulp_2to3_migration_migration_plan_href}reset/', 'POST',
622
- path_params,
623
- query_params,
624
- header_params,
625
- body=body_params,
626
- post_params=form_params,
627
- files=local_var_files,
628
- response_type='AsyncOperationResponse', # noqa: E501
629
- auth_settings=auth_settings,
630
- async_req=local_var_params.get('async_req'),
631
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
632
- _preload_content=local_var_params.get('_preload_content', True),
633
- _request_timeout=local_var_params.get('_request_timeout'),
634
- collection_formats=collection_formats)
635
-
636
- def run(self, pulp_2to3_migration_migration_plan_href, migration_plan_run, **kwargs): # noqa: E501
637
- """Run migration plan # noqa: E501
638
-
639
- Trigger an asynchronous task to run a migration from Pulp 2. # noqa: E501
640
- This method makes a synchronous HTTP request by default. To make an
641
- asynchronous HTTP request, please pass async_req=True
642
- >>> thread = api.run(pulp_2to3_migration_migration_plan_href, migration_plan_run, async_req=True)
643
- >>> result = thread.get()
644
-
645
- :param async_req bool: execute request asynchronously
646
- :param str pulp_2to3_migration_migration_plan_href: (required)
647
- :param MigrationPlanRun migration_plan_run: (required)
648
- :param _preload_content: if False, the urllib3.HTTPResponse object will
649
- be returned without reading/decoding response
650
- data. Default is True.
651
- :param _request_timeout: timeout setting for this request. If one
652
- number provided, it will be total request
653
- timeout. It can also be a pair (tuple) of
654
- (connection, read) timeouts.
655
- :return: AsyncOperationResponse
656
- If the method is called asynchronously,
657
- returns the request thread.
658
- """
659
- kwargs['_return_http_data_only'] = True
660
- return self.run_with_http_info(pulp_2to3_migration_migration_plan_href, migration_plan_run, **kwargs) # noqa: E501
661
-
662
- def run_with_http_info(self, pulp_2to3_migration_migration_plan_href, migration_plan_run, **kwargs): # noqa: E501
663
- """Run migration plan # noqa: E501
664
-
665
- Trigger an asynchronous task to run a migration from Pulp 2. # noqa: E501
666
- This method makes a synchronous HTTP request by default. To make an
667
- asynchronous HTTP request, please pass async_req=True
668
- >>> thread = api.run_with_http_info(pulp_2to3_migration_migration_plan_href, migration_plan_run, async_req=True)
669
- >>> result = thread.get()
670
-
671
- :param async_req bool: execute request asynchronously
672
- :param str pulp_2to3_migration_migration_plan_href: (required)
673
- :param MigrationPlanRun migration_plan_run: (required)
674
- :param _return_http_data_only: response data without head status code
675
- and headers
676
- :param _preload_content: if False, the urllib3.HTTPResponse object will
677
- be returned without reading/decoding response
678
- data. Default is True.
679
- :param _request_timeout: timeout setting for this request. If one
680
- number provided, it will be total request
681
- timeout. It can also be a pair (tuple) of
682
- (connection, read) timeouts.
683
- :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
684
- If the method is called asynchronously,
685
- returns the request thread.
686
- """
687
-
688
- local_var_params = locals()
689
-
690
- all_params = [
691
- 'pulp_2to3_migration_migration_plan_href',
692
- 'migration_plan_run'
693
- ]
694
- all_params.extend(
695
- [
696
- 'async_req',
697
- '_return_http_data_only',
698
- '_preload_content',
699
- '_request_timeout'
700
- ]
701
- )
702
-
703
- for key, val in six.iteritems(local_var_params['kwargs']):
704
- if key not in all_params:
705
- raise ApiTypeError(
706
- "Got an unexpected keyword argument '%s'"
707
- " to method run" % key
708
- )
709
- local_var_params[key] = val
710
- del local_var_params['kwargs']
711
- # verify the required parameter 'pulp_2to3_migration_migration_plan_href' is set
712
- if self.api_client.client_side_validation and ('pulp_2to3_migration_migration_plan_href' not in local_var_params or # noqa: E501
713
- local_var_params['pulp_2to3_migration_migration_plan_href'] is None): # noqa: E501
714
- raise ApiValueError("Missing the required parameter `pulp_2to3_migration_migration_plan_href` when calling `run`") # noqa: E501
715
- # verify the required parameter 'migration_plan_run' is set
716
- if self.api_client.client_side_validation and ('migration_plan_run' not in local_var_params or # noqa: E501
717
- local_var_params['migration_plan_run'] is None): # noqa: E501
718
- raise ApiValueError("Missing the required parameter `migration_plan_run` when calling `run`") # noqa: E501
719
-
720
- collection_formats = {}
721
-
722
- path_params = {}
723
- if 'pulp_2to3_migration_migration_plan_href' in local_var_params:
724
- path_params['pulp_2to3_migration_migration_plan_href'] = local_var_params['pulp_2to3_migration_migration_plan_href'] # noqa: E501
725
-
726
- query_params = []
727
-
728
- header_params = {}
729
-
730
- form_params = []
731
- local_var_files = {}
732
-
733
- body_params = None
734
- if 'migration_plan_run' in local_var_params:
735
- body_params = local_var_params['migration_plan_run']
736
- # HTTP header `Accept`
737
- header_params['Accept'] = self.api_client.select_header_accept(
738
- ['application/json']) # noqa: E501
739
-
740
- # HTTP header `Content-Type`
741
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
742
- ['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data']) # noqa: E501
743
-
744
- # Authentication setting
745
- auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
746
-
747
- return self.api_client.call_api(
748
- '{pulp_2to3_migration_migration_plan_href}run/', 'POST',
749
- path_params,
750
- query_params,
751
- header_params,
752
- body=body_params,
753
- post_params=form_params,
754
- files=local_var_files,
755
- response_type='AsyncOperationResponse', # noqa: E501
756
- auth_settings=auth_settings,
757
- async_req=local_var_params.get('async_req'),
758
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
759
- _preload_content=local_var_params.get('_preload_content', True),
760
- _request_timeout=local_var_params.get('_request_timeout'),
761
- collection_formats=collection_formats)