pulp_2to3_migration_client 0.2.0b2.dev01587578581 → 0.2.0b3

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,317 @@
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 Pulp2contentApi(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 list(self, **kwargs): # noqa: E501
40
+ """List pulp2 contents # noqa: E501
41
+
42
+ ViewSet for Pulp2Content model. # 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.list(async_req=True)
46
+ >>> result = thread.get()
47
+
48
+ :param async_req bool: execute request asynchronously
49
+ :param str ordering: Which field to use when ordering the results.
50
+ :param str pulp2_id:
51
+ :param str pulp2_id__in: Filter results where pulp2_id is in a comma-separated list of values
52
+ :param str pulp2_content_type_id:
53
+ :param str pulp2_content_type_id__in: Filter results where pulp2_content_type_id is in a comma-separated list of values
54
+ :param float pulp2_last_updated__lt: Filter results where pulp2_last_updated is less than value
55
+ :param float pulp2_last_updated__lte: Filter results where pulp2_last_updated is less than or equal to value
56
+ :param float pulp2_last_updated__gt: Filter results where pulp2_last_updated is greater than value
57
+ :param float pulp2_last_updated__gte: Filter results where pulp2_last_updated is greater than or equal to value
58
+ :param float pulp2_last_updated__range: Filter results where pulp2_last_updated is between two comma separated values
59
+ :param str pulp3_content: Foreign Key referenced by HREF
60
+ :param str pulp2_last_updated: ISO 8601 formatted dates are supported
61
+ :param int limit: Number of results to return per page.
62
+ :param int offset: The initial index from which to return the results.
63
+ :param str fields: A list of fields to include in the response.
64
+ :param str exclude_fields: A list of fields to exclude from the response.
65
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
66
+ be returned without reading/decoding response
67
+ data. Default is True.
68
+ :param _request_timeout: timeout setting for this request. If one
69
+ number provided, it will be total request
70
+ timeout. It can also be a pair (tuple) of
71
+ (connection, read) timeouts.
72
+ :return: InlineResponse2001
73
+ If the method is called asynchronously,
74
+ returns the request thread.
75
+ """
76
+ kwargs['_return_http_data_only'] = True
77
+ return self.list_with_http_info(**kwargs) # noqa: E501
78
+
79
+ def list_with_http_info(self, **kwargs): # noqa: E501
80
+ """List pulp2 contents # noqa: E501
81
+
82
+ ViewSet for Pulp2Content model. # noqa: E501
83
+ This method makes a synchronous HTTP request by default. To make an
84
+ asynchronous HTTP request, please pass async_req=True
85
+ >>> thread = api.list_with_http_info(async_req=True)
86
+ >>> result = thread.get()
87
+
88
+ :param async_req bool: execute request asynchronously
89
+ :param str ordering: Which field to use when ordering the results.
90
+ :param str pulp2_id:
91
+ :param str pulp2_id__in: Filter results where pulp2_id is in a comma-separated list of values
92
+ :param str pulp2_content_type_id:
93
+ :param str pulp2_content_type_id__in: Filter results where pulp2_content_type_id is in a comma-separated list of values
94
+ :param float pulp2_last_updated__lt: Filter results where pulp2_last_updated is less than value
95
+ :param float pulp2_last_updated__lte: Filter results where pulp2_last_updated is less than or equal to value
96
+ :param float pulp2_last_updated__gt: Filter results where pulp2_last_updated is greater than value
97
+ :param float pulp2_last_updated__gte: Filter results where pulp2_last_updated is greater than or equal to value
98
+ :param float pulp2_last_updated__range: Filter results where pulp2_last_updated is between two comma separated values
99
+ :param str pulp3_content: Foreign Key referenced by HREF
100
+ :param str pulp2_last_updated: ISO 8601 formatted dates are supported
101
+ :param int limit: Number of results to return per page.
102
+ :param int offset: The initial index from which to return the results.
103
+ :param str fields: A list of fields to include in the response.
104
+ :param str exclude_fields: A list of fields to exclude from the response.
105
+ :param _return_http_data_only: response data without head status code
106
+ and headers
107
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
108
+ be returned without reading/decoding response
109
+ data. Default is True.
110
+ :param _request_timeout: timeout setting for this request. If one
111
+ number provided, it will be total request
112
+ timeout. It can also be a pair (tuple) of
113
+ (connection, read) timeouts.
114
+ :return: tuple(InlineResponse2001, status_code(int), headers(HTTPHeaderDict))
115
+ If the method is called asynchronously,
116
+ returns the request thread.
117
+ """
118
+
119
+ local_var_params = locals()
120
+
121
+ all_params = ['ordering', 'pulp2_id', 'pulp2_id__in', 'pulp2_content_type_id', 'pulp2_content_type_id__in', 'pulp2_last_updated__lt', 'pulp2_last_updated__lte', 'pulp2_last_updated__gt', 'pulp2_last_updated__gte', 'pulp2_last_updated__range', 'pulp3_content', 'pulp2_last_updated', 'limit', 'offset', 'fields', 'exclude_fields'] # noqa: E501
122
+ all_params.append('async_req')
123
+ all_params.append('_return_http_data_only')
124
+ all_params.append('_preload_content')
125
+ all_params.append('_request_timeout')
126
+
127
+ for key, val in six.iteritems(local_var_params['kwargs']):
128
+ if key not in all_params:
129
+ raise ApiTypeError(
130
+ "Got an unexpected keyword argument '%s'"
131
+ " to method list" % key
132
+ )
133
+ local_var_params[key] = val
134
+ del local_var_params['kwargs']
135
+
136
+ collection_formats = {}
137
+
138
+ path_params = {}
139
+
140
+ query_params = []
141
+ if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
142
+ query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
143
+ if 'pulp2_id' in local_var_params and local_var_params['pulp2_id'] is not None: # noqa: E501
144
+ query_params.append(('pulp2_id', local_var_params['pulp2_id'])) # noqa: E501
145
+ if 'pulp2_id__in' in local_var_params and local_var_params['pulp2_id__in'] is not None: # noqa: E501
146
+ query_params.append(('pulp2_id__in', local_var_params['pulp2_id__in'])) # noqa: E501
147
+ if 'pulp2_content_type_id' in local_var_params and local_var_params['pulp2_content_type_id'] is not None: # noqa: E501
148
+ query_params.append(('pulp2_content_type_id', local_var_params['pulp2_content_type_id'])) # noqa: E501
149
+ if 'pulp2_content_type_id__in' in local_var_params and local_var_params['pulp2_content_type_id__in'] is not None: # noqa: E501
150
+ query_params.append(('pulp2_content_type_id__in', local_var_params['pulp2_content_type_id__in'])) # noqa: E501
151
+ if 'pulp2_last_updated__lt' in local_var_params and local_var_params['pulp2_last_updated__lt'] is not None: # noqa: E501
152
+ query_params.append(('pulp2_last_updated__lt', local_var_params['pulp2_last_updated__lt'])) # noqa: E501
153
+ if 'pulp2_last_updated__lte' in local_var_params and local_var_params['pulp2_last_updated__lte'] is not None: # noqa: E501
154
+ query_params.append(('pulp2_last_updated__lte', local_var_params['pulp2_last_updated__lte'])) # noqa: E501
155
+ if 'pulp2_last_updated__gt' in local_var_params and local_var_params['pulp2_last_updated__gt'] is not None: # noqa: E501
156
+ query_params.append(('pulp2_last_updated__gt', local_var_params['pulp2_last_updated__gt'])) # noqa: E501
157
+ if 'pulp2_last_updated__gte' in local_var_params and local_var_params['pulp2_last_updated__gte'] is not None: # noqa: E501
158
+ query_params.append(('pulp2_last_updated__gte', local_var_params['pulp2_last_updated__gte'])) # noqa: E501
159
+ if 'pulp2_last_updated__range' in local_var_params and local_var_params['pulp2_last_updated__range'] is not None: # noqa: E501
160
+ query_params.append(('pulp2_last_updated__range', local_var_params['pulp2_last_updated__range'])) # noqa: E501
161
+ if 'pulp3_content' in local_var_params and local_var_params['pulp3_content'] is not None: # noqa: E501
162
+ query_params.append(('pulp3_content', local_var_params['pulp3_content'])) # noqa: E501
163
+ if 'pulp2_last_updated' in local_var_params and local_var_params['pulp2_last_updated'] is not None: # noqa: E501
164
+ query_params.append(('pulp2_last_updated', local_var_params['pulp2_last_updated'])) # noqa: E501
165
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
166
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
167
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
168
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
169
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
170
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
171
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
172
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
173
+
174
+ header_params = {}
175
+
176
+ form_params = []
177
+ local_var_files = {}
178
+
179
+ body_params = None
180
+ # HTTP header `Accept`
181
+ header_params['Accept'] = self.api_client.select_header_accept(
182
+ ['application/json']) # noqa: E501
183
+
184
+ # Authentication setting
185
+ auth_settings = ['Basic'] # noqa: E501
186
+
187
+ return self.api_client.call_api(
188
+ '/pulp/api/v3/pulp2content/', 'GET',
189
+ path_params,
190
+ query_params,
191
+ header_params,
192
+ body=body_params,
193
+ post_params=form_params,
194
+ files=local_var_files,
195
+ response_type='InlineResponse2001', # noqa: E501
196
+ auth_settings=auth_settings,
197
+ async_req=local_var_params.get('async_req'),
198
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
199
+ _preload_content=local_var_params.get('_preload_content', True),
200
+ _request_timeout=local_var_params.get('_request_timeout'),
201
+ collection_formats=collection_formats)
202
+
203
+ def read(self, pulp2_content_href, **kwargs): # noqa: E501
204
+ """Inspect a pulp2 content # noqa: E501
205
+
206
+ ViewSet for Pulp2Content model. # noqa: E501
207
+ This method makes a synchronous HTTP request by default. To make an
208
+ asynchronous HTTP request, please pass async_req=True
209
+ >>> thread = api.read(pulp2_content_href, async_req=True)
210
+ >>> result = thread.get()
211
+
212
+ :param async_req bool: execute request asynchronously
213
+ :param str pulp2_content_href: URI of Pulp2 Content. e.g.: /pulp/api/v3/pulp2content/1/ (required)
214
+ :param str fields: A list of fields to include in the response.
215
+ :param str exclude_fields: A list of fields to exclude from the response.
216
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
217
+ be returned without reading/decoding response
218
+ data. Default is True.
219
+ :param _request_timeout: timeout setting for this request. If one
220
+ number provided, it will be total request
221
+ timeout. It can also be a pair (tuple) of
222
+ (connection, read) timeouts.
223
+ :return: Pulp2to3MigrationPulp2ContentRead
224
+ If the method is called asynchronously,
225
+ returns the request thread.
226
+ """
227
+ kwargs['_return_http_data_only'] = True
228
+ return self.read_with_http_info(pulp2_content_href, **kwargs) # noqa: E501
229
+
230
+ def read_with_http_info(self, pulp2_content_href, **kwargs): # noqa: E501
231
+ """Inspect a pulp2 content # noqa: E501
232
+
233
+ ViewSet for Pulp2Content model. # noqa: E501
234
+ This method makes a synchronous HTTP request by default. To make an
235
+ asynchronous HTTP request, please pass async_req=True
236
+ >>> thread = api.read_with_http_info(pulp2_content_href, async_req=True)
237
+ >>> result = thread.get()
238
+
239
+ :param async_req bool: execute request asynchronously
240
+ :param str pulp2_content_href: URI of Pulp2 Content. e.g.: /pulp/api/v3/pulp2content/1/ (required)
241
+ :param str fields: A list of fields to include in the response.
242
+ :param str exclude_fields: A list of fields to exclude from the response.
243
+ :param _return_http_data_only: response data without head status code
244
+ and headers
245
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
246
+ be returned without reading/decoding response
247
+ data. Default is True.
248
+ :param _request_timeout: timeout setting for this request. If one
249
+ number provided, it will be total request
250
+ timeout. It can also be a pair (tuple) of
251
+ (connection, read) timeouts.
252
+ :return: tuple(Pulp2to3MigrationPulp2ContentRead, status_code(int), headers(HTTPHeaderDict))
253
+ If the method is called asynchronously,
254
+ returns the request thread.
255
+ """
256
+
257
+ local_var_params = locals()
258
+
259
+ all_params = ['pulp2_content_href', 'fields', 'exclude_fields'] # noqa: E501
260
+ all_params.append('async_req')
261
+ all_params.append('_return_http_data_only')
262
+ all_params.append('_preload_content')
263
+ all_params.append('_request_timeout')
264
+
265
+ for key, val in six.iteritems(local_var_params['kwargs']):
266
+ if key not in all_params:
267
+ raise ApiTypeError(
268
+ "Got an unexpected keyword argument '%s'"
269
+ " to method read" % key
270
+ )
271
+ local_var_params[key] = val
272
+ del local_var_params['kwargs']
273
+ # verify the required parameter 'pulp2_content_href' is set
274
+ if self.api_client.client_side_validation and ('pulp2_content_href' not in local_var_params or # noqa: E501
275
+ local_var_params['pulp2_content_href'] is None): # noqa: E501
276
+ raise ApiValueError("Missing the required parameter `pulp2_content_href` when calling `read`") # noqa: E501
277
+
278
+ collection_formats = {}
279
+
280
+ path_params = {}
281
+ if 'pulp2_content_href' in local_var_params:
282
+ path_params['pulp2_content_href'] = local_var_params['pulp2_content_href'] # noqa: E501
283
+
284
+ query_params = []
285
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
286
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
287
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
288
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
289
+
290
+ header_params = {}
291
+
292
+ form_params = []
293
+ local_var_files = {}
294
+
295
+ body_params = None
296
+ # HTTP header `Accept`
297
+ header_params['Accept'] = self.api_client.select_header_accept(
298
+ ['application/json']) # noqa: E501
299
+
300
+ # Authentication setting
301
+ auth_settings = ['Basic'] # noqa: E501
302
+
303
+ return self.api_client.call_api(
304
+ '{pulp2_content_href}', 'GET',
305
+ path_params,
306
+ query_params,
307
+ header_params,
308
+ body=body_params,
309
+ post_params=form_params,
310
+ files=local_var_files,
311
+ response_type='Pulp2to3MigrationPulp2ContentRead', # noqa: E501
312
+ auth_settings=auth_settings,
313
+ async_req=local_var_params.get('async_req'),
314
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
315
+ _preload_content=local_var_params.get('_preload_content', True),
316
+ _request_timeout=local_var_params.get('_request_timeout'),
317
+ collection_formats=collection_formats)
@@ -0,0 +1,289 @@
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 Pulp2repositoriesApi(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 list(self, **kwargs): # noqa: E501
40
+ """List pulp2 repositorys # noqa: E501
41
+
42
+ ViewSet for Pulp2Repositories model. # 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.list(async_req=True)
46
+ >>> result = thread.get()
47
+
48
+ :param async_req bool: execute request asynchronously
49
+ :param str ordering: Which field to use when ordering the results.
50
+ :param str pulp2_repo_id:
51
+ :param str pulp2_repo_id__in: Filter results where pulp2_repo_id is in a comma-separated list of values
52
+ :param str is_migrated:
53
+ :param str not_in_plan:
54
+ :param int limit: Number of results to return per page.
55
+ :param int offset: The initial index from which to return the results.
56
+ :param str fields: A list of fields to include in the response.
57
+ :param str exclude_fields: A list of fields to exclude from the response.
58
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
59
+ be returned without reading/decoding response
60
+ data. Default is True.
61
+ :param _request_timeout: timeout setting for this request. If one
62
+ number provided, it will be total request
63
+ timeout. It can also be a pair (tuple) of
64
+ (connection, read) timeouts.
65
+ :return: InlineResponse2002
66
+ If the method is called asynchronously,
67
+ returns the request thread.
68
+ """
69
+ kwargs['_return_http_data_only'] = True
70
+ return self.list_with_http_info(**kwargs) # noqa: E501
71
+
72
+ def list_with_http_info(self, **kwargs): # noqa: E501
73
+ """List pulp2 repositorys # noqa: E501
74
+
75
+ ViewSet for Pulp2Repositories model. # noqa: E501
76
+ This method makes a synchronous HTTP request by default. To make an
77
+ asynchronous HTTP request, please pass async_req=True
78
+ >>> thread = api.list_with_http_info(async_req=True)
79
+ >>> result = thread.get()
80
+
81
+ :param async_req bool: execute request asynchronously
82
+ :param str ordering: Which field to use when ordering the results.
83
+ :param str pulp2_repo_id:
84
+ :param str pulp2_repo_id__in: Filter results where pulp2_repo_id is in a comma-separated list of values
85
+ :param str is_migrated:
86
+ :param str not_in_plan:
87
+ :param int limit: Number of results to return per page.
88
+ :param int offset: The initial index from which to return the results.
89
+ :param str fields: A list of fields to include in the response.
90
+ :param str exclude_fields: A list of fields to exclude from the response.
91
+ :param _return_http_data_only: response data without head status code
92
+ and headers
93
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
94
+ be returned without reading/decoding response
95
+ data. Default is True.
96
+ :param _request_timeout: timeout setting for this request. If one
97
+ number provided, it will be total request
98
+ timeout. It can also be a pair (tuple) of
99
+ (connection, read) timeouts.
100
+ :return: tuple(InlineResponse2002, status_code(int), headers(HTTPHeaderDict))
101
+ If the method is called asynchronously,
102
+ returns the request thread.
103
+ """
104
+
105
+ local_var_params = locals()
106
+
107
+ all_params = ['ordering', 'pulp2_repo_id', 'pulp2_repo_id__in', 'is_migrated', 'not_in_plan', 'limit', 'offset', 'fields', 'exclude_fields'] # noqa: E501
108
+ all_params.append('async_req')
109
+ all_params.append('_return_http_data_only')
110
+ all_params.append('_preload_content')
111
+ all_params.append('_request_timeout')
112
+
113
+ for key, val in six.iteritems(local_var_params['kwargs']):
114
+ if key not in all_params:
115
+ raise ApiTypeError(
116
+ "Got an unexpected keyword argument '%s'"
117
+ " to method list" % key
118
+ )
119
+ local_var_params[key] = val
120
+ del local_var_params['kwargs']
121
+
122
+ collection_formats = {}
123
+
124
+ path_params = {}
125
+
126
+ query_params = []
127
+ if 'ordering' in local_var_params and local_var_params['ordering'] is not None: # noqa: E501
128
+ query_params.append(('ordering', local_var_params['ordering'])) # noqa: E501
129
+ if 'pulp2_repo_id' in local_var_params and local_var_params['pulp2_repo_id'] is not None: # noqa: E501
130
+ query_params.append(('pulp2_repo_id', local_var_params['pulp2_repo_id'])) # noqa: E501
131
+ if 'pulp2_repo_id__in' in local_var_params and local_var_params['pulp2_repo_id__in'] is not None: # noqa: E501
132
+ query_params.append(('pulp2_repo_id__in', local_var_params['pulp2_repo_id__in'])) # noqa: E501
133
+ if 'is_migrated' in local_var_params and local_var_params['is_migrated'] is not None: # noqa: E501
134
+ query_params.append(('is_migrated', local_var_params['is_migrated'])) # noqa: E501
135
+ if 'not_in_plan' in local_var_params and local_var_params['not_in_plan'] is not None: # noqa: E501
136
+ query_params.append(('not_in_plan', local_var_params['not_in_plan'])) # noqa: E501
137
+ if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
138
+ query_params.append(('limit', local_var_params['limit'])) # noqa: E501
139
+ if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
140
+ query_params.append(('offset', local_var_params['offset'])) # noqa: E501
141
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
142
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
143
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
144
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
145
+
146
+ header_params = {}
147
+
148
+ form_params = []
149
+ local_var_files = {}
150
+
151
+ body_params = None
152
+ # HTTP header `Accept`
153
+ header_params['Accept'] = self.api_client.select_header_accept(
154
+ ['application/json']) # noqa: E501
155
+
156
+ # Authentication setting
157
+ auth_settings = ['Basic'] # noqa: E501
158
+
159
+ return self.api_client.call_api(
160
+ '/pulp/api/v3/pulp2repositories/', 'GET',
161
+ path_params,
162
+ query_params,
163
+ header_params,
164
+ body=body_params,
165
+ post_params=form_params,
166
+ files=local_var_files,
167
+ response_type='InlineResponse2002', # noqa: E501
168
+ auth_settings=auth_settings,
169
+ async_req=local_var_params.get('async_req'),
170
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
171
+ _preload_content=local_var_params.get('_preload_content', True),
172
+ _request_timeout=local_var_params.get('_request_timeout'),
173
+ collection_formats=collection_formats)
174
+
175
+ def read(self, pulp2_repository_href, **kwargs): # noqa: E501
176
+ """Inspect a pulp2 repository # noqa: E501
177
+
178
+ ViewSet for Pulp2Repositories model. # noqa: E501
179
+ This method makes a synchronous HTTP request by default. To make an
180
+ asynchronous HTTP request, please pass async_req=True
181
+ >>> thread = api.read(pulp2_repository_href, async_req=True)
182
+ >>> result = thread.get()
183
+
184
+ :param async_req bool: execute request asynchronously
185
+ :param str pulp2_repository_href: URI of Pulp2 Repository. e.g.: /pulp/api/v3/pulp2repositories/1/ (required)
186
+ :param str fields: A list of fields to include in the response.
187
+ :param str exclude_fields: A list of fields to exclude from the response.
188
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
189
+ be returned without reading/decoding response
190
+ data. Default is True.
191
+ :param _request_timeout: timeout setting for this request. If one
192
+ number provided, it will be total request
193
+ timeout. It can also be a pair (tuple) of
194
+ (connection, read) timeouts.
195
+ :return: Pulp2to3MigrationPulp2RepositoryRead
196
+ If the method is called asynchronously,
197
+ returns the request thread.
198
+ """
199
+ kwargs['_return_http_data_only'] = True
200
+ return self.read_with_http_info(pulp2_repository_href, **kwargs) # noqa: E501
201
+
202
+ def read_with_http_info(self, pulp2_repository_href, **kwargs): # noqa: E501
203
+ """Inspect a pulp2 repository # noqa: E501
204
+
205
+ ViewSet for Pulp2Repositories model. # noqa: E501
206
+ This method makes a synchronous HTTP request by default. To make an
207
+ asynchronous HTTP request, please pass async_req=True
208
+ >>> thread = api.read_with_http_info(pulp2_repository_href, async_req=True)
209
+ >>> result = thread.get()
210
+
211
+ :param async_req bool: execute request asynchronously
212
+ :param str pulp2_repository_href: URI of Pulp2 Repository. e.g.: /pulp/api/v3/pulp2repositories/1/ (required)
213
+ :param str fields: A list of fields to include in the response.
214
+ :param str exclude_fields: A list of fields to exclude from the response.
215
+ :param _return_http_data_only: response data without head status code
216
+ and headers
217
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
218
+ be returned without reading/decoding response
219
+ data. Default is True.
220
+ :param _request_timeout: timeout setting for this request. If one
221
+ number provided, it will be total request
222
+ timeout. It can also be a pair (tuple) of
223
+ (connection, read) timeouts.
224
+ :return: tuple(Pulp2to3MigrationPulp2RepositoryRead, status_code(int), headers(HTTPHeaderDict))
225
+ If the method is called asynchronously,
226
+ returns the request thread.
227
+ """
228
+
229
+ local_var_params = locals()
230
+
231
+ all_params = ['pulp2_repository_href', 'fields', 'exclude_fields'] # noqa: E501
232
+ all_params.append('async_req')
233
+ all_params.append('_return_http_data_only')
234
+ all_params.append('_preload_content')
235
+ all_params.append('_request_timeout')
236
+
237
+ for key, val in six.iteritems(local_var_params['kwargs']):
238
+ if key not in all_params:
239
+ raise ApiTypeError(
240
+ "Got an unexpected keyword argument '%s'"
241
+ " to method read" % key
242
+ )
243
+ local_var_params[key] = val
244
+ del local_var_params['kwargs']
245
+ # verify the required parameter 'pulp2_repository_href' is set
246
+ if self.api_client.client_side_validation and ('pulp2_repository_href' not in local_var_params or # noqa: E501
247
+ local_var_params['pulp2_repository_href'] is None): # noqa: E501
248
+ raise ApiValueError("Missing the required parameter `pulp2_repository_href` when calling `read`") # noqa: E501
249
+
250
+ collection_formats = {}
251
+
252
+ path_params = {}
253
+ if 'pulp2_repository_href' in local_var_params:
254
+ path_params['pulp2_repository_href'] = local_var_params['pulp2_repository_href'] # noqa: E501
255
+
256
+ query_params = []
257
+ if 'fields' in local_var_params and local_var_params['fields'] is not None: # noqa: E501
258
+ query_params.append(('fields', local_var_params['fields'])) # noqa: E501
259
+ if 'exclude_fields' in local_var_params and local_var_params['exclude_fields'] is not None: # noqa: E501
260
+ query_params.append(('exclude_fields', local_var_params['exclude_fields'])) # noqa: E501
261
+
262
+ header_params = {}
263
+
264
+ form_params = []
265
+ local_var_files = {}
266
+
267
+ body_params = None
268
+ # HTTP header `Accept`
269
+ header_params['Accept'] = self.api_client.select_header_accept(
270
+ ['application/json']) # noqa: E501
271
+
272
+ # Authentication setting
273
+ auth_settings = ['Basic'] # noqa: E501
274
+
275
+ return self.api_client.call_api(
276
+ '{pulp2_repository_href}', 'GET',
277
+ path_params,
278
+ query_params,
279
+ header_params,
280
+ body=body_params,
281
+ post_params=form_params,
282
+ files=local_var_files,
283
+ response_type='Pulp2to3MigrationPulp2RepositoryRead', # noqa: E501
284
+ auth_settings=auth_settings,
285
+ async_req=local_var_params.get('async_req'),
286
+ _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
287
+ _preload_content=local_var_params.get('_preload_content', True),
288
+ _request_timeout=local_var_params.get('_request_timeout'),
289
+ collection_formats=collection_formats)