pulp_2to3_migration_client 0.2.0b2.dev01587232611 → 0.2.0b3

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -7
  3. data/docs/InlineResponse200.md +1 -1
  4. data/docs/InlineResponse2001.md +1 -1
  5. data/docs/InlineResponse2002.md +1 -1
  6. data/docs/MigrationPlansApi.md +5 -5
  7. data/docs/Pulp2contentApi.md +3 -3
  8. data/docs/Pulp2repositoriesApi.md +3 -3
  9. data/docs/Pulp2to3MigrationMigrationPlanRead.md +21 -0
  10. data/docs/{Pulp2to3MigrationPulp2Content.md → Pulp2to3MigrationPulp2ContentRead.md} +5 -3
  11. data/docs/{Pulp2to3MigrationPulp2Repository.md → Pulp2to3MigrationPulp2RepositoryRead.md} +2 -2
  12. data/lib/pulp_2to3_migration_client.rb +3 -2
  13. data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +6 -6
  14. data/lib/pulp_2to3_migration_client/api/pulp2content_api.rb +3 -3
  15. data/lib/pulp_2to3_migration_client/api/pulp2repositories_api.rb +3 -3
  16. data/lib/pulp_2to3_migration_client/configuration.rb +2 -2
  17. data/lib/pulp_2to3_migration_client/models/inline_response200.rb +1 -1
  18. data/lib/pulp_2to3_migration_client/models/inline_response2001.rb +1 -1
  19. data/lib/pulp_2to3_migration_client/models/inline_response2002.rb +1 -1
  20. data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan_read.rb +231 -0
  21. data/lib/pulp_2to3_migration_client/models/{pulp2to3_migration_pulp2_content.rb → pulp2to3_migration_pulp2_content_read.rb} +33 -8
  22. data/lib/pulp_2to3_migration_client/models/{pulp2to3_migration_pulp2_repository.rb → pulp2to3_migration_pulp2_repository_read.rb} +3 -3
  23. data/lib/pulp_2to3_migration_client/version.rb +1 -1
  24. data/pulpcore/__init__.py +2 -0
  25. data/pulpcore/client/__init__.py +2 -0
  26. data/pulpcore/client/pulp_2to3_migration/__init__.py +42 -0
  27. data/pulpcore/client/pulp_2to3_migration/api/__init__.py +8 -0
  28. data/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +609 -0
  29. data/pulpcore/client/pulp_2to3_migration/api/pulp2content_api.py +317 -0
  30. data/pulpcore/client/pulp_2to3_migration/api/pulp2repositories_api.py +289 -0
  31. data/pulpcore/client/pulp_2to3_migration/api_client.py +647 -0
  32. data/pulpcore/client/pulp_2to3_migration/configuration.py +387 -0
  33. data/pulpcore/client/pulp_2to3_migration/exceptions.py +120 -0
  34. data/pulpcore/client/pulp_2to3_migration/models/__init__.py +25 -0
  35. data/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +123 -0
  36. data/pulpcore/client/pulp_2to3_migration/models/inline_response200.py +198 -0
  37. data/pulpcore/client/pulp_2to3_migration/models/inline_response2001.py +198 -0
  38. data/pulpcore/client/pulp_2to3_migration/models/inline_response2002.py +198 -0
  39. data/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +150 -0
  40. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +177 -0
  41. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_read.py +177 -0
  42. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_read.py +353 -0
  43. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_read.py +441 -0
  44. data/pulpcore/client/pulp_2to3_migration/rest.py +296 -0
  45. data/requirements.txt +6 -0
  46. data/setup.cfg +2 -0
  47. data/setup.py +41 -0
  48. data/spec/api/migration_plans_api_spec.rb +2 -2
  49. data/spec/api/pulp2content_api_spec.rb +1 -1
  50. data/spec/api/pulp2repositories_api_spec.rb +1 -1
  51. data/spec/configuration_spec.rb +3 -3
  52. data/spec/models/pulp2to3_migration_migration_plan_read_spec.rb +53 -0
  53. data/spec/models/{pulp2to3_migration_pulp2_content_spec.rb → pulp2to3_migration_pulp2_content_read_spec.rb} +12 -6
  54. data/spec/models/{pulp2to3_migration_pulp2_repository_spec.rb → pulp2to3_migration_pulp2_repository_read_spec.rb} +6 -6
  55. data/test-requirements.txt +3 -0
  56. data/test/__init__.py +0 -0
  57. data/test/test_async_operation_response.py +53 -0
  58. data/test/test_inline_response200.py +67 -0
  59. data/test/test_inline_response2001.py +79 -0
  60. data/test/test_inline_response2002.py +89 -0
  61. data/test/test_migration_plan_run.py +53 -0
  62. data/test/test_migration_plans_api.py +68 -0
  63. data/test/test_pulp2content_api.py +47 -0
  64. data/test/test_pulp2repositories_api.py +47 -0
  65. data/test/test_pulp2to3_migration_migration_plan.py +55 -0
  66. data/test/test_pulp2to3_migration_migration_plan_read.py +55 -0
  67. data/test/test_pulp2to3_migration_pulp2_content_read.py +64 -0
  68. data/test/test_pulp2to3_migration_pulp2_repository_read.py +68 -0
  69. data/tox.ini +9 -0
  70. metadata +53 -10
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module Pulp2to3MigrationClient
16
- class Pulp2to3MigrationPulp2Content
16
+ class Pulp2to3MigrationPulp2ContentRead
17
17
  attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
@@ -31,6 +31,9 @@ module Pulp2to3MigrationClient
31
31
 
32
32
  attr_accessor :pulp3_content
33
33
 
34
+ # Get pulp3_repository_version href from pulp2repo if available
35
+ attr_accessor :pulp3_repository_version
36
+
34
37
  # Attribute mapping from ruby-style variable name to JSON key.
35
38
  def self.attribute_map
36
39
  {
@@ -41,7 +44,8 @@ module Pulp2to3MigrationClient
41
44
  :'pulp2_last_updated' => :'pulp2_last_updated',
42
45
  :'pulp2_storage_path' => :'pulp2_storage_path',
43
46
  :'downloaded' => :'downloaded',
44
- :'pulp3_content' => :'pulp3_content'
47
+ :'pulp3_content' => :'pulp3_content',
48
+ :'pulp3_repository_version' => :'pulp3_repository_version'
45
49
  }
46
50
  end
47
51
 
@@ -55,14 +59,15 @@ module Pulp2to3MigrationClient
55
59
  :'pulp2_last_updated' => :'Integer',
56
60
  :'pulp2_storage_path' => :'String',
57
61
  :'downloaded' => :'Boolean',
58
- :'pulp3_content' => :'String'
62
+ :'pulp3_content' => :'String',
63
+ :'pulp3_repository_version' => :'String'
59
64
  }
60
65
  end
61
66
 
62
67
  # List of attributes with nullable: true
63
68
  def self.openapi_nullable
64
69
  Set.new([
65
- :'pulp3_content'
70
+ :'pulp3_content',
66
71
  ])
67
72
  end
68
73
 
@@ -70,13 +75,13 @@ module Pulp2to3MigrationClient
70
75
  # @param [Hash] attributes Model attributes in the form of hash
71
76
  def initialize(attributes = {})
72
77
  if (!attributes.is_a?(Hash))
73
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2Content` initialize method"
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2ContentRead` initialize method"
74
79
  end
75
80
 
76
81
  # check to see if the attribute exists and convert string to symbol for hash key
77
82
  attributes = attributes.each_with_object({}) { |(k, v), h|
78
83
  if (!self.class.attribute_map.key?(k.to_sym))
79
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2Content`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2ContentRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
85
  end
81
86
  h[k.to_sym] = v
82
87
  }
@@ -114,6 +119,10 @@ module Pulp2to3MigrationClient
114
119
  if attributes.key?(:'pulp3_content')
115
120
  self.pulp3_content = attributes[:'pulp3_content']
116
121
  end
122
+
123
+ if attributes.key?(:'pulp3_repository_version')
124
+ self.pulp3_repository_version = attributes[:'pulp3_repository_version']
125
+ end
117
126
  end
118
127
 
119
128
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -156,6 +165,10 @@ module Pulp2to3MigrationClient
156
165
  invalid_properties.push('invalid value for "pulp2_storage_path", the character length must be great than or equal to 1.')
157
166
  end
158
167
 
168
+ if !@pulp3_repository_version.nil? && @pulp3_repository_version.to_s.length < 1
169
+ invalid_properties.push('invalid value for "pulp3_repository_version", the character length must be great than or equal to 1.')
170
+ end
171
+
159
172
  invalid_properties
160
173
  end
161
174
 
@@ -171,6 +184,7 @@ module Pulp2to3MigrationClient
171
184
  return false if @pulp2_last_updated.nil?
172
185
  return false if @pulp2_storage_path.nil?
173
186
  return false if @pulp2_storage_path.to_s.length < 1
187
+ return false if !@pulp3_repository_version.nil? && @pulp3_repository_version.to_s.length < 1
174
188
  true
175
189
  end
176
190
 
@@ -224,6 +238,16 @@ module Pulp2to3MigrationClient
224
238
  @pulp2_storage_path = pulp2_storage_path
225
239
  end
226
240
 
241
+ # Custom attribute writer method with validation
242
+ # @param [Object] pulp3_repository_version Value to be assigned
243
+ def pulp3_repository_version=(pulp3_repository_version)
244
+ if !pulp3_repository_version.nil? && pulp3_repository_version.to_s.length < 1
245
+ fail ArgumentError, 'invalid value for "pulp3_repository_version", the character length must be great than or equal to 1.'
246
+ end
247
+
248
+ @pulp3_repository_version = pulp3_repository_version
249
+ end
250
+
227
251
  # Checks equality by comparing each attribute.
228
252
  # @param [Object] Object to be compared
229
253
  def ==(o)
@@ -236,7 +260,8 @@ module Pulp2to3MigrationClient
236
260
  pulp2_last_updated == o.pulp2_last_updated &&
237
261
  pulp2_storage_path == o.pulp2_storage_path &&
238
262
  downloaded == o.downloaded &&
239
- pulp3_content == o.pulp3_content
263
+ pulp3_content == o.pulp3_content &&
264
+ pulp3_repository_version == o.pulp3_repository_version
240
265
  end
241
266
 
242
267
  # @see the `==` method
@@ -248,7 +273,7 @@ module Pulp2to3MigrationClient
248
273
  # Calculates hash code according to all attributes.
249
274
  # @return [Integer] Hash code
250
275
  def hash
251
- [pulp_href, pulp_created, pulp2_id, pulp2_content_type_id, pulp2_last_updated, pulp2_storage_path, downloaded, pulp3_content].hash
276
+ [pulp_href, pulp_created, pulp2_id, pulp2_content_type_id, pulp2_last_updated, pulp2_storage_path, downloaded, pulp3_content, pulp3_repository_version].hash
252
277
  end
253
278
 
254
279
  # Builds the object from hash
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module Pulp2to3MigrationClient
16
- class Pulp2to3MigrationPulp2Repository
16
+ class Pulp2to3MigrationPulp2RepositoryRead
17
17
  attr_accessor :pulp_href
18
18
 
19
19
  # Timestamp of creation.
@@ -91,13 +91,13 @@ module Pulp2to3MigrationClient
91
91
  # @param [Hash] attributes Model attributes in the form of hash
92
92
  def initialize(attributes = {})
93
93
  if (!attributes.is_a?(Hash))
94
- fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2Repository` initialize method"
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2RepositoryRead` initialize method"
95
95
  end
96
96
 
97
97
  # check to see if the attribute exists and convert string to symbol for hash key
98
98
  attributes = attributes.each_with_object({}) { |(k, v), h|
99
99
  if (!self.class.attribute_map.key?(k.to_sym))
100
- fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2Repository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pulp2to3MigrationClient::Pulp2to3MigrationPulp2RepositoryRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
101
  end
102
102
  h[k.to_sym] = v
103
103
  }
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.3
11
11
  =end
12
12
 
13
13
  module Pulp2to3MigrationClient
14
- VERSION = '0.2.0b2.dev01587232611'
14
+ VERSION = '0.2.0b3'
15
15
  end
@@ -0,0 +1,2 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
@@ -0,0 +1,2 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
@@ -0,0 +1,42 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ Pulp 3 API
7
+
8
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
9
+
10
+ The version of the OpenAPI document: v3
11
+ Generated by: https://openapi-generator.tech
12
+ """
13
+
14
+
15
+ from __future__ import absolute_import
16
+
17
+ __version__ = "0.2.0b3"
18
+
19
+ # import apis into sdk package
20
+ from pulpcore.client.pulp_2to3_migration.api.migration_plans_api import MigrationPlansApi
21
+ from pulpcore.client.pulp_2to3_migration.api.pulp2content_api import Pulp2contentApi
22
+ from pulpcore.client.pulp_2to3_migration.api.pulp2repositories_api import Pulp2repositoriesApi
23
+
24
+ # import ApiClient
25
+ from pulpcore.client.pulp_2to3_migration.api_client import ApiClient
26
+ from pulpcore.client.pulp_2to3_migration.configuration import Configuration
27
+ from pulpcore.client.pulp_2to3_migration.exceptions import OpenApiException
28
+ from pulpcore.client.pulp_2to3_migration.exceptions import ApiTypeError
29
+ from pulpcore.client.pulp_2to3_migration.exceptions import ApiValueError
30
+ from pulpcore.client.pulp_2to3_migration.exceptions import ApiKeyError
31
+ from pulpcore.client.pulp_2to3_migration.exceptions import ApiException
32
+ # import models into sdk package
33
+ from pulpcore.client.pulp_2to3_migration.models.async_operation_response import AsyncOperationResponse
34
+ from pulpcore.client.pulp_2to3_migration.models.inline_response200 import InlineResponse200
35
+ from pulpcore.client.pulp_2to3_migration.models.inline_response2001 import InlineResponse2001
36
+ from pulpcore.client.pulp_2to3_migration.models.inline_response2002 import InlineResponse2002
37
+ from pulpcore.client.pulp_2to3_migration.models.migration_plan_run import MigrationPlanRun
38
+ from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan import Pulp2to3MigrationMigrationPlan
39
+ from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_migration_plan_read import Pulp2to3MigrationMigrationPlanRead
40
+ from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_content_read import Pulp2to3MigrationPulp2ContentRead
41
+ from pulpcore.client.pulp_2to3_migration.models.pulp2to3_migration_pulp2_repository_read import Pulp2to3MigrationPulp2RepositoryRead
42
+
@@ -0,0 +1,8 @@
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.pulp2content_api import Pulp2contentApi
8
+ from pulpcore.client.pulp_2to3_migration.api.pulp2repositories_api import Pulp2repositoriesApi
@@ -0,0 +1,609 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Pulp 3 API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
+
8
+ The version of the OpenAPI document: v3
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ from __future__ import absolute_import
14
+
15
+ import re # noqa: F401
16
+
17
+ # python 2 and python 3 compatibility library
18
+ import six
19
+
20
+ from pulpcore.client.pulp_2to3_migration.api_client import ApiClient
21
+ from pulpcore.client.pulp_2to3_migration.exceptions import (
22
+ ApiTypeError,
23
+ ApiValueError
24
+ )
25
+
26
+
27
+ class MigrationPlansApi(object):
28
+ """NOTE: This class is auto generated by OpenAPI Generator
29
+ Ref: https://openapi-generator.tech
30
+
31
+ Do not edit the class manually.
32
+ """
33
+
34
+ def __init__(self, api_client=None):
35
+ if api_client is None:
36
+ api_client = ApiClient()
37
+ self.api_client = api_client
38
+
39
+ def create(self, data, **kwargs): # noqa: E501
40
+ """Create a migration plan # noqa: E501
41
+
42
+ MigrationPlan ViewSet. # noqa: E501
43
+ This method makes a synchronous HTTP request by default. To make an
44
+ asynchronous HTTP request, please pass async_req=True
45
+ >>> thread = api.create(data, async_req=True)
46
+ >>> result = thread.get()
47
+
48
+ :param async_req bool: execute request asynchronously
49
+ :param Pulp2to3MigrationMigrationPlan data: (required)
50
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
51
+ be returned without reading/decoding response
52
+ data. Default is True.
53
+ :param _request_timeout: timeout setting for this request. If one
54
+ number provided, it will be total request
55
+ timeout. It can also be a pair (tuple) of
56
+ (connection, read) timeouts.
57
+ :return: Pulp2to3MigrationMigrationPlanRead
58
+ If the method is called asynchronously,
59
+ returns the request thread.
60
+ """
61
+ kwargs['_return_http_data_only'] = True
62
+ return self.create_with_http_info(data, **kwargs) # noqa: E501
63
+
64
+ def create_with_http_info(self, data, **kwargs): # noqa: E501
65
+ """Create a migration plan # noqa: E501
66
+
67
+ MigrationPlan ViewSet. # noqa: E501
68
+ This method makes a synchronous HTTP request by default. To make an
69
+ asynchronous HTTP request, please pass async_req=True
70
+ >>> thread = api.create_with_http_info(data, async_req=True)
71
+ >>> result = thread.get()
72
+
73
+ :param async_req bool: execute request asynchronously
74
+ :param Pulp2to3MigrationMigrationPlan data: (required)
75
+ :param _return_http_data_only: response data without head status code
76
+ and headers
77
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
78
+ be returned without reading/decoding response
79
+ data. Default is True.
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :return: tuple(Pulp2to3MigrationMigrationPlanRead, status_code(int), headers(HTTPHeaderDict))
85
+ If the method is called asynchronously,
86
+ returns the request thread.
87
+ """
88
+
89
+ local_var_params = locals()
90
+
91
+ all_params = ['data'] # noqa: E501
92
+ all_params.append('async_req')
93
+ all_params.append('_return_http_data_only')
94
+ all_params.append('_preload_content')
95
+ all_params.append('_request_timeout')
96
+
97
+ for key, val in six.iteritems(local_var_params['kwargs']):
98
+ if key not in all_params:
99
+ raise ApiTypeError(
100
+ "Got an unexpected keyword argument '%s'"
101
+ " to method create" % key
102
+ )
103
+ local_var_params[key] = val
104
+ del local_var_params['kwargs']
105
+ # verify the required parameter 'data' is set
106
+ if self.api_client.client_side_validation and ('data' not in local_var_params or # noqa: E501
107
+ local_var_params['data'] is None): # noqa: E501
108
+ raise ApiValueError("Missing the required parameter `data` when calling `create`") # noqa: E501
109
+
110
+ collection_formats = {}
111
+
112
+ path_params = {}
113
+
114
+ query_params = []
115
+
116
+ header_params = {}
117
+
118
+ form_params = []
119
+ local_var_files = {}
120
+
121
+ body_params = None
122
+ if 'data' in local_var_params:
123
+ body_params = local_var_params['data']
124
+ # HTTP header `Accept`
125
+ header_params['Accept'] = self.api_client.select_header_accept(
126
+ ['application/json']) # noqa: E501
127
+
128
+ # HTTP header `Content-Type`
129
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
130
+ ['application/json']) # noqa: E501
131
+
132
+ # Authentication setting
133
+ auth_settings = ['Basic'] # noqa: E501
134
+
135
+ return self.api_client.call_api(
136
+ '/pulp/api/v3/migration-plans/', 'POST',
137
+ path_params,
138
+ query_params,
139
+ header_params,
140
+ body=body_params,
141
+ post_params=form_params,
142
+ files=local_var_files,
143
+ response_type='Pulp2to3MigrationMigrationPlanRead', # noqa: E501
144
+ auth_settings=auth_settings,
145
+ async_req=local_var_params.get('async_req'),
146
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
147
+ _preload_content=local_var_params.get('_preload_content', True),
148
+ _request_timeout=local_var_params.get('_request_timeout'),
149
+ collection_formats=collection_formats)
150
+
151
+ def delete(self, migration_plan_href, **kwargs): # noqa: E501
152
+ """Delete a migration plan # noqa: E501
153
+
154
+ MigrationPlan ViewSet. # noqa: E501
155
+ This method makes a synchronous HTTP request by default. To make an
156
+ asynchronous HTTP request, please pass async_req=True
157
+ >>> thread = api.delete(migration_plan_href, async_req=True)
158
+ >>> result = thread.get()
159
+
160
+ :param async_req bool: execute request asynchronously
161
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
162
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
163
+ be returned without reading/decoding response
164
+ data. Default is True.
165
+ :param _request_timeout: timeout setting for this request. If one
166
+ number provided, it will be total request
167
+ timeout. It can also be a pair (tuple) of
168
+ (connection, read) timeouts.
169
+ :return: None
170
+ If the method is called asynchronously,
171
+ returns the request thread.
172
+ """
173
+ kwargs['_return_http_data_only'] = True
174
+ return self.delete_with_http_info(migration_plan_href, **kwargs) # noqa: E501
175
+
176
+ def delete_with_http_info(self, migration_plan_href, **kwargs): # noqa: E501
177
+ """Delete a migration plan # noqa: E501
178
+
179
+ MigrationPlan ViewSet. # noqa: E501
180
+ This method makes a synchronous HTTP request by default. To make an
181
+ asynchronous HTTP request, please pass async_req=True
182
+ >>> thread = api.delete_with_http_info(migration_plan_href, async_req=True)
183
+ >>> result = thread.get()
184
+
185
+ :param async_req bool: execute request asynchronously
186
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
187
+ :param _return_http_data_only: response data without head status code
188
+ and headers
189
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
190
+ be returned without reading/decoding response
191
+ data. Default is True.
192
+ :param _request_timeout: timeout setting for this request. If one
193
+ number provided, it will be total request
194
+ timeout. It can also be a pair (tuple) of
195
+ (connection, read) timeouts.
196
+ :return: None
197
+ If the method is called asynchronously,
198
+ returns the request thread.
199
+ """
200
+
201
+ local_var_params = locals()
202
+
203
+ all_params = ['migration_plan_href'] # noqa: E501
204
+ all_params.append('async_req')
205
+ all_params.append('_return_http_data_only')
206
+ all_params.append('_preload_content')
207
+ all_params.append('_request_timeout')
208
+
209
+ for key, val in six.iteritems(local_var_params['kwargs']):
210
+ if key not in all_params:
211
+ raise ApiTypeError(
212
+ "Got an unexpected keyword argument '%s'"
213
+ " to method delete" % key
214
+ )
215
+ local_var_params[key] = val
216
+ del local_var_params['kwargs']
217
+ # verify the required parameter 'migration_plan_href' is set
218
+ if self.api_client.client_side_validation and ('migration_plan_href' not in local_var_params or # noqa: E501
219
+ local_var_params['migration_plan_href'] is None): # noqa: E501
220
+ raise ApiValueError("Missing the required parameter `migration_plan_href` when calling `delete`") # noqa: E501
221
+
222
+ collection_formats = {}
223
+
224
+ path_params = {}
225
+ if 'migration_plan_href' in local_var_params:
226
+ path_params['migration_plan_href'] = local_var_params['migration_plan_href'] # noqa: E501
227
+
228
+ query_params = []
229
+
230
+ header_params = {}
231
+
232
+ form_params = []
233
+ local_var_files = {}
234
+
235
+ body_params = None
236
+ # Authentication setting
237
+ auth_settings = ['Basic'] # noqa: E501
238
+
239
+ return self.api_client.call_api(
240
+ '{migration_plan_href}', 'DELETE',
241
+ path_params,
242
+ query_params,
243
+ header_params,
244
+ body=body_params,
245
+ post_params=form_params,
246
+ files=local_var_files,
247
+ response_type=None, # noqa: E501
248
+ auth_settings=auth_settings,
249
+ async_req=local_var_params.get('async_req'),
250
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
251
+ _preload_content=local_var_params.get('_preload_content', True),
252
+ _request_timeout=local_var_params.get('_request_timeout'),
253
+ collection_formats=collection_formats)
254
+
255
+ def list(self, **kwargs): # noqa: E501
256
+ """List migration plans # noqa: E501
257
+
258
+ MigrationPlan ViewSet. # noqa: E501
259
+ This method makes a synchronous HTTP request by default. To make an
260
+ asynchronous HTTP request, please pass async_req=True
261
+ >>> thread = api.list(async_req=True)
262
+ >>> result = thread.get()
263
+
264
+ :param async_req bool: execute request asynchronously
265
+ :param str ordering: Which field to use when ordering the results.
266
+ :param int limit: Number of results to return per page.
267
+ :param int offset: The initial index from which to return the results.
268
+ :param str fields: A list of fields to include in the response.
269
+ :param str exclude_fields: A list of fields to exclude from the response.
270
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
271
+ be returned without reading/decoding response
272
+ data. Default is True.
273
+ :param _request_timeout: timeout setting for this request. If one
274
+ number provided, it will be total request
275
+ timeout. It can also be a pair (tuple) of
276
+ (connection, read) timeouts.
277
+ :return: InlineResponse200
278
+ If the method is called asynchronously,
279
+ returns the request thread.
280
+ """
281
+ kwargs['_return_http_data_only'] = True
282
+ return self.list_with_http_info(**kwargs) # noqa: E501
283
+
284
+ def list_with_http_info(self, **kwargs): # noqa: E501
285
+ """List migration plans # noqa: E501
286
+
287
+ MigrationPlan ViewSet. # noqa: E501
288
+ This method makes a synchronous HTTP request by default. To make an
289
+ asynchronous HTTP request, please pass async_req=True
290
+ >>> thread = api.list_with_http_info(async_req=True)
291
+ >>> result = thread.get()
292
+
293
+ :param async_req bool: execute request asynchronously
294
+ :param str ordering: Which field to use when ordering the results.
295
+ :param int limit: Number of results to return per page.
296
+ :param int offset: The initial index from which to return the results.
297
+ :param str fields: A list of fields to include in the response.
298
+ :param str exclude_fields: A list of fields to exclude from the response.
299
+ :param _return_http_data_only: response data without head status code
300
+ and headers
301
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
302
+ be returned without reading/decoding response
303
+ data. Default is True.
304
+ :param _request_timeout: timeout setting for this request. If one
305
+ number provided, it will be total request
306
+ timeout. It can also be a pair (tuple) of
307
+ (connection, read) timeouts.
308
+ :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict))
309
+ If the method is called asynchronously,
310
+ returns the request thread.
311
+ """
312
+
313
+ local_var_params = locals()
314
+
315
+ all_params = ['ordering', 'limit', 'offset', 'fields', 'exclude_fields'] # noqa: E501
316
+ all_params.append('async_req')
317
+ all_params.append('_return_http_data_only')
318
+ all_params.append('_preload_content')
319
+ all_params.append('_request_timeout')
320
+
321
+ for key, val in six.iteritems(local_var_params['kwargs']):
322
+ if key not in all_params:
323
+ raise ApiTypeError(
324
+ "Got an unexpected keyword argument '%s'"
325
+ " to method list" % key
326
+ )
327
+ local_var_params[key] = val
328
+ del local_var_params['kwargs']
329
+
330
+ collection_formats = {}
331
+
332
+ path_params = {}
333
+
334
+ query_params = []
335
+ if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
336
+ query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
337
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
338
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
339
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
340
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
341
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
342
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
343
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
344
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
345
+
346
+ header_params = {}
347
+
348
+ form_params = []
349
+ local_var_files = {}
350
+
351
+ body_params = None
352
+ # HTTP header `Accept`
353
+ header_params['Accept'] = self.api_client.select_header_accept(
354
+ ['application/json']) # noqa: E501
355
+
356
+ # Authentication setting
357
+ auth_settings = ['Basic'] # noqa: E501
358
+
359
+ return self.api_client.call_api(
360
+ '/pulp/api/v3/migration-plans/', 'GET',
361
+ path_params,
362
+ query_params,
363
+ header_params,
364
+ body=body_params,
365
+ post_params=form_params,
366
+ files=local_var_files,
367
+ response_type='InlineResponse200', # noqa: E501
368
+ auth_settings=auth_settings,
369
+ async_req=local_var_params.get('async_req'),
370
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
371
+ _preload_content=local_var_params.get('_preload_content', True),
372
+ _request_timeout=local_var_params.get('_request_timeout'),
373
+ collection_formats=collection_formats)
374
+
375
+ def read(self, migration_plan_href, **kwargs): # noqa: E501
376
+ """Inspect a migration plan # noqa: E501
377
+
378
+ MigrationPlan ViewSet. # noqa: E501
379
+ This method makes a synchronous HTTP request by default. To make an
380
+ asynchronous HTTP request, please pass async_req=True
381
+ >>> thread = api.read(migration_plan_href, async_req=True)
382
+ >>> result = thread.get()
383
+
384
+ :param async_req bool: execute request asynchronously
385
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
386
+ :param str fields: A list of fields to include in the response.
387
+ :param str exclude_fields: A list of fields to exclude from the response.
388
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
389
+ be returned without reading/decoding response
390
+ data. Default is True.
391
+ :param _request_timeout: timeout setting for this request. If one
392
+ number provided, it will be total request
393
+ timeout. It can also be a pair (tuple) of
394
+ (connection, read) timeouts.
395
+ :return: Pulp2to3MigrationMigrationPlanRead
396
+ If the method is called asynchronously,
397
+ returns the request thread.
398
+ """
399
+ kwargs['_return_http_data_only'] = True
400
+ return self.read_with_http_info(migration_plan_href, **kwargs) # noqa: E501
401
+
402
+ def read_with_http_info(self, migration_plan_href, **kwargs): # noqa: E501
403
+ """Inspect a migration plan # noqa: E501
404
+
405
+ MigrationPlan ViewSet. # noqa: E501
406
+ This method makes a synchronous HTTP request by default. To make an
407
+ asynchronous HTTP request, please pass async_req=True
408
+ >>> thread = api.read_with_http_info(migration_plan_href, async_req=True)
409
+ >>> result = thread.get()
410
+
411
+ :param async_req bool: execute request asynchronously
412
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
413
+ :param str fields: A list of fields to include in the response.
414
+ :param str exclude_fields: A list of fields to exclude from the response.
415
+ :param _return_http_data_only: response data without head status code
416
+ and headers
417
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
418
+ be returned without reading/decoding response
419
+ data. Default is True.
420
+ :param _request_timeout: timeout setting for this request. If one
421
+ number provided, it will be total request
422
+ timeout. It can also be a pair (tuple) of
423
+ (connection, read) timeouts.
424
+ :return: tuple(Pulp2to3MigrationMigrationPlanRead, status_code(int), headers(HTTPHeaderDict))
425
+ If the method is called asynchronously,
426
+ returns the request thread.
427
+ """
428
+
429
+ local_var_params = locals()
430
+
431
+ all_params = ['migration_plan_href', 'fields', 'exclude_fields'] # noqa: E501
432
+ all_params.append('async_req')
433
+ all_params.append('_return_http_data_only')
434
+ all_params.append('_preload_content')
435
+ all_params.append('_request_timeout')
436
+
437
+ for key, val in six.iteritems(local_var_params['kwargs']):
438
+ if key not in all_params:
439
+ raise ApiTypeError(
440
+ "Got an unexpected keyword argument '%s'"
441
+ " to method read" % key
442
+ )
443
+ local_var_params[key] = val
444
+ del local_var_params['kwargs']
445
+ # verify the required parameter 'migration_plan_href' is set
446
+ if self.api_client.client_side_validation and ('migration_plan_href' not in local_var_params or # noqa: E501
447
+ local_var_params['migration_plan_href'] is None): # noqa: E501
448
+ raise ApiValueError("Missing the required parameter `migration_plan_href` when calling `read`") # noqa: E501
449
+
450
+ collection_formats = {}
451
+
452
+ path_params = {}
453
+ if 'migration_plan_href' in local_var_params:
454
+ path_params['migration_plan_href'] = local_var_params['migration_plan_href'] # noqa: E501
455
+
456
+ query_params = []
457
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
458
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
459
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
460
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
461
+
462
+ header_params = {}
463
+
464
+ form_params = []
465
+ local_var_files = {}
466
+
467
+ body_params = None
468
+ # HTTP header `Accept`
469
+ header_params['Accept'] = self.api_client.select_header_accept(
470
+ ['application/json']) # noqa: E501
471
+
472
+ # Authentication setting
473
+ auth_settings = ['Basic'] # noqa: E501
474
+
475
+ return self.api_client.call_api(
476
+ '{migration_plan_href}', 'GET',
477
+ path_params,
478
+ query_params,
479
+ header_params,
480
+ body=body_params,
481
+ post_params=form_params,
482
+ files=local_var_files,
483
+ response_type='Pulp2to3MigrationMigrationPlanRead', # noqa: E501
484
+ auth_settings=auth_settings,
485
+ async_req=local_var_params.get('async_req'),
486
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
487
+ _preload_content=local_var_params.get('_preload_content', True),
488
+ _request_timeout=local_var_params.get('_request_timeout'),
489
+ collection_formats=collection_formats)
490
+
491
+ def run(self, migration_plan_href, data, **kwargs): # noqa: E501
492
+ """Run migration plan # noqa: E501
493
+
494
+ Trigger an asynchronous task to run a migration from Pulp 2. # noqa: E501
495
+ This method makes a synchronous HTTP request by default. To make an
496
+ asynchronous HTTP request, please pass async_req=True
497
+ >>> thread = api.run(migration_plan_href, data, async_req=True)
498
+ >>> result = thread.get()
499
+
500
+ :param async_req bool: execute request asynchronously
501
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
502
+ :param MigrationPlanRun data: (required)
503
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
504
+ be returned without reading/decoding response
505
+ data. Default is True.
506
+ :param _request_timeout: timeout setting for this request. If one
507
+ number provided, it will be total request
508
+ timeout. It can also be a pair (tuple) of
509
+ (connection, read) timeouts.
510
+ :return: AsyncOperationResponse
511
+ If the method is called asynchronously,
512
+ returns the request thread.
513
+ """
514
+ kwargs['_return_http_data_only'] = True
515
+ return self.run_with_http_info(migration_plan_href, data, **kwargs) # noqa: E501
516
+
517
+ def run_with_http_info(self, migration_plan_href, data, **kwargs): # noqa: E501
518
+ """Run migration plan # noqa: E501
519
+
520
+ Trigger an asynchronous task to run a migration from Pulp 2. # noqa: E501
521
+ This method makes a synchronous HTTP request by default. To make an
522
+ asynchronous HTTP request, please pass async_req=True
523
+ >>> thread = api.run_with_http_info(migration_plan_href, data, async_req=True)
524
+ >>> result = thread.get()
525
+
526
+ :param async_req bool: execute request asynchronously
527
+ :param str migration_plan_href: URI of Migration Plan. e.g.: /pulp/api/v3/migration-plans/1/ (required)
528
+ :param MigrationPlanRun data: (required)
529
+ :param _return_http_data_only: response data without head status code
530
+ and headers
531
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
532
+ be returned without reading/decoding response
533
+ data. Default is True.
534
+ :param _request_timeout: timeout setting for this request. If one
535
+ number provided, it will be total request
536
+ timeout. It can also be a pair (tuple) of
537
+ (connection, read) timeouts.
538
+ :return: tuple(AsyncOperationResponse, status_code(int), headers(HTTPHeaderDict))
539
+ If the method is called asynchronously,
540
+ returns the request thread.
541
+ """
542
+
543
+ local_var_params = locals()
544
+
545
+ all_params = ['migration_plan_href', 'data'] # noqa: E501
546
+ all_params.append('async_req')
547
+ all_params.append('_return_http_data_only')
548
+ all_params.append('_preload_content')
549
+ all_params.append('_request_timeout')
550
+
551
+ for key, val in six.iteritems(local_var_params['kwargs']):
552
+ if key not in all_params:
553
+ raise ApiTypeError(
554
+ "Got an unexpected keyword argument '%s'"
555
+ " to method run" % key
556
+ )
557
+ local_var_params[key] = val
558
+ del local_var_params['kwargs']
559
+ # verify the required parameter 'migration_plan_href' is set
560
+ if self.api_client.client_side_validation and ('migration_plan_href' not in local_var_params or # noqa: E501
561
+ local_var_params['migration_plan_href'] is None): # noqa: E501
562
+ raise ApiValueError("Missing the required parameter `migration_plan_href` when calling `run`") # noqa: E501
563
+ # verify the required parameter 'data' is set
564
+ if self.api_client.client_side_validation and ('data' not in local_var_params or # noqa: E501
565
+ local_var_params['data'] is None): # noqa: E501
566
+ raise ApiValueError("Missing the required parameter `data` when calling `run`") # noqa: E501
567
+
568
+ collection_formats = {}
569
+
570
+ path_params = {}
571
+ if 'migration_plan_href' in local_var_params:
572
+ path_params['migration_plan_href'] = local_var_params['migration_plan_href'] # noqa: E501
573
+
574
+ query_params = []
575
+
576
+ header_params = {}
577
+
578
+ form_params = []
579
+ local_var_files = {}
580
+
581
+ body_params = None
582
+ if 'data' in local_var_params:
583
+ body_params = local_var_params['data']
584
+ # HTTP header `Accept`
585
+ header_params['Accept'] = self.api_client.select_header_accept(
586
+ ['application/json']) # noqa: E501
587
+
588
+ # HTTP header `Content-Type`
589
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
590
+ ['application/json']) # noqa: E501
591
+
592
+ # Authentication setting
593
+ auth_settings = ['Basic'] # noqa: E501
594
+
595
+ return self.api_client.call_api(
596
+ '{migration_plan_href}run/', 'POST',
597
+ path_params,
598
+ query_params,
599
+ header_params,
600
+ body=body_params,
601
+ post_params=form_params,
602
+ files=local_var_files,
603
+ response_type='AsyncOperationResponse', # noqa: E501
604
+ auth_settings=auth_settings,
605
+ async_req=local_var_params.get('async_req'),
606
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
607
+ _preload_content=local_var_params.get('_preload_content', True),
608
+ _request_timeout=local_var_params.get('_request_timeout'),
609
+ collection_formats=collection_formats)