pulp_python_client 3.0.0b9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +175 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentPackagesApi.md +262 -0
  7. data/docs/ContentSummary.md +21 -0
  8. data/docs/DistributionsPypiApi.md +364 -0
  9. data/docs/InlineResponse200.md +23 -0
  10. data/docs/InlineResponse2001.md +23 -0
  11. data/docs/InlineResponse2002.md +23 -0
  12. data/docs/InlineResponse2003.md +23 -0
  13. data/docs/InlineResponse2004.md +23 -0
  14. data/docs/InlineResponse2005.md +23 -0
  15. data/docs/ProjectSpecifier.md +19 -0
  16. data/docs/PublicationsPypiApi.md +253 -0
  17. data/docs/PythonPythonDistribution.md +29 -0
  18. data/docs/PythonPythonDistributionRead.md +29 -0
  19. data/docs/PythonPythonPackageContentRead.md +69 -0
  20. data/docs/PythonPythonPublication.md +25 -0
  21. data/docs/PythonPythonPublicationRead.md +25 -0
  22. data/docs/PythonPythonRemote.md +49 -0
  23. data/docs/PythonPythonRemoteRead.md +49 -0
  24. data/docs/PythonPythonRepository.md +27 -0
  25. data/docs/PythonPythonRepositoryRead.md +27 -0
  26. data/docs/RemotesPythonApi.md +368 -0
  27. data/docs/RepositoriesPythonApi.md +468 -0
  28. data/docs/RepositoriesPythonVersionsApi.md +269 -0
  29. data/docs/RepositoryAddRemoveContent.md +21 -0
  30. data/docs/RepositorySyncURL.md +19 -0
  31. data/docs/RepositoryVersion.md +25 -0
  32. data/docs/RepositoryVersionRead.md +25 -0
  33. data/git_push.sh +58 -0
  34. data/lib/pulp_python_client.rb +67 -0
  35. data/lib/pulp_python_client/api/content_packages_api.rb +349 -0
  36. data/lib/pulp_python_client/api/distributions_pypi_api.rb +445 -0
  37. data/lib/pulp_python_client/api/publications_pypi_api.rb +306 -0
  38. data/lib/pulp_python_client/api/remotes_python_api.rb +451 -0
  39. data/lib/pulp_python_client/api/repositories_python_api.rb +573 -0
  40. data/lib/pulp_python_client/api/repositories_python_versions_api.rb +336 -0
  41. data/lib/pulp_python_client/api_client.rb +402 -0
  42. data/lib/pulp_python_client/api_error.rb +57 -0
  43. data/lib/pulp_python_client/configuration.rb +243 -0
  44. data/lib/pulp_python_client/models/async_operation_response.rb +212 -0
  45. data/lib/pulp_python_client/models/content_summary.rb +246 -0
  46. data/lib/pulp_python_client/models/inline_response200.rb +247 -0
  47. data/lib/pulp_python_client/models/inline_response2001.rb +247 -0
  48. data/lib/pulp_python_client/models/inline_response2002.rb +247 -0
  49. data/lib/pulp_python_client/models/inline_response2003.rb +247 -0
  50. data/lib/pulp_python_client/models/inline_response2004.rb +247 -0
  51. data/lib/pulp_python_client/models/inline_response2005.rb +247 -0
  52. data/lib/pulp_python_client/models/project_specifier.rb +242 -0
  53. data/lib/pulp_python_client/models/python_python_distribution.rb +331 -0
  54. data/lib/pulp_python_client/models/python_python_distribution_read.rb +331 -0
  55. data/lib/pulp_python_client/models/python_python_package_content_read.rb +550 -0
  56. data/lib/pulp_python_client/models/python_python_publication.rb +247 -0
  57. data/lib/pulp_python_client/models/python_python_publication_read.rb +247 -0
  58. data/lib/pulp_python_client/models/python_python_remote.rb +565 -0
  59. data/lib/pulp_python_client/models/python_python_remote_read.rb +565 -0
  60. data/lib/pulp_python_client/models/python_python_repository.rb +294 -0
  61. data/lib/pulp_python_client/models/python_python_repository_read.rb +294 -0
  62. data/lib/pulp_python_client/models/repository_add_remove_content.rb +231 -0
  63. data/lib/pulp_python_client/models/repository_sync_url.rb +224 -0
  64. data/lib/pulp_python_client/models/repository_version.rb +244 -0
  65. data/lib/pulp_python_client/models/repository_version_read.rb +244 -0
  66. data/lib/pulp_python_client/version.rb +15 -0
  67. data/pulp_python_client.gemspec +39 -0
  68. data/spec/api/content_packages_api_spec.rb +114 -0
  69. data/spec/api/distributions_pypi_api_spec.rb +121 -0
  70. data/spec/api/publications_pypi_api_spec.rb +96 -0
  71. data/spec/api/remotes_python_api_spec.rb +123 -0
  72. data/spec/api/repositories_python_api_spec.rb +143 -0
  73. data/spec/api/repositories_python_versions_api_spec.rb +103 -0
  74. data/spec/api_client_spec.rb +188 -0
  75. data/spec/configuration_spec.rb +42 -0
  76. data/spec/models/async_operation_response_spec.rb +41 -0
  77. data/spec/models/content_summary_spec.rb +53 -0
  78. data/spec/models/inline_response2001_spec.rb +59 -0
  79. data/spec/models/inline_response2002_spec.rb +59 -0
  80. data/spec/models/inline_response2003_spec.rb +59 -0
  81. data/spec/models/inline_response2004_spec.rb +59 -0
  82. data/spec/models/inline_response2005_spec.rb +59 -0
  83. data/spec/models/inline_response200_spec.rb +59 -0
  84. data/spec/models/project_specifier_spec.rb +47 -0
  85. data/spec/models/python_python_distribution_read_spec.rb +77 -0
  86. data/spec/models/python_python_distribution_spec.rb +77 -0
  87. data/spec/models/python_python_package_content_read_spec.rb +197 -0
  88. data/spec/models/python_python_publication_read_spec.rb +65 -0
  89. data/spec/models/python_python_publication_spec.rb +65 -0
  90. data/spec/models/python_python_remote_read_spec.rb +141 -0
  91. data/spec/models/python_python_remote_spec.rb +141 -0
  92. data/spec/models/python_python_repository_read_spec.rb +71 -0
  93. data/spec/models/python_python_repository_spec.rb +71 -0
  94. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  95. data/spec/models/repository_sync_url_spec.rb +47 -0
  96. data/spec/models/repository_version_read_spec.rb +65 -0
  97. data/spec/models/repository_version_spec.rb +65 -0
  98. data/spec/spec_helper.rb +111 -0
  99. metadata +225 -0
@@ -0,0 +1,306 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class PublicationsPypiApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a python publication
23
+ # Trigger an asynchronous task to publish python content.
24
+ # @param data [PythonPythonPublication]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a python publication
33
+ # Trigger an asynchronous task to publish python content.
34
+ # @param data [PythonPythonPublication]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: PublicationsPypiApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling PublicationsPypiApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/publications/python/pypi/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: PublicationsPypiApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a python publication
87
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
88
+ # @param python_publication_href [String] URI of Python Publication. e.g.: /pulp/api/v3/publications/python/pypi/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [nil]
91
+ def delete(python_publication_href, opts = {})
92
+ delete_with_http_info(python_publication_href, opts)
93
+ nil
94
+ end
95
+
96
+ # Delete a python publication
97
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
98
+ # @param python_publication_href [String] URI of Python Publication. e.g.: /pulp/api/v3/publications/python/pypi/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def delete_with_http_info(python_publication_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: PublicationsPypiApi.delete ...'
104
+ end
105
+ # verify the required parameter 'python_publication_href' is set
106
+ if @api_client.config.client_side_validation && python_publication_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'python_publication_href' when calling PublicationsPypiApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{python_publication_href}'.sub('{' + 'python_publication_href' + '}', CGI.escape(python_publication_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:body]
123
+
124
+ # return_type
125
+ return_type = opts[:return_type]
126
+
127
+ # auth_names
128
+ auth_names = opts[:auth_names] || ['Basic']
129
+
130
+ new_options = opts.merge(
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: PublicationsPypiApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # List python publications
147
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [String] :ordering Which field to use when ordering the results.
150
+ # @option opts [String] :repository_version Repository Version referenced by HREF
151
+ # @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
152
+ # @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
153
+ # @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
154
+ # @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
155
+ # @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
156
+ # @option opts [String] :pulp_created ISO 8601 formatted dates are supported
157
+ # @option opts [Integer] :limit Number of results to return per page.
158
+ # @option opts [Integer] :offset The initial index from which to return the results.
159
+ # @option opts [String] :fields A list of fields to include in the response.
160
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
161
+ # @return [InlineResponse2002]
162
+ def list(opts = {})
163
+ data, _status_code, _headers = list_with_http_info(opts)
164
+ data
165
+ end
166
+
167
+ # List python publications
168
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
169
+ # @param [Hash] opts the optional parameters
170
+ # @option opts [String] :ordering Which field to use when ordering the results.
171
+ # @option opts [String] :repository_version Repository Version referenced by HREF
172
+ # @option opts [String] :pulp_created__lt Filter results where pulp_created is less than value
173
+ # @option opts [String] :pulp_created__lte Filter results where pulp_created is less than or equal to value
174
+ # @option opts [String] :pulp_created__gt Filter results where pulp_created is greater than value
175
+ # @option opts [String] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
176
+ # @option opts [String] :pulp_created__range Filter results where pulp_created is between two comma separated values
177
+ # @option opts [String] :pulp_created ISO 8601 formatted dates are supported
178
+ # @option opts [Integer] :limit Number of results to return per page.
179
+ # @option opts [Integer] :offset The initial index from which to return the results.
180
+ # @option opts [String] :fields A list of fields to include in the response.
181
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
182
+ # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
183
+ def list_with_http_info(opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug 'Calling API: PublicationsPypiApi.list ...'
186
+ end
187
+ # resource path
188
+ local_var_path = '/pulp/api/v3/publications/python/pypi/'
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
193
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
194
+ query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
195
+ query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
196
+ query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
197
+ query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
198
+ query_params[:'pulp_created__range'] = opts[:'pulp_created__range'] if !opts[:'pulp_created__range'].nil?
199
+ query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
200
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
201
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
202
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
203
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:body]
215
+
216
+ # return_type
217
+ return_type = opts[:return_type] || 'InlineResponse2002'
218
+
219
+ # auth_names
220
+ auth_names = opts[:auth_names] || ['Basic']
221
+
222
+ new_options = opts.merge(
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: PublicationsPypiApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+
238
+ # Inspect a python publication
239
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
240
+ # @param python_publication_href [String] URI of Python Publication. e.g.: /pulp/api/v3/publications/python/pypi/1/
241
+ # @param [Hash] opts the optional parameters
242
+ # @option opts [String] :fields A list of fields to include in the response.
243
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
244
+ # @return [PythonPythonPublicationRead]
245
+ def read(python_publication_href, opts = {})
246
+ data, _status_code, _headers = read_with_http_info(python_publication_href, opts)
247
+ data
248
+ end
249
+
250
+ # Inspect a python publication
251
+ # Python Publications refer to the Python Package content in a repository version, and include metadata about that content.
252
+ # @param python_publication_href [String] URI of Python Publication. e.g.: /pulp/api/v3/publications/python/pypi/1/
253
+ # @param [Hash] opts the optional parameters
254
+ # @option opts [String] :fields A list of fields to include in the response.
255
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
256
+ # @return [Array<(PythonPythonPublicationRead, Integer, Hash)>] PythonPythonPublicationRead data, response status code and response headers
257
+ def read_with_http_info(python_publication_href, opts = {})
258
+ if @api_client.config.debugging
259
+ @api_client.config.logger.debug 'Calling API: PublicationsPypiApi.read ...'
260
+ end
261
+ # verify the required parameter 'python_publication_href' is set
262
+ if @api_client.config.client_side_validation && python_publication_href.nil?
263
+ fail ArgumentError, "Missing the required parameter 'python_publication_href' when calling PublicationsPypiApi.read"
264
+ end
265
+ # resource path
266
+ local_var_path = '{python_publication_href}'.sub('{' + 'python_publication_href' + '}', CGI.escape(python_publication_href.to_s).gsub('%2F', '/'))
267
+
268
+ # query parameters
269
+ query_params = opts[:query_params] || {}
270
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
271
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
272
+
273
+ # header parameters
274
+ header_params = opts[:header_params] || {}
275
+ # HTTP header 'Accept' (if needed)
276
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
277
+
278
+ # form parameters
279
+ form_params = opts[:form_params] || {}
280
+
281
+ # http body (model)
282
+ post_body = opts[:body]
283
+
284
+ # return_type
285
+ return_type = opts[:return_type] || 'PythonPythonPublicationRead'
286
+
287
+ # auth_names
288
+ auth_names = opts[:auth_names] || ['Basic']
289
+
290
+ new_options = opts.merge(
291
+ :header_params => header_params,
292
+ :query_params => query_params,
293
+ :form_params => form_params,
294
+ :body => post_body,
295
+ :auth_names => auth_names,
296
+ :return_type => return_type
297
+ )
298
+
299
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: PublicationsPypiApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+ end
306
+ end
@@ -0,0 +1,451 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpPythonClient
16
+ class RemotesPythonApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a python remote
23
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings.
24
+ # @param data [PythonPythonRemote]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [PythonPythonRemoteRead]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a python remote
33
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to &#x60;sync&#x60; from upstream repositories, and contains sync settings.
34
+ # @param data [PythonPythonRemote]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(PythonPythonRemoteRead, Integer, Hash)>] PythonPythonRemoteRead data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesPythonApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/remotes/python/python/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'PythonPythonRemoteRead'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: RemotesPythonApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a python remote
87
+ # Trigger an asynchronous delete task
88
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(python_remote_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(python_remote_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a python remote
97
+ # Trigger an asynchronous delete task
98
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(python_remote_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.delete ...'
104
+ end
105
+ # verify the required parameter 'python_remote_href' is set
106
+ if @api_client.config.client_side_validation && python_remote_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'python_remote_href' when calling RemotesPythonApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{python_remote_href}'.sub('{' + 'python_remote_href' + '}', CGI.escape(python_remote_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['Basic']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RemotesPythonApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List python remotes
149
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [String] :ordering Which field to use when ordering the results.
152
+ # @option opts [String] :name
153
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
154
+ # @option opts [String] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
155
+ # @option opts [String] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
156
+ # @option opts [String] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
157
+ # @option opts [String] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
158
+ # @option opts [String] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
159
+ # @option opts [String] :pulp_last_updated ISO 8601 formatted dates are supported
160
+ # @option opts [Integer] :limit Number of results to return per page.
161
+ # @option opts [Integer] :offset The initial index from which to return the results.
162
+ # @option opts [String] :fields A list of fields to include in the response.
163
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
164
+ # @return [InlineResponse2003]
165
+ def list(opts = {})
166
+ data, _status_code, _headers = list_with_http_info(opts)
167
+ data
168
+ end
169
+
170
+ # List python remotes
171
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to &#x60;sync&#x60; from upstream repositories, and contains sync settings.
172
+ # @param [Hash] opts the optional parameters
173
+ # @option opts [String] :ordering Which field to use when ordering the results.
174
+ # @option opts [String] :name
175
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
176
+ # @option opts [String] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
177
+ # @option opts [String] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
178
+ # @option opts [String] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
179
+ # @option opts [String] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
180
+ # @option opts [String] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
181
+ # @option opts [String] :pulp_last_updated ISO 8601 formatted dates are supported
182
+ # @option opts [Integer] :limit Number of results to return per page.
183
+ # @option opts [Integer] :offset The initial index from which to return the results.
184
+ # @option opts [String] :fields A list of fields to include in the response.
185
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
186
+ # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
187
+ def list_with_http_info(opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.list ...'
190
+ end
191
+ # resource path
192
+ local_var_path = '/pulp/api/v3/remotes/python/python/'
193
+
194
+ # query parameters
195
+ query_params = opts[:query_params] || {}
196
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
197
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
198
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
199
+ query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
200
+ query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
201
+ query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
202
+ query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
203
+ query_params[:'pulp_last_updated__range'] = opts[:'pulp_last_updated__range'] if !opts[:'pulp_last_updated__range'].nil?
204
+ query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
205
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
206
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
207
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
208
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:body]
220
+
221
+ # return_type
222
+ return_type = opts[:return_type] || 'InlineResponse2003'
223
+
224
+ # auth_names
225
+ auth_names = opts[:auth_names] || ['Basic']
226
+
227
+ new_options = opts.merge(
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => return_type
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: RemotesPythonApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # Partially update a python remote
244
+ # Trigger an asynchronous partial update task
245
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
246
+ # @param data [PythonPythonRemote]
247
+ # @param [Hash] opts the optional parameters
248
+ # @return [AsyncOperationResponse]
249
+ def partial_update(python_remote_href, data, opts = {})
250
+ data, _status_code, _headers = partial_update_with_http_info(python_remote_href, data, opts)
251
+ data
252
+ end
253
+
254
+ # Partially update a python remote
255
+ # Trigger an asynchronous partial update task
256
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
257
+ # @param data [PythonPythonRemote]
258
+ # @param [Hash] opts the optional parameters
259
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
260
+ def partial_update_with_http_info(python_remote_href, data, opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.partial_update ...'
263
+ end
264
+ # verify the required parameter 'python_remote_href' is set
265
+ if @api_client.config.client_side_validation && python_remote_href.nil?
266
+ fail ArgumentError, "Missing the required parameter 'python_remote_href' when calling RemotesPythonApi.partial_update"
267
+ end
268
+ # verify the required parameter 'data' is set
269
+ if @api_client.config.client_side_validation && data.nil?
270
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesPythonApi.partial_update"
271
+ end
272
+ # resource path
273
+ local_var_path = '{python_remote_href}'.sub('{' + 'python_remote_href' + '}', CGI.escape(python_remote_href.to_s).gsub('%2F', '/'))
274
+
275
+ # query parameters
276
+ query_params = opts[:query_params] || {}
277
+
278
+ # header parameters
279
+ header_params = opts[:header_params] || {}
280
+ # HTTP header 'Accept' (if needed)
281
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
282
+ # HTTP header 'Content-Type'
283
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
284
+
285
+ # form parameters
286
+ form_params = opts[:form_params] || {}
287
+
288
+ # http body (model)
289
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
290
+
291
+ # return_type
292
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
293
+
294
+ # auth_names
295
+ auth_names = opts[:auth_names] || ['Basic']
296
+
297
+ new_options = opts.merge(
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => return_type
304
+ )
305
+
306
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
307
+ if @api_client.config.debugging
308
+ @api_client.config.logger.debug "API called: RemotesPythonApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
309
+ end
310
+ return data, status_code, headers
311
+ end
312
+
313
+ # Inspect a python remote
314
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to `sync` from upstream repositories, and contains sync settings.
315
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
316
+ # @param [Hash] opts the optional parameters
317
+ # @option opts [String] :fields A list of fields to include in the response.
318
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
319
+ # @return [PythonPythonRemoteRead]
320
+ def read(python_remote_href, opts = {})
321
+ data, _status_code, _headers = read_with_http_info(python_remote_href, opts)
322
+ data
323
+ end
324
+
325
+ # Inspect a python remote
326
+ # Python Remotes are representations of an external repository of Python content, eg. PyPI. Fields include upstream repository config. Python Remotes are also used to &#x60;sync&#x60; from upstream repositories, and contains sync settings.
327
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
328
+ # @param [Hash] opts the optional parameters
329
+ # @option opts [String] :fields A list of fields to include in the response.
330
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
331
+ # @return [Array<(PythonPythonRemoteRead, Integer, Hash)>] PythonPythonRemoteRead data, response status code and response headers
332
+ def read_with_http_info(python_remote_href, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.read ...'
335
+ end
336
+ # verify the required parameter 'python_remote_href' is set
337
+ if @api_client.config.client_side_validation && python_remote_href.nil?
338
+ fail ArgumentError, "Missing the required parameter 'python_remote_href' when calling RemotesPythonApi.read"
339
+ end
340
+ # resource path
341
+ local_var_path = '{python_remote_href}'.sub('{' + 'python_remote_href' + '}', CGI.escape(python_remote_href.to_s).gsub('%2F', '/'))
342
+
343
+ # query parameters
344
+ query_params = opts[:query_params] || {}
345
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
346
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
347
+
348
+ # header parameters
349
+ header_params = opts[:header_params] || {}
350
+ # HTTP header 'Accept' (if needed)
351
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
352
+
353
+ # form parameters
354
+ form_params = opts[:form_params] || {}
355
+
356
+ # http body (model)
357
+ post_body = opts[:body]
358
+
359
+ # return_type
360
+ return_type = opts[:return_type] || 'PythonPythonRemoteRead'
361
+
362
+ # auth_names
363
+ auth_names = opts[:auth_names] || ['Basic']
364
+
365
+ new_options = opts.merge(
366
+ :header_params => header_params,
367
+ :query_params => query_params,
368
+ :form_params => form_params,
369
+ :body => post_body,
370
+ :auth_names => auth_names,
371
+ :return_type => return_type
372
+ )
373
+
374
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
375
+ if @api_client.config.debugging
376
+ @api_client.config.logger.debug "API called: RemotesPythonApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
377
+ end
378
+ return data, status_code, headers
379
+ end
380
+
381
+ # Update a python remote
382
+ # Trigger an asynchronous update task
383
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
384
+ # @param data [PythonPythonRemote]
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [AsyncOperationResponse]
387
+ def update(python_remote_href, data, opts = {})
388
+ data, _status_code, _headers = update_with_http_info(python_remote_href, data, opts)
389
+ data
390
+ end
391
+
392
+ # Update a python remote
393
+ # Trigger an asynchronous update task
394
+ # @param python_remote_href [String] URI of Python Remote. e.g.: /pulp/api/v3/remotes/python/python/1/
395
+ # @param data [PythonPythonRemote]
396
+ # @param [Hash] opts the optional parameters
397
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
398
+ def update_with_http_info(python_remote_href, data, opts = {})
399
+ if @api_client.config.debugging
400
+ @api_client.config.logger.debug 'Calling API: RemotesPythonApi.update ...'
401
+ end
402
+ # verify the required parameter 'python_remote_href' is set
403
+ if @api_client.config.client_side_validation && python_remote_href.nil?
404
+ fail ArgumentError, "Missing the required parameter 'python_remote_href' when calling RemotesPythonApi.update"
405
+ end
406
+ # verify the required parameter 'data' is set
407
+ if @api_client.config.client_side_validation && data.nil?
408
+ fail ArgumentError, "Missing the required parameter 'data' when calling RemotesPythonApi.update"
409
+ end
410
+ # resource path
411
+ local_var_path = '{python_remote_href}'.sub('{' + 'python_remote_href' + '}', CGI.escape(python_remote_href.to_s).gsub('%2F', '/'))
412
+
413
+ # query parameters
414
+ query_params = opts[:query_params] || {}
415
+
416
+ # header parameters
417
+ header_params = opts[:header_params] || {}
418
+ # HTTP header 'Accept' (if needed)
419
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
420
+ # HTTP header 'Content-Type'
421
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
422
+
423
+ # form parameters
424
+ form_params = opts[:form_params] || {}
425
+
426
+ # http body (model)
427
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
428
+
429
+ # return_type
430
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
431
+
432
+ # auth_names
433
+ auth_names = opts[:auth_names] || ['Basic']
434
+
435
+ new_options = opts.merge(
436
+ :header_params => header_params,
437
+ :query_params => query_params,
438
+ :form_params => form_params,
439
+ :body => post_body,
440
+ :auth_names => auth_names,
441
+ :return_type => return_type
442
+ )
443
+
444
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
445
+ if @api_client.config.debugging
446
+ @api_client.config.logger.debug "API called: RemotesPythonApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
447
+ end
448
+ return data, status_code, headers
449
+ end
450
+ end
451
+ end