pulp_rpm_client 3.0.0b4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +134 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/ContentAdvisoriesApi.md +196 -0
  8. data/docs/ContentPackagesApi.md +208 -0
  9. data/docs/DistributionsRpmApi.md +352 -0
  10. data/docs/InlineResponse200.md +23 -0
  11. data/docs/InlineResponse2001.md +23 -0
  12. data/docs/InlineResponse2002.md +23 -0
  13. data/docs/InlineResponse2003.md +23 -0
  14. data/docs/InlineResponse2004.md +23 -0
  15. data/docs/Package.md +95 -0
  16. data/docs/PublicationsRpmApi.md +229 -0
  17. data/docs/RemotesRpmApi.md +412 -0
  18. data/docs/RepositorySyncURL.md +19 -0
  19. data/docs/RpmCopyApi.md +70 -0
  20. data/docs/RpmDistribution.md +29 -0
  21. data/docs/RpmPublication.md +27 -0
  22. data/docs/RpmRemote.md +45 -0
  23. data/docs/RpmUploadApi.md +66 -0
  24. data/docs/UpdateRecord.md +55 -0
  25. data/git_push.sh +55 -0
  26. data/lib/pulp_rpm_client/api/content_advisories_api.rb +243 -0
  27. data/lib/pulp_rpm_client/api/content_packages_api.rb +261 -0
  28. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +430 -0
  29. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +273 -0
  30. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +506 -0
  31. data/lib/pulp_rpm_client/api/rpm_copy_api.rb +96 -0
  32. data/lib/pulp_rpm_client/api/rpm_upload_api.rb +90 -0
  33. data/lib/pulp_rpm_client/api_client.rb +387 -0
  34. data/lib/pulp_rpm_client/api_error.rb +57 -0
  35. data/lib/pulp_rpm_client/configuration.rb +251 -0
  36. data/lib/pulp_rpm_client/models/async_operation_response.rb +202 -0
  37. data/lib/pulp_rpm_client/models/inline_response200.rb +235 -0
  38. data/lib/pulp_rpm_client/models/inline_response2001.rb +235 -0
  39. data/lib/pulp_rpm_client/models/inline_response2002.rb +235 -0
  40. data/lib/pulp_rpm_client/models/inline_response2003.rb +235 -0
  41. data/lib/pulp_rpm_client/models/inline_response2004.rb +235 -0
  42. data/lib/pulp_rpm_client/models/package.rb +983 -0
  43. data/lib/pulp_rpm_client/models/repository_sync_url.rb +214 -0
  44. data/lib/pulp_rpm_client/models/rpm_distribution.rb +337 -0
  45. data/lib/pulp_rpm_client/models/rpm_publication.rb +258 -0
  46. data/lib/pulp_rpm_client/models/rpm_remote.rb +539 -0
  47. data/lib/pulp_rpm_client/models/update_record.rb +764 -0
  48. data/lib/pulp_rpm_client/version.rb +15 -0
  49. data/lib/pulp_rpm_client.rb +58 -0
  50. data/pulp_rpm_client.gemspec +45 -0
  51. data/spec/api/content_advisories_api_spec.rb +83 -0
  52. data/spec/api/content_packages_api_spec.rb +89 -0
  53. data/spec/api/distributions_rpm_api_spec.rb +116 -0
  54. data/spec/api/publications_rpm_api_spec.rb +85 -0
  55. data/spec/api/remotes_rpm_api_spec.rb +131 -0
  56. data/spec/api/rpm_copy_api_spec.rb +50 -0
  57. data/spec/api/rpm_upload_api_spec.rb +48 -0
  58. data/spec/api_client_spec.rb +226 -0
  59. data/spec/configuration_spec.rb +42 -0
  60. data/spec/models/async_operation_response_spec.rb +41 -0
  61. data/spec/models/inline_response2001_spec.rb +59 -0
  62. data/spec/models/inline_response2002_spec.rb +59 -0
  63. data/spec/models/inline_response2003_spec.rb +59 -0
  64. data/spec/models/inline_response2004_spec.rb +59 -0
  65. data/spec/models/inline_response200_spec.rb +59 -0
  66. data/spec/models/package_spec.rb +275 -0
  67. data/spec/models/repository_sync_url_spec.rb +47 -0
  68. data/spec/models/rpm_distribution_spec.rb +77 -0
  69. data/spec/models/rpm_publication_spec.rb +71 -0
  70. data/spec/models/rpm_remote_spec.rb +129 -0
  71. data/spec/models/update_record_spec.rb +155 -0
  72. data/spec/spec_helper.rb +111 -0
  73. metadata +317 -0
@@ -0,0 +1,261 @@
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.0.0
10
+
11
+ =end
12
+
13
+ require 'uri'
14
+
15
+ module PulpRpmClient
16
+ class ContentPackagesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a package
23
+ # Create a new Package from a request.
24
+ # @param data [Package]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [Package]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a package
33
+ # Create a new Package from a request.
34
+ # @param data [Package]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(Package, Integer, Hash)>] Package 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: ContentPackagesApi.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 ContentPackagesApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/rpm/packages/'
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] || 'Package'
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: ContentPackagesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List packages
87
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :name Filter results where name matches value
90
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
91
+ # @option opts [String] :epoch Filter results where epoch matches value
92
+ # @option opts [String] :epoch__in Filter results where epoch is in a comma-separated list of values
93
+ # @option opts [String] :version Filter results where version matches value
94
+ # @option opts [String] :version__in Filter results where version is in a comma-separated list of values
95
+ # @option opts [String] :release Filter results where release matches value
96
+ # @option opts [String] :release__in Filter results where release is in a comma-separated list of values
97
+ # @option opts [String] :arch Filter results where arch matches value
98
+ # @option opts [String] :arch__in Filter results where arch is in a comma-separated list of values
99
+ # @option opts [String] :pkg_id Filter results where pkgId matches value
100
+ # @option opts [String] :pkg_id__in Filter results where pkgId is in a comma-separated list of values
101
+ # @option opts [String] :checksum_type Filter results where checksum_type matches value
102
+ # @option opts [String] :checksum_type__in Filter results where checksum_type is in a comma-separated list of values
103
+ # @option opts [String] :repository_version Repository Version referenced by HREF
104
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
105
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
106
+ # @option opts [Integer] :page A page number within the paginated result set.
107
+ # @option opts [Integer] :page_size Number of results to return per page.
108
+ # @return [InlineResponse2001]
109
+ def list(opts = {})
110
+ data, _status_code, _headers = list_with_http_info(opts)
111
+ data
112
+ end
113
+
114
+ # List packages
115
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
116
+ # @param [Hash] opts the optional parameters
117
+ # @option opts [String] :name Filter results where name matches value
118
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
119
+ # @option opts [String] :epoch Filter results where epoch matches value
120
+ # @option opts [String] :epoch__in Filter results where epoch is in a comma-separated list of values
121
+ # @option opts [String] :version Filter results where version matches value
122
+ # @option opts [String] :version__in Filter results where version is in a comma-separated list of values
123
+ # @option opts [String] :release Filter results where release matches value
124
+ # @option opts [String] :release__in Filter results where release is in a comma-separated list of values
125
+ # @option opts [String] :arch Filter results where arch matches value
126
+ # @option opts [String] :arch__in Filter results where arch is in a comma-separated list of values
127
+ # @option opts [String] :pkg_id Filter results where pkgId matches value
128
+ # @option opts [String] :pkg_id__in Filter results where pkgId is in a comma-separated list of values
129
+ # @option opts [String] :checksum_type Filter results where checksum_type matches value
130
+ # @option opts [String] :checksum_type__in Filter results where checksum_type is in a comma-separated list of values
131
+ # @option opts [String] :repository_version Repository Version referenced by HREF
132
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
133
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
134
+ # @option opts [Integer] :page A page number within the paginated result set.
135
+ # @option opts [Integer] :page_size Number of results to return per page.
136
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
137
+ def list_with_http_info(opts = {})
138
+ if @api_client.config.debugging
139
+ @api_client.config.logger.debug 'Calling API: ContentPackagesApi.list ...'
140
+ end
141
+ # resource path
142
+ local_var_path = '/pulp/api/v3/content/rpm/packages/'
143
+
144
+ # query parameters
145
+ query_params = opts[:query_params] || {}
146
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
147
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
148
+ query_params[:'epoch'] = opts[:'epoch'] if !opts[:'epoch'].nil?
149
+ query_params[:'epoch__in'] = opts[:'epoch__in'] if !opts[:'epoch__in'].nil?
150
+ query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
151
+ query_params[:'version__in'] = opts[:'version__in'] if !opts[:'version__in'].nil?
152
+ query_params[:'release'] = opts[:'release'] if !opts[:'release'].nil?
153
+ query_params[:'release__in'] = opts[:'release__in'] if !opts[:'release__in'].nil?
154
+ query_params[:'arch'] = opts[:'arch'] if !opts[:'arch'].nil?
155
+ query_params[:'arch__in'] = opts[:'arch__in'] if !opts[:'arch__in'].nil?
156
+ query_params[:'pkgId'] = opts[:'pkg_id'] if !opts[:'pkg_id'].nil?
157
+ query_params[:'pkgId__in'] = opts[:'pkg_id__in'] if !opts[:'pkg_id__in'].nil?
158
+ query_params[:'checksum_type'] = opts[:'checksum_type'] if !opts[:'checksum_type'].nil?
159
+ query_params[:'checksum_type__in'] = opts[:'checksum_type__in'] if !opts[:'checksum_type__in'].nil?
160
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
161
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
162
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
163
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
164
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
165
+
166
+ # header parameters
167
+ header_params = opts[:header_params] || {}
168
+ # HTTP header 'Accept' (if needed)
169
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
170
+
171
+ # form parameters
172
+ form_params = opts[:form_params] || {}
173
+
174
+ # http body (model)
175
+ post_body = opts[:body]
176
+
177
+ # return_type
178
+ return_type = opts[:return_type] || 'InlineResponse2001'
179
+
180
+ # auth_names
181
+ auth_names = opts[:auth_names] || ['Basic']
182
+
183
+ new_options = opts.merge(
184
+ :header_params => header_params,
185
+ :query_params => query_params,
186
+ :form_params => form_params,
187
+ :body => post_body,
188
+ :auth_names => auth_names,
189
+ :return_type => return_type
190
+ )
191
+
192
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "API called: ContentPackagesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
195
+ end
196
+ return data, status_code, headers
197
+ end
198
+
199
+ # Inspect a package
200
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
201
+ # @param package_href [String] URI of Package. e.g.: /pulp/api/v3/content/rpm/packages/1/
202
+ # @param [Hash] opts the optional parameters
203
+ # @return [Package]
204
+ def read(package_href, opts = {})
205
+ data, _status_code, _headers = read_with_http_info(package_href, opts)
206
+ data
207
+ end
208
+
209
+ # Inspect a package
210
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/packages/ Also specify queryset and serializer for Package.
211
+ # @param package_href [String] URI of Package. e.g.: /pulp/api/v3/content/rpm/packages/1/
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [Array<(Package, Integer, Hash)>] Package data, response status code and response headers
214
+ def read_with_http_info(package_href, opts = {})
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug 'Calling API: ContentPackagesApi.read ...'
217
+ end
218
+ # verify the required parameter 'package_href' is set
219
+ if @api_client.config.client_side_validation && package_href.nil?
220
+ fail ArgumentError, "Missing the required parameter 'package_href' when calling ContentPackagesApi.read"
221
+ end
222
+ # resource path
223
+ local_var_path = '{package_href}'.sub('{' + 'package_href' + '}', package_href.to_s)
224
+
225
+ # query parameters
226
+ query_params = opts[:query_params] || {}
227
+
228
+ # header parameters
229
+ header_params = opts[:header_params] || {}
230
+ # HTTP header 'Accept' (if needed)
231
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
232
+
233
+ # form parameters
234
+ form_params = opts[:form_params] || {}
235
+
236
+ # http body (model)
237
+ post_body = opts[:body]
238
+
239
+ # return_type
240
+ return_type = opts[:return_type] || 'Package'
241
+
242
+ # auth_names
243
+ auth_names = opts[:auth_names] || ['Basic']
244
+
245
+ new_options = opts.merge(
246
+ :header_params => header_params,
247
+ :query_params => query_params,
248
+ :form_params => form_params,
249
+ :body => post_body,
250
+ :auth_names => auth_names,
251
+ :return_type => return_type
252
+ )
253
+
254
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug "API called: ContentPackagesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
257
+ end
258
+ return data, status_code, headers
259
+ end
260
+ end
261
+ end