pulp_2to3_migration_client 0.12.0.dev1623642407 → 0.12.0.dev1624592835

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 (104) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +4 -4
  4. data/build/lib/pulpcore/__init__.py +2 -0
  5. data/build/lib/pulpcore/client/__init__.py +2 -0
  6. data/build/lib/pulpcore/client/pulp_2to3_migration/__init__.py +43 -0
  7. data/build/lib/pulpcore/client/pulp_2to3_migration/api/__init__.py +8 -0
  8. data/build/lib/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +761 -0
  9. data/build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py +350 -0
  10. data/build/lib/pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py +313 -0
  11. data/build/lib/pulpcore/client/pulp_2to3_migration/api_client.py +667 -0
  12. data/build/lib/pulpcore/client/pulp_2to3_migration/configuration.py +427 -0
  13. data/build/lib/pulpcore/client/pulp_2to3_migration/exceptions.py +121 -0
  14. data/build/lib/pulpcore/client/pulp_2to3_migration/models/__init__.py +26 -0
  15. data/build/lib/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +124 -0
  16. data/build/lib/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +179 -0
  17. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py +197 -0
  18. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py +197 -0
  19. data/build/lib/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py +197 -0
  20. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +124 -0
  21. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py +178 -0
  22. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py +338 -0
  23. data/build/lib/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py +416 -0
  24. data/build/lib/pulpcore/client/pulp_2to3_migration/rest.py +292 -0
  25. data/dist/pulp_2to3_migration-client-0.12.0.dev1624592827.tar.gz +0 -0
  26. data/dist/pulp_2to3_migration_client-0.12.0.dev1624592827-py3-none-any.whl +0 -0
  27. data/lib/pulp_2to3_migration_client.rb +1 -1
  28. data/lib/pulp_2to3_migration_client/api/migration_plans_api.rb +1 -1
  29. data/lib/pulp_2to3_migration_client/api/pulp2_content_api.rb +1 -1
  30. data/lib/pulp_2to3_migration_client/api/pulp2_repositories_api.rb +1 -1
  31. data/lib/pulp_2to3_migration_client/api_client.rb +12 -8
  32. data/lib/pulp_2to3_migration_client/api_error.rb +1 -1
  33. data/lib/pulp_2to3_migration_client/configuration.rb +8 -1
  34. data/lib/pulp_2to3_migration_client/models/async_operation_response.rb +1 -1
  35. data/lib/pulp_2to3_migration_client/models/migration_plan_run.rb +1 -1
  36. data/lib/pulp_2to3_migration_client/models/paginatedpulp2to3_migration_migration_plan_response_list.rb +1 -1
  37. data/lib/pulp_2to3_migration_client/models/paginatedpulp2to3_migration_pulp2_content_response_list.rb +1 -1
  38. data/lib/pulp_2to3_migration_client/models/paginatedpulp2to3_migration_pulp2_repository_response_list.rb +1 -1
  39. data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan.rb +1 -1
  40. data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_migration_plan_response.rb +1 -1
  41. data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_content_response.rb +1 -1
  42. data/lib/pulp_2to3_migration_client/models/pulp2to3_migration_pulp2_repository_response.rb +1 -1
  43. data/lib/pulp_2to3_migration_client/version.rb +2 -2
  44. data/pulp_2to3_migration_client.egg-info/PKG-INFO +15 -0
  45. data/pulp_2to3_migration_client.egg-info/SOURCES.txt +41 -0
  46. data/pulp_2to3_migration_client.egg-info/dependency_links.txt +1 -0
  47. data/pulp_2to3_migration_client.egg-info/requires.txt +4 -0
  48. data/pulp_2to3_migration_client.egg-info/top_level.txt +1 -0
  49. data/pulp_2to3_migration_client.gemspec +1 -1
  50. data/pulpcore/__init__.py +2 -0
  51. data/pulpcore/client/__init__.py +2 -0
  52. data/pulpcore/client/pulp_2to3_migration/__init__.py +43 -0
  53. data/pulpcore/client/pulp_2to3_migration/api/__init__.py +8 -0
  54. data/pulpcore/client/pulp_2to3_migration/api/migration_plans_api.py +761 -0
  55. data/pulpcore/client/pulp_2to3_migration/api/pulp2_content_api.py +350 -0
  56. data/pulpcore/client/pulp_2to3_migration/api/pulp2_repositories_api.py +313 -0
  57. data/pulpcore/client/pulp_2to3_migration/api_client.py +667 -0
  58. data/pulpcore/client/pulp_2to3_migration/configuration.py +427 -0
  59. data/pulpcore/client/pulp_2to3_migration/exceptions.py +121 -0
  60. data/pulpcore/client/pulp_2to3_migration/models/__init__.py +26 -0
  61. data/pulpcore/client/pulp_2to3_migration/models/async_operation_response.py +124 -0
  62. data/pulpcore/client/pulp_2to3_migration/models/migration_plan_run.py +179 -0
  63. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_migration_plan_response_list.py +197 -0
  64. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_content_response_list.py +197 -0
  65. data/pulpcore/client/pulp_2to3_migration/models/paginatedpulp2to3_migration_pulp2_repository_response_list.py +197 -0
  66. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan.py +124 -0
  67. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_migration_plan_response.py +178 -0
  68. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_content_response.py +338 -0
  69. data/pulpcore/client/pulp_2to3_migration/models/pulp2to3_migration_pulp2_repository_response.py +416 -0
  70. data/pulpcore/client/pulp_2to3_migration/rest.py +292 -0
  71. data/requirements.txt +6 -0
  72. data/setup.cfg +2 -0
  73. data/setup.py +42 -0
  74. data/spec/api/migration_plans_api_spec.rb +1 -1
  75. data/spec/api/pulp2_content_api_spec.rb +1 -1
  76. data/spec/api/pulp2_repositories_api_spec.rb +1 -1
  77. data/spec/api_client_spec.rb +2 -2
  78. data/spec/configuration_spec.rb +1 -1
  79. data/spec/models/async_operation_response_spec.rb +1 -1
  80. data/spec/models/migration_plan_run_spec.rb +1 -1
  81. data/spec/models/paginatedpulp2to3_migration_migration_plan_response_list_spec.rb +1 -1
  82. data/spec/models/paginatedpulp2to3_migration_pulp2_content_response_list_spec.rb +1 -1
  83. data/spec/models/paginatedpulp2to3_migration_pulp2_repository_response_list_spec.rb +1 -1
  84. data/spec/models/pulp2to3_migration_migration_plan_response_spec.rb +1 -1
  85. data/spec/models/pulp2to3_migration_migration_plan_spec.rb +1 -1
  86. data/spec/models/pulp2to3_migration_pulp2_content_response_spec.rb +1 -1
  87. data/spec/models/pulp2to3_migration_pulp2_repository_response_spec.rb +1 -1
  88. data/spec/spec_helper.rb +1 -1
  89. data/test-requirements.txt +3 -0
  90. data/test/__init__.py +0 -0
  91. data/test/test_async_operation_response.py +54 -0
  92. data/test/test_migration_plan_run.py +55 -0
  93. data/test/test_migration_plans_api.py +76 -0
  94. data/test/test_paginatedpulp2to3_migration_migration_plan_response_list.py +61 -0
  95. data/test/test_paginatedpulp2to3_migration_pulp2_content_response_list.py +67 -0
  96. data/test/test_paginatedpulp2to3_migration_pulp2_repository_response_list.py +72 -0
  97. data/test/test_pulp2_content_api.py +48 -0
  98. data/test/test_pulp2_repositories_api.py +48 -0
  99. data/test/test_pulp2to3_migration_migration_plan.py +54 -0
  100. data/test/test_pulp2to3_migration_migration_plan_response.py +56 -0
  101. data/test/test_pulp2to3_migration_pulp2_content_response.py +65 -0
  102. data/test/test_pulp2to3_migration_pulp2_repository_response.py +69 -0
  103. data/tox.ini +9 -0
  104. metadata +74 -7
@@ -0,0 +1,350 @@
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 Pulp2ContentApi(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 list(self, **kwargs): # noqa: E501
41
+ """List pulp2 contents # noqa: E501
42
+
43
+ ViewSet for Pulp2Content model. # 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.list(async_req=True)
47
+ >>> result = thread.get()
48
+
49
+ :param async_req bool: execute request asynchronously
50
+ :param int limit: Number of results to return per page.
51
+ :param int offset: The initial index from which to return the results.
52
+ :param str ordering: Which field to use when ordering the results.
53
+ :param str pulp2_content_type_id:
54
+ :param list[str] pulp2_content_type_id__in: Filter results where pulp2_content_type_id is in a comma-separated list of values
55
+ :param str pulp2_id:
56
+ :param list[str] pulp2_id__in: Filter results where pulp2_id is in a comma-separated list of values
57
+ :param datetime pulp2_last_updated: ISO 8601 formatted dates are supported
58
+ :param int pulp2_last_updated__gt: Filter results where pulp2_last_updated is greater than value
59
+ :param int pulp2_last_updated__gte: Filter results where pulp2_last_updated is greater than or equal to value
60
+ :param int pulp2_last_updated__lt: Filter results where pulp2_last_updated is less than value
61
+ :param int pulp2_last_updated__lte: Filter results where pulp2_last_updated is less than or equal to value
62
+ :param list[int] pulp2_last_updated__range: Filter results where pulp2_last_updated is between two comma separated values
63
+ :param str pulp3_content: Foreign Key referenced by HREF
64
+ :param str fields: A list of fields to include in the response.
65
+ :param str exclude_fields: A list of fields to exclude from the response.
66
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
67
+ be returned without reading/decoding response
68
+ data. Default is True.
69
+ :param _request_timeout: timeout setting for this request. If one
70
+ number provided, it will be total request
71
+ timeout. It can also be a pair (tuple) of
72
+ (connection, read) timeouts.
73
+ :return: Paginatedpulp2to3MigrationPulp2ContentResponseList
74
+ If the method is called asynchronously,
75
+ returns the request thread.
76
+ """
77
+ kwargs['_return_http_data_only'] = True
78
+ return self.list_with_http_info(**kwargs) # noqa: E501
79
+
80
+ def list_with_http_info(self, **kwargs): # noqa: E501
81
+ """List pulp2 contents # noqa: E501
82
+
83
+ ViewSet for Pulp2Content model. # noqa: E501
84
+ This method makes a synchronous HTTP request by default. To make an
85
+ asynchronous HTTP request, please pass async_req=True
86
+ >>> thread = api.list_with_http_info(async_req=True)
87
+ >>> result = thread.get()
88
+
89
+ :param async_req bool: execute request asynchronously
90
+ :param int limit: Number of results to return per page.
91
+ :param int offset: The initial index from which to return the results.
92
+ :param str ordering: Which field to use when ordering the results.
93
+ :param str pulp2_content_type_id:
94
+ :param list[str] pulp2_content_type_id__in: Filter results where pulp2_content_type_id is in a comma-separated list of values
95
+ :param str pulp2_id:
96
+ :param list[str] pulp2_id__in: Filter results where pulp2_id is in a comma-separated list of values
97
+ :param datetime pulp2_last_updated: ISO 8601 formatted dates are supported
98
+ :param int pulp2_last_updated__gt: Filter results where pulp2_last_updated is greater than value
99
+ :param int pulp2_last_updated__gte: Filter results where pulp2_last_updated is greater than or equal to value
100
+ :param int pulp2_last_updated__lt: Filter results where pulp2_last_updated is less than value
101
+ :param int pulp2_last_updated__lte: Filter results where pulp2_last_updated is less than or equal to value
102
+ :param list[int] pulp2_last_updated__range: Filter results where pulp2_last_updated is between two comma separated values
103
+ :param str pulp3_content: Foreign Key referenced by HREF
104
+ :param str fields: A list of fields to include in the response.
105
+ :param str exclude_fields: A list of fields to exclude from the response.
106
+ :param _return_http_data_only: response data without head status code
107
+ and headers
108
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
109
+ be returned without reading/decoding response
110
+ data. Default is True.
111
+ :param _request_timeout: timeout setting for this request. If one
112
+ number provided, it will be total request
113
+ timeout. It can also be a pair (tuple) of
114
+ (connection, read) timeouts.
115
+ :return: tuple(Paginatedpulp2to3MigrationPulp2ContentResponseList, status_code(int), headers(HTTPHeaderDict))
116
+ If the method is called asynchronously,
117
+ returns the request thread.
118
+ """
119
+
120
+ local_var_params = locals()
121
+
122
+ all_params = [
123
+ 'limit',
124
+ 'offset',
125
+ 'ordering',
126
+ 'pulp2_content_type_id',
127
+ 'pulp2_content_type_id__in',
128
+ 'pulp2_id',
129
+ 'pulp2_id__in',
130
+ 'pulp2_last_updated',
131
+ 'pulp2_last_updated__gt',
132
+ 'pulp2_last_updated__gte',
133
+ 'pulp2_last_updated__lt',
134
+ 'pulp2_last_updated__lte',
135
+ 'pulp2_last_updated__range',
136
+ 'pulp3_content',
137
+ 'fields',
138
+ 'exclude_fields'
139
+ ]
140
+ all_params.extend(
141
+ [
142
+ 'async_req',
143
+ '_return_http_data_only',
144
+ '_preload_content',
145
+ '_request_timeout'
146
+ ]
147
+ )
148
+
149
+ for key, val in six.iteritems(local_var_params['kwargs']):
150
+ if key not in all_params:
151
+ raise ApiTypeError(
152
+ "Got an unexpected keyword argument '%s'"
153
+ " to method list" % key
154
+ )
155
+ local_var_params[key] = val
156
+ del local_var_params['kwargs']
157
+
158
+ collection_formats = {}
159
+
160
+ path_params = {}
161
+
162
+ query_params = []
163
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
164
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
165
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
166
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
167
+ if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
168
+ query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
169
+ if 'pulp2_content_type_id' in local_var_params and local_var_params['pulp2_content_type_id'] is not None: # noqa: E501
170
+ query_params.append(('pulp2_content_type_id', local_var_params['pulp2_content_type_id'])) # noqa: E501
171
+ if 'pulp2_content_type_id__in' in local_var_params and local_var_params['pulp2_content_type_id__in'] is not None: # noqa: E501
172
+ query_params.append(('pulp2_content_type_id__in', local_var_params['pulp2_content_type_id__in'])) # noqa: E501
173
+ collection_formats['pulp2_content_type_id__in'] = 'csv' # noqa: E501
174
+ if 'pulp2_id' in local_var_params and local_var_params['pulp2_id'] is not None: # noqa: E501
175
+ query_params.append(('pulp2_id', local_var_params['pulp2_id'])) # noqa: E501
176
+ if 'pulp2_id__in' in local_var_params and local_var_params['pulp2_id__in'] is not None: # noqa: E501
177
+ query_params.append(('pulp2_id__in', local_var_params['pulp2_id__in'])) # noqa: E501
178
+ collection_formats['pulp2_id__in'] = 'csv' # noqa: E501
179
+ if 'pulp2_last_updated' in local_var_params and local_var_params['pulp2_last_updated'] is not None: # noqa: E501
180
+ query_params.append(('pulp2_last_updated', local_var_params['pulp2_last_updated'])) # noqa: E501
181
+ if 'pulp2_last_updated__gt' in local_var_params and local_var_params['pulp2_last_updated__gt'] is not None: # noqa: E501
182
+ query_params.append(('pulp2_last_updated__gt', local_var_params['pulp2_last_updated__gt'])) # noqa: E501
183
+ if 'pulp2_last_updated__gte' in local_var_params and local_var_params['pulp2_last_updated__gte'] is not None: # noqa: E501
184
+ query_params.append(('pulp2_last_updated__gte', local_var_params['pulp2_last_updated__gte'])) # noqa: E501
185
+ if 'pulp2_last_updated__lt' in local_var_params and local_var_params['pulp2_last_updated__lt'] is not None: # noqa: E501
186
+ query_params.append(('pulp2_last_updated__lt', local_var_params['pulp2_last_updated__lt'])) # noqa: E501
187
+ if 'pulp2_last_updated__lte' in local_var_params and local_var_params['pulp2_last_updated__lte'] is not None: # noqa: E501
188
+ query_params.append(('pulp2_last_updated__lte', local_var_params['pulp2_last_updated__lte'])) # noqa: E501
189
+ if 'pulp2_last_updated__range' in local_var_params and local_var_params['pulp2_last_updated__range'] is not None: # noqa: E501
190
+ query_params.append(('pulp2_last_updated__range', local_var_params['pulp2_last_updated__range'])) # noqa: E501
191
+ collection_formats['pulp2_last_updated__range'] = 'csv' # noqa: E501
192
+ if 'pulp3_content' in local_var_params and local_var_params['pulp3_content'] is not None: # noqa: E501
193
+ query_params.append(('pulp3_content', local_var_params['pulp3_content'])) # noqa: E501
194
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
195
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
196
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
197
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
198
+
199
+ header_params = {}
200
+
201
+ form_params = []
202
+ local_var_files = {}
203
+
204
+ body_params = None
205
+ # HTTP header `Accept`
206
+ header_params['Accept'] = self.api_client.select_header_accept(
207
+ ['application/json']) # noqa: E501
208
+
209
+ # Authentication setting
210
+ auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
211
+
212
+ return self.api_client.call_api(
213
+ '/pulp/api/v3/pulp2content/', 'GET',
214
+ path_params,
215
+ query_params,
216
+ header_params,
217
+ body=body_params,
218
+ post_params=form_params,
219
+ files=local_var_files,
220
+ response_type='Paginatedpulp2to3MigrationPulp2ContentResponseList', # noqa: E501
221
+ auth_settings=auth_settings,
222
+ async_req=local_var_params.get('async_req'),
223
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
224
+ _preload_content=local_var_params.get('_preload_content', True),
225
+ _request_timeout=local_var_params.get('_request_timeout'),
226
+ collection_formats=collection_formats)
227
+
228
+ def read(self, pulp_2to3_migration_pulp2_content_href, **kwargs): # noqa: E501
229
+ """Inspect a pulp2 content # noqa: E501
230
+
231
+ ViewSet for Pulp2Content model. # noqa: E501
232
+ This method makes a synchronous HTTP request by default. To make an
233
+ asynchronous HTTP request, please pass async_req=True
234
+ >>> thread = api.read(pulp_2to3_migration_pulp2_content_href, async_req=True)
235
+ >>> result = thread.get()
236
+
237
+ :param async_req bool: execute request asynchronously
238
+ :param str pulp_2to3_migration_pulp2_content_href: (required)
239
+ :param str fields: A list of fields to include in the response.
240
+ :param str exclude_fields: A list of fields to exclude from the response.
241
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
242
+ be returned without reading/decoding response
243
+ data. Default is True.
244
+ :param _request_timeout: timeout setting for this request. If one
245
+ number provided, it will be total request
246
+ timeout. It can also be a pair (tuple) of
247
+ (connection, read) timeouts.
248
+ :return: Pulp2to3MigrationPulp2ContentResponse
249
+ If the method is called asynchronously,
250
+ returns the request thread.
251
+ """
252
+ kwargs['_return_http_data_only'] = True
253
+ return self.read_with_http_info(pulp_2to3_migration_pulp2_content_href, **kwargs) # noqa: E501
254
+
255
+ def read_with_http_info(self, pulp_2to3_migration_pulp2_content_href, **kwargs): # noqa: E501
256
+ """Inspect a pulp2 content # noqa: E501
257
+
258
+ ViewSet for Pulp2Content model. # 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.read_with_http_info(pulp_2to3_migration_pulp2_content_href, async_req=True)
262
+ >>> result = thread.get()
263
+
264
+ :param async_req bool: execute request asynchronously
265
+ :param str pulp_2to3_migration_pulp2_content_href: (required)
266
+ :param str fields: A list of fields to include in the response.
267
+ :param str exclude_fields: A list of fields to exclude from the response.
268
+ :param _return_http_data_only: response data without head status code
269
+ and headers
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: tuple(Pulp2to3MigrationPulp2ContentResponse, status_code(int), headers(HTTPHeaderDict))
278
+ If the method is called asynchronously,
279
+ returns the request thread.
280
+ """
281
+
282
+ local_var_params = locals()
283
+
284
+ all_params = [
285
+ 'pulp_2to3_migration_pulp2_content_href',
286
+ 'fields',
287
+ 'exclude_fields'
288
+ ]
289
+ all_params.extend(
290
+ [
291
+ 'async_req',
292
+ '_return_http_data_only',
293
+ '_preload_content',
294
+ '_request_timeout'
295
+ ]
296
+ )
297
+
298
+ for key, val in six.iteritems(local_var_params['kwargs']):
299
+ if key not in all_params:
300
+ raise ApiTypeError(
301
+ "Got an unexpected keyword argument '%s'"
302
+ " to method read" % key
303
+ )
304
+ local_var_params[key] = val
305
+ del local_var_params['kwargs']
306
+ # verify the required parameter 'pulp_2to3_migration_pulp2_content_href' is set
307
+ if self.api_client.client_side_validation and ('pulp_2to3_migration_pulp2_content_href' not in local_var_params or # noqa: E501
308
+ local_var_params['pulp_2to3_migration_pulp2_content_href'] is None): # noqa: E501
309
+ raise ApiValueError("Missing the required parameter `pulp_2to3_migration_pulp2_content_href` when calling `read`") # noqa: E501
310
+
311
+ collection_formats = {}
312
+
313
+ path_params = {}
314
+ if 'pulp_2to3_migration_pulp2_content_href' in local_var_params:
315
+ path_params['pulp_2to3_migration_pulp2_content_href'] = local_var_params['pulp_2to3_migration_pulp2_content_href'] # noqa: E501
316
+
317
+ query_params = []
318
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
319
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
320
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
321
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
322
+
323
+ header_params = {}
324
+
325
+ form_params = []
326
+ local_var_files = {}
327
+
328
+ body_params = None
329
+ # HTTP header `Accept`
330
+ header_params['Accept'] = self.api_client.select_header_accept(
331
+ ['application/json']) # noqa: E501
332
+
333
+ # Authentication setting
334
+ auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
335
+
336
+ return self.api_client.call_api(
337
+ '{pulp_2to3_migration_pulp2_content_href}', 'GET',
338
+ path_params,
339
+ query_params,
340
+ header_params,
341
+ body=body_params,
342
+ post_params=form_params,
343
+ files=local_var_files,
344
+ response_type='Pulp2to3MigrationPulp2ContentResponse', # noqa: E501
345
+ auth_settings=auth_settings,
346
+ async_req=local_var_params.get('async_req'),
347
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
348
+ _preload_content=local_var_params.get('_preload_content', True),
349
+ _request_timeout=local_var_params.get('_request_timeout'),
350
+ collection_formats=collection_formats)
@@ -0,0 +1,313 @@
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 Pulp2RepositoriesApi(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 list(self, **kwargs): # noqa: E501
41
+ """List pulp2 repositorys # noqa: E501
42
+
43
+ ViewSet for Pulp2Repositories model. # 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.list(async_req=True)
47
+ >>> result = thread.get()
48
+
49
+ :param async_req bool: execute request asynchronously
50
+ :param bool is_migrated:
51
+ :param int limit: Number of results to return per page.
52
+ :param bool not_in_plan:
53
+ :param int offset: The initial index from which to return the results.
54
+ :param str ordering: Which field to use when ordering the results.
55
+ :param str pulp2_repo_id:
56
+ :param list[str] pulp2_repo_id__in: Filter results where pulp2_repo_id is in a comma-separated list of values
57
+ :param str fields: A list of fields to include in the response.
58
+ :param str exclude_fields: A list of fields to exclude from the response.
59
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
60
+ be returned without reading/decoding response
61
+ data. Default is True.
62
+ :param _request_timeout: timeout setting for this request. If one
63
+ number provided, it will be total request
64
+ timeout. It can also be a pair (tuple) of
65
+ (connection, read) timeouts.
66
+ :return: Paginatedpulp2to3MigrationPulp2RepositoryResponseList
67
+ If the method is called asynchronously,
68
+ returns the request thread.
69
+ """
70
+ kwargs['_return_http_data_only'] = True
71
+ return self.list_with_http_info(**kwargs) # noqa: E501
72
+
73
+ def list_with_http_info(self, **kwargs): # noqa: E501
74
+ """List pulp2 repositorys # noqa: E501
75
+
76
+ ViewSet for Pulp2Repositories model. # noqa: E501
77
+ This method makes a synchronous HTTP request by default. To make an
78
+ asynchronous HTTP request, please pass async_req=True
79
+ >>> thread = api.list_with_http_info(async_req=True)
80
+ >>> result = thread.get()
81
+
82
+ :param async_req bool: execute request asynchronously
83
+ :param bool is_migrated:
84
+ :param int limit: Number of results to return per page.
85
+ :param bool not_in_plan:
86
+ :param int offset: The initial index from which to return the results.
87
+ :param str ordering: Which field to use when ordering the results.
88
+ :param str pulp2_repo_id:
89
+ :param list[str] pulp2_repo_id__in: Filter results where pulp2_repo_id is in a comma-separated list of values
90
+ :param str fields: A list of fields to include in the response.
91
+ :param str exclude_fields: A list of fields to exclude from the response.
92
+ :param _return_http_data_only: response data without head status code
93
+ and headers
94
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
95
+ be returned without reading/decoding response
96
+ data. Default is True.
97
+ :param _request_timeout: timeout setting for this request. If one
98
+ number provided, it will be total request
99
+ timeout. It can also be a pair (tuple) of
100
+ (connection, read) timeouts.
101
+ :return: tuple(Paginatedpulp2to3MigrationPulp2RepositoryResponseList, status_code(int), headers(HTTPHeaderDict))
102
+ If the method is called asynchronously,
103
+ returns the request thread.
104
+ """
105
+
106
+ local_var_params = locals()
107
+
108
+ all_params = [
109
+ 'is_migrated',
110
+ 'limit',
111
+ 'not_in_plan',
112
+ 'offset',
113
+ 'ordering',
114
+ 'pulp2_repo_id',
115
+ 'pulp2_repo_id__in',
116
+ 'fields',
117
+ 'exclude_fields'
118
+ ]
119
+ all_params.extend(
120
+ [
121
+ 'async_req',
122
+ '_return_http_data_only',
123
+ '_preload_content',
124
+ '_request_timeout'
125
+ ]
126
+ )
127
+
128
+ for key, val in six.iteritems(local_var_params['kwargs']):
129
+ if key not in all_params:
130
+ raise ApiTypeError(
131
+ "Got an unexpected keyword argument '%s'"
132
+ " to method list" % key
133
+ )
134
+ local_var_params[key] = val
135
+ del local_var_params['kwargs']
136
+
137
+ collection_formats = {}
138
+
139
+ path_params = {}
140
+
141
+ query_params = []
142
+ if 'is_migrated' in local_var_params and local_var_params['is_migrated'] is not None: # noqa: E501
143
+ query_params.append(('is_migrated', local_var_params['is_migrated'])) # noqa: E501
144
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
145
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
146
+ if 'not_in_plan' in local_var_params and local_var_params['not_in_plan'] is not None: # noqa: E501
147
+ query_params.append(('not_in_plan', local_var_params['not_in_plan'])) # noqa: E501
148
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
149
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
150
+ if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
151
+ query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
152
+ if 'pulp2_repo_id' in local_var_params and local_var_params['pulp2_repo_id'] is not None: # noqa: E501
153
+ query_params.append(('pulp2_repo_id', local_var_params['pulp2_repo_id'])) # noqa: E501
154
+ if 'pulp2_repo_id__in' in local_var_params and local_var_params['pulp2_repo_id__in'] is not None: # noqa: E501
155
+ query_params.append(('pulp2_repo_id__in', local_var_params['pulp2_repo_id__in'])) # noqa: E501
156
+ collection_formats['pulp2_repo_id__in'] = 'csv' # noqa: E501
157
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
158
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
159
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
160
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
161
+
162
+ header_params = {}
163
+
164
+ form_params = []
165
+ local_var_files = {}
166
+
167
+ body_params = None
168
+ # HTTP header `Accept`
169
+ header_params['Accept'] = self.api_client.select_header_accept(
170
+ ['application/json']) # noqa: E501
171
+
172
+ # Authentication setting
173
+ auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
174
+
175
+ return self.api_client.call_api(
176
+ '/pulp/api/v3/pulp2repositories/', 'GET',
177
+ path_params,
178
+ query_params,
179
+ header_params,
180
+ body=body_params,
181
+ post_params=form_params,
182
+ files=local_var_files,
183
+ response_type='Paginatedpulp2to3MigrationPulp2RepositoryResponseList', # noqa: E501
184
+ auth_settings=auth_settings,
185
+ async_req=local_var_params.get('async_req'),
186
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
187
+ _preload_content=local_var_params.get('_preload_content', True),
188
+ _request_timeout=local_var_params.get('_request_timeout'),
189
+ collection_formats=collection_formats)
190
+
191
+ def read(self, pulp_2to3_migration_pulp2_repository_href, **kwargs): # noqa: E501
192
+ """Inspect a pulp2 repository # noqa: E501
193
+
194
+ ViewSet for Pulp2Repositories model. # noqa: E501
195
+ This method makes a synchronous HTTP request by default. To make an
196
+ asynchronous HTTP request, please pass async_req=True
197
+ >>> thread = api.read(pulp_2to3_migration_pulp2_repository_href, async_req=True)
198
+ >>> result = thread.get()
199
+
200
+ :param async_req bool: execute request asynchronously
201
+ :param str pulp_2to3_migration_pulp2_repository_href: (required)
202
+ :param str fields: A list of fields to include in the response.
203
+ :param str exclude_fields: A list of fields to exclude from the response.
204
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
205
+ be returned without reading/decoding response
206
+ data. Default is True.
207
+ :param _request_timeout: timeout setting for this request. If one
208
+ number provided, it will be total request
209
+ timeout. It can also be a pair (tuple) of
210
+ (connection, read) timeouts.
211
+ :return: Pulp2to3MigrationPulp2RepositoryResponse
212
+ If the method is called asynchronously,
213
+ returns the request thread.
214
+ """
215
+ kwargs['_return_http_data_only'] = True
216
+ return self.read_with_http_info(pulp_2to3_migration_pulp2_repository_href, **kwargs) # noqa: E501
217
+
218
+ def read_with_http_info(self, pulp_2to3_migration_pulp2_repository_href, **kwargs): # noqa: E501
219
+ """Inspect a pulp2 repository # noqa: E501
220
+
221
+ ViewSet for Pulp2Repositories model. # noqa: E501
222
+ This method makes a synchronous HTTP request by default. To make an
223
+ asynchronous HTTP request, please pass async_req=True
224
+ >>> thread = api.read_with_http_info(pulp_2to3_migration_pulp2_repository_href, async_req=True)
225
+ >>> result = thread.get()
226
+
227
+ :param async_req bool: execute request asynchronously
228
+ :param str pulp_2to3_migration_pulp2_repository_href: (required)
229
+ :param str fields: A list of fields to include in the response.
230
+ :param str exclude_fields: A list of fields to exclude from the response.
231
+ :param _return_http_data_only: response data without head status code
232
+ and headers
233
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
234
+ be returned without reading/decoding response
235
+ data. Default is True.
236
+ :param _request_timeout: timeout setting for this request. If one
237
+ number provided, it will be total request
238
+ timeout. It can also be a pair (tuple) of
239
+ (connection, read) timeouts.
240
+ :return: tuple(Pulp2to3MigrationPulp2RepositoryResponse, status_code(int), headers(HTTPHeaderDict))
241
+ If the method is called asynchronously,
242
+ returns the request thread.
243
+ """
244
+
245
+ local_var_params = locals()
246
+
247
+ all_params = [
248
+ 'pulp_2to3_migration_pulp2_repository_href',
249
+ 'fields',
250
+ 'exclude_fields'
251
+ ]
252
+ all_params.extend(
253
+ [
254
+ 'async_req',
255
+ '_return_http_data_only',
256
+ '_preload_content',
257
+ '_request_timeout'
258
+ ]
259
+ )
260
+
261
+ for key, val in six.iteritems(local_var_params['kwargs']):
262
+ if key not in all_params:
263
+ raise ApiTypeError(
264
+ "Got an unexpected keyword argument '%s'"
265
+ " to method read" % key
266
+ )
267
+ local_var_params[key] = val
268
+ del local_var_params['kwargs']
269
+ # verify the required parameter 'pulp_2to3_migration_pulp2_repository_href' is set
270
+ if self.api_client.client_side_validation and ('pulp_2to3_migration_pulp2_repository_href' not in local_var_params or # noqa: E501
271
+ local_var_params['pulp_2to3_migration_pulp2_repository_href'] is None): # noqa: E501
272
+ raise ApiValueError("Missing the required parameter `pulp_2to3_migration_pulp2_repository_href` when calling `read`") # noqa: E501
273
+
274
+ collection_formats = {}
275
+
276
+ path_params = {}
277
+ if 'pulp_2to3_migration_pulp2_repository_href' in local_var_params:
278
+ path_params['pulp_2to3_migration_pulp2_repository_href'] = local_var_params['pulp_2to3_migration_pulp2_repository_href'] # noqa: E501
279
+
280
+ query_params = []
281
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
282
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
283
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
284
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
285
+
286
+ header_params = {}
287
+
288
+ form_params = []
289
+ local_var_files = {}
290
+
291
+ body_params = None
292
+ # HTTP header `Accept`
293
+ header_params['Accept'] = self.api_client.select_header_accept(
294
+ ['application/json']) # noqa: E501
295
+
296
+ # Authentication setting
297
+ auth_settings = ['basicAuth', 'cookieAuth'] # noqa: E501
298
+
299
+ return self.api_client.call_api(
300
+ '{pulp_2to3_migration_pulp2_repository_href}', 'GET',
301
+ path_params,
302
+ query_params,
303
+ header_params,
304
+ body=body_params,
305
+ post_params=form_params,
306
+ files=local_var_files,
307
+ response_type='Pulp2to3MigrationPulp2RepositoryResponse', # noqa: E501
308
+ auth_settings=auth_settings,
309
+ async_req=local_var_params.get('async_req'),
310
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
311
+ _preload_content=local_var_params.get('_preload_content', True),
312
+ _request_timeout=local_var_params.get('_request_timeout'),
313
+ collection_formats=collection_formats)