pulp_rpm_client 3.17.22 → 3.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/docs/AcsRpmApi.md +11 -13
  4. data/docs/ContentAdvisoriesApi.md +8 -8
  5. data/docs/ContentDistributionTreesApi.md +8 -8
  6. data/docs/ContentModulemdDefaultsApi.md +13 -29
  7. data/docs/ContentModulemdObsoletesApi.md +192 -0
  8. data/docs/ContentModulemdsApi.md +13 -41
  9. data/docs/ContentPackagecategoriesApi.md +8 -8
  10. data/docs/ContentPackageenvironmentsApi.md +8 -8
  11. data/docs/ContentPackagegroupsApi.md +8 -8
  12. data/docs/ContentPackagelangpacksApi.md +8 -8
  13. data/docs/ContentPackagesApi.md +12 -12
  14. data/docs/ContentRepoMetadataFilesApi.md +8 -8
  15. data/docs/DistributionsRpmApi.md +8 -8
  16. data/docs/PaginatedrpmModulemdObsoleteResponseList.md +23 -0
  17. data/docs/PatchedrpmRpmRepository.md +1 -1
  18. data/docs/PublicationsRpmApi.md +8 -8
  19. data/docs/RemotesRpmApi.md +8 -8
  20. data/docs/RemotesUlnApi.md +8 -8
  21. data/docs/RepositoriesRpmApi.md +8 -8
  22. data/docs/RepositoriesRpmVersionsApi.md +8 -8
  23. data/docs/RpmModulemd.md +8 -12
  24. data/docs/RpmModulemdDefaults.md +4 -12
  25. data/docs/RpmModulemdDefaultsResponse.md +0 -14
  26. data/docs/RpmModulemdObsolete.md +35 -0
  27. data/docs/RpmModulemdObsoleteResponse.md +37 -0
  28. data/docs/RpmModulemdResponse.md +5 -15
  29. data/docs/RpmPackage.md +1 -1
  30. data/docs/RpmRpmPublication.md +1 -1
  31. data/docs/RpmRpmPublicationResponse.md +1 -1
  32. data/docs/RpmRpmRepository.md +1 -1
  33. data/docs/RpmRpmRepositoryResponse.md +1 -1
  34. data/lib/pulp_rpm_client/api/acs_rpm_api.rb +16 -24
  35. data/lib/pulp_rpm_client/api/content_advisories_api.rb +12 -12
  36. data/lib/pulp_rpm_client/api/content_distribution_trees_api.rb +12 -12
  37. data/lib/pulp_rpm_client/api/content_modulemd_defaults_api.rb +23 -69
  38. data/lib/pulp_rpm_client/api/content_modulemd_obsoletes_api.rb +238 -0
  39. data/lib/pulp_rpm_client/api/content_modulemds_api.rb +23 -107
  40. data/lib/pulp_rpm_client/api/content_packagecategories_api.rb +12 -12
  41. data/lib/pulp_rpm_client/api/content_packageenvironments_api.rb +12 -12
  42. data/lib/pulp_rpm_client/api/content_packagegroups_api.rb +12 -12
  43. data/lib/pulp_rpm_client/api/content_packagelangpacks_api.rb +12 -12
  44. data/lib/pulp_rpm_client/api/content_packages_api.rb +20 -24
  45. data/lib/pulp_rpm_client/api/content_repo_metadata_files_api.rb +12 -12
  46. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +12 -12
  47. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +12 -12
  48. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +12 -12
  49. data/lib/pulp_rpm_client/api/remotes_uln_api.rb +12 -12
  50. data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +12 -12
  51. data/lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb +12 -12
  52. data/lib/pulp_rpm_client/models/paginatedrpm_modulemd_obsolete_response_list.rb +237 -0
  53. data/lib/pulp_rpm_client/models/patchedrpm_rpm_repository.rb +1 -1
  54. data/lib/pulp_rpm_client/models/rpm_modulemd.rb +83 -78
  55. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults.rb +38 -78
  56. data/lib/pulp_rpm_client/models/rpm_modulemd_defaults_response.rb +1 -71
  57. data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete.rb +464 -0
  58. data/lib/pulp_rpm_client/models/rpm_modulemd_obsolete_response.rb +332 -0
  59. data/lib/pulp_rpm_client/models/rpm_modulemd_response.rb +30 -74
  60. data/lib/pulp_rpm_client/models/rpm_package.rb +3 -12
  61. data/lib/pulp_rpm_client/models/rpm_rpm_publication.rb +1 -1
  62. data/lib/pulp_rpm_client/models/rpm_rpm_publication_response.rb +1 -1
  63. data/lib/pulp_rpm_client/models/rpm_rpm_repository.rb +1 -1
  64. data/lib/pulp_rpm_client/models/rpm_rpm_repository_response.rb +1 -1
  65. data/lib/pulp_rpm_client/version.rb +1 -1
  66. data/lib/pulp_rpm_client.rb +4 -0
  67. data/spec/api/acs_rpm_api_spec.rb +4 -5
  68. data/spec/api/content_advisories_api_spec.rb +4 -4
  69. data/spec/api/content_distribution_trees_api_spec.rb +4 -4
  70. data/spec/api/content_modulemd_defaults_api_spec.rb +5 -12
  71. data/spec/api/content_modulemd_obsoletes_api_spec.rb +80 -0
  72. data/spec/api/content_modulemds_api_spec.rb +5 -18
  73. data/spec/api/content_packagecategories_api_spec.rb +4 -4
  74. data/spec/api/content_packageenvironments_api_spec.rb +4 -4
  75. data/spec/api/content_packagegroups_api_spec.rb +4 -4
  76. data/spec/api/content_packagelangpacks_api_spec.rb +4 -4
  77. data/spec/api/content_packages_api_spec.rb +5 -5
  78. data/spec/api/content_repo_metadata_files_api_spec.rb +4 -4
  79. data/spec/api/distributions_rpm_api_spec.rb +4 -4
  80. data/spec/api/publications_rpm_api_spec.rb +4 -4
  81. data/spec/api/remotes_rpm_api_spec.rb +4 -4
  82. data/spec/api/remotes_uln_api_spec.rb +4 -4
  83. data/spec/api/repositories_rpm_api_spec.rb +4 -4
  84. data/spec/api/repositories_rpm_versions_api_spec.rb +4 -4
  85. data/spec/models/paginatedrpm_modulemd_obsolete_response_list_spec.rb +59 -0
  86. data/spec/models/rpm_modulemd_defaults_response_spec.rb +0 -42
  87. data/spec/models/rpm_modulemd_defaults_spec.rb +4 -28
  88. data/spec/models/rpm_modulemd_obsolete_response_spec.rb +101 -0
  89. data/spec/models/rpm_modulemd_obsolete_spec.rb +95 -0
  90. data/spec/models/rpm_modulemd_response_spec.rb +11 -41
  91. data/spec/models/rpm_modulemd_spec.rb +12 -24
  92. metadata +85 -69
@@ -21,64 +21,26 @@ module PulpRpmClient
21
21
  end
22
22
  # Create a modulemd defaults
23
23
  # Trigger an asynchronous task to create content,optionally create new repository version.
24
- # @param relative_path [String] Path where the artifact is located relative to distributions base_path
25
- # @param _module [String] Modulemd name.
26
- # @param stream [String] Modulemd default stream.
27
- # @param profiles [Object] Default profiles for modulemd streams.
24
+ # @param rpm_modulemd_defaults [RpmModulemdDefaults]
28
25
  # @param [Hash] opts the optional parameters
29
- # @option opts [String] :artifact Artifact file representing the physical content
30
- # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
31
- # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
32
- # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
33
26
  # @return [AsyncOperationResponse]
34
- def create(relative_path, _module, stream, profiles, opts = {})
35
- data, _status_code, _headers = create_with_http_info(relative_path, _module, stream, profiles, opts)
27
+ def create(rpm_modulemd_defaults, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(rpm_modulemd_defaults, opts)
36
29
  data
37
30
  end
38
31
 
39
32
  # Create a modulemd defaults
40
33
  # Trigger an asynchronous task to create content,optionally create new repository version.
41
- # @param relative_path [String] Path where the artifact is located relative to distributions base_path
42
- # @param _module [String] Modulemd name.
43
- # @param stream [String] Modulemd default stream.
44
- # @param profiles [Object] Default profiles for modulemd streams.
34
+ # @param rpm_modulemd_defaults [RpmModulemdDefaults]
45
35
  # @param [Hash] opts the optional parameters
46
- # @option opts [String] :artifact Artifact file representing the physical content
47
- # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
48
- # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
49
- # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
50
36
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
51
- def create_with_http_info(relative_path, _module, stream, profiles, opts = {})
37
+ def create_with_http_info(rpm_modulemd_defaults, opts = {})
52
38
  if @api_client.config.debugging
53
39
  @api_client.config.logger.debug 'Calling API: ContentModulemdDefaultsApi.create ...'
54
40
  end
55
- # verify the required parameter 'relative_path' is set
56
- if @api_client.config.client_side_validation && relative_path.nil?
57
- fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentModulemdDefaultsApi.create"
58
- end
59
- if @api_client.config.client_side_validation && relative_path.to_s.length < 1
60
- fail ArgumentError, 'invalid value for "relative_path" when calling ContentModulemdDefaultsApi.create, the character length must be great than or equal to 1.'
61
- end
62
-
63
- # verify the required parameter '_module' is set
64
- if @api_client.config.client_side_validation && _module.nil?
65
- fail ArgumentError, "Missing the required parameter '_module' when calling ContentModulemdDefaultsApi.create"
66
- end
67
- if @api_client.config.client_side_validation && _module.to_s.length < 1
68
- fail ArgumentError, 'invalid value for "_module" when calling ContentModulemdDefaultsApi.create, the character length must be great than or equal to 1.'
69
- end
70
-
71
- # verify the required parameter 'stream' is set
72
- if @api_client.config.client_side_validation && stream.nil?
73
- fail ArgumentError, "Missing the required parameter 'stream' when calling ContentModulemdDefaultsApi.create"
74
- end
75
- if @api_client.config.client_side_validation && stream.to_s.length < 1
76
- fail ArgumentError, 'invalid value for "stream" when calling ContentModulemdDefaultsApi.create, the character length must be great than or equal to 1.'
77
- end
78
-
79
- # verify the required parameter 'profiles' is set
80
- if @api_client.config.client_side_validation && profiles.nil?
81
- fail ArgumentError, "Missing the required parameter 'profiles' when calling ContentModulemdDefaultsApi.create"
41
+ # verify the required parameter 'rpm_modulemd_defaults' is set
42
+ if @api_client.config.client_side_validation && rpm_modulemd_defaults.nil?
43
+ fail ArgumentError, "Missing the required parameter 'rpm_modulemd_defaults' when calling ContentModulemdDefaultsApi.create"
82
44
  end
83
45
  # resource path
84
46
  local_var_path = '/pulp/api/v3/content/rpm/modulemd_defaults/'
@@ -91,21 +53,13 @@ module PulpRpmClient
91
53
  # HTTP header 'Accept' (if needed)
92
54
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
93
55
  # HTTP header 'Content-Type'
94
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
95
57
 
96
58
  # form parameters
97
59
  form_params = opts[:form_params] || {}
98
- form_params['relative_path'] = relative_path
99
- form_params['module'] = _module
100
- form_params['stream'] = stream
101
- form_params['profiles'] = profiles
102
- form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
103
- form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
104
- form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
105
- form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
106
60
 
107
61
  # http body (model)
108
- post_body = opts[:body]
62
+ post_body = opts[:body] || @api_client.object_to_http_body(rpm_modulemd_defaults)
109
63
 
110
64
  # return_type
111
65
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -143,8 +97,8 @@ module PulpRpmClient
143
97
  # @option opts [String] :sha256
144
98
  # @option opts [String] :stream Filter results where stream matches value
145
99
  # @option opts [Array<String>] :stream__in Filter results where stream is in a comma-separated list of values
146
- # @option opts [Array<String>] :fields A list of fields to include in the response.
147
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
100
+ # @option opts [String] :fields A list of fields to include in the response.
101
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
148
102
  # @return [PaginatedrpmModulemdDefaultsResponseList]
149
103
  def list(opts = {})
150
104
  data, _status_code, _headers = list_with_http_info(opts)
@@ -165,14 +119,14 @@ module PulpRpmClient
165
119
  # @option opts [String] :sha256
166
120
  # @option opts [String] :stream Filter results where stream matches value
167
121
  # @option opts [Array<String>] :stream__in Filter results where stream is in a comma-separated list of values
168
- # @option opts [Array<String>] :fields A list of fields to include in the response.
169
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
122
+ # @option opts [String] :fields A list of fields to include in the response.
123
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
170
124
  # @return [Array<(PaginatedrpmModulemdDefaultsResponseList, Integer, Hash)>] PaginatedrpmModulemdDefaultsResponseList data, response status code and response headers
171
125
  def list_with_http_info(opts = {})
172
126
  if @api_client.config.debugging
173
127
  @api_client.config.logger.debug 'Calling API: ContentModulemdDefaultsApi.list ...'
174
128
  end
175
- allowable_values = ["-_artifacts", "-content_ptr", "-contentartifact", "-digest", "-group_roles", "-module", "-pk", "-profiles", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repositories", "-stream", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version_memberships", "_artifacts", "content_ptr", "contentartifact", "digest", "group_roles", "module", "pk", "profiles", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repositories", "stream", "timestamp_of_interest", "upstream_id", "user_roles", "version_memberships"]
129
+ allowable_values = ["-_artifacts", "-content_ptr", "-contentartifact", "-digest", "-group_roles", "-module", "-pk", "-profiles", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repositories", "-snippet", "-stream", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version_memberships", "_artifacts", "content_ptr", "contentartifact", "digest", "group_roles", "module", "pk", "profiles", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repositories", "snippet", "stream", "timestamp_of_interest", "upstream_id", "user_roles", "version_memberships"]
176
130
  if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
177
131
  fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
178
132
  end
@@ -192,8 +146,8 @@ module PulpRpmClient
192
146
  query_params[:'sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
193
147
  query_params[:'stream'] = opts[:'stream'] if !opts[:'stream'].nil?
194
148
  query_params[:'stream__in'] = @api_client.build_collection_param(opts[:'stream__in'], :csv) if !opts[:'stream__in'].nil?
195
- query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
196
- query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
149
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
150
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
197
151
 
198
152
  # header parameters
199
153
  header_params = opts[:header_params] || {}
@@ -232,8 +186,8 @@ module PulpRpmClient
232
186
  # ViewSet for Modulemd.
233
187
  # @param rpm_modulemd_defaults_href [String]
234
188
  # @param [Hash] opts the optional parameters
235
- # @option opts [Array<String>] :fields A list of fields to include in the response.
236
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
189
+ # @option opts [String] :fields A list of fields to include in the response.
190
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
237
191
  # @return [RpmModulemdDefaultsResponse]
238
192
  def read(rpm_modulemd_defaults_href, opts = {})
239
193
  data, _status_code, _headers = read_with_http_info(rpm_modulemd_defaults_href, opts)
@@ -244,8 +198,8 @@ module PulpRpmClient
244
198
  # ViewSet for Modulemd.
245
199
  # @param rpm_modulemd_defaults_href [String]
246
200
  # @param [Hash] opts the optional parameters
247
- # @option opts [Array<String>] :fields A list of fields to include in the response.
248
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
201
+ # @option opts [String] :fields A list of fields to include in the response.
202
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
249
203
  # @return [Array<(RpmModulemdDefaultsResponse, Integer, Hash)>] RpmModulemdDefaultsResponse data, response status code and response headers
250
204
  def read_with_http_info(rpm_modulemd_defaults_href, opts = {})
251
205
  if @api_client.config.debugging
@@ -260,8 +214,8 @@ module PulpRpmClient
260
214
 
261
215
  # query parameters
262
216
  query_params = opts[:query_params] || {}
263
- query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
264
- query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
217
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
218
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
265
219
 
266
220
  # header parameters
267
221
  header_params = opts[:header_params] || {}
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpRpmClient
16
+ class ContentModulemdObsoletesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a modulemd obsolete
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
+ # @param rpm_modulemd_obsolete [RpmModulemdObsolete]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AsyncOperationResponse]
27
+ def create(rpm_modulemd_obsolete, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(rpm_modulemd_obsolete, opts)
29
+ data
30
+ end
31
+
32
+ # Create a modulemd obsolete
33
+ # Trigger an asynchronous task to create content,optionally create new repository version.
34
+ # @param rpm_modulemd_obsolete [RpmModulemdObsolete]
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(rpm_modulemd_obsolete, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ContentModulemdObsoletesApi.create ...'
40
+ end
41
+ # verify the required parameter 'rpm_modulemd_obsolete' is set
42
+ if @api_client.config.client_side_validation && rpm_modulemd_obsolete.nil?
43
+ fail ArgumentError, "Missing the required parameter 'rpm_modulemd_obsolete' when calling ContentModulemdObsoletesApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/rpm/modulemd_obsoletes/'
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(rpm_modulemd_obsolete)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
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: ContentModulemdObsoletesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List modulemd obsoletes
87
+ # ViewSet for Modulemd.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [Integer] :limit Number of results to return per page.
90
+ # @option opts [Integer] :offset The initial index from which to return the results.
91
+ # @option opts [Array<String>] :ordering Ordering
92
+ # @option opts [String] :repository_version Repository Version referenced by HREF
93
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
94
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
95
+ # @option opts [String] :fields A list of fields to include in the response.
96
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
97
+ # @return [PaginatedrpmModulemdObsoleteResponseList]
98
+ def list(opts = {})
99
+ data, _status_code, _headers = list_with_http_info(opts)
100
+ data
101
+ end
102
+
103
+ # List modulemd obsoletes
104
+ # ViewSet for Modulemd.
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Integer] :limit Number of results to return per page.
107
+ # @option opts [Integer] :offset The initial index from which to return the results.
108
+ # @option opts [Array<String>] :ordering Ordering
109
+ # @option opts [String] :repository_version Repository Version referenced by HREF
110
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
111
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
112
+ # @option opts [String] :fields A list of fields to include in the response.
113
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
114
+ # @return [Array<(PaginatedrpmModulemdObsoleteResponseList, Integer, Hash)>] PaginatedrpmModulemdObsoleteResponseList data, response status code and response headers
115
+ def list_with_http_info(opts = {})
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: ContentModulemdObsoletesApi.list ...'
118
+ end
119
+ allowable_values = ["-pk", "pk"]
120
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
121
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
122
+ end
123
+ # resource path
124
+ local_var_path = '/pulp/api/v3/content/rpm/modulemd_obsoletes/'
125
+
126
+ # query parameters
127
+ query_params = opts[:query_params] || {}
128
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
129
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
130
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
131
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
132
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
133
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
134
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
135
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
136
+
137
+ # header parameters
138
+ header_params = opts[:header_params] || {}
139
+ # HTTP header 'Accept' (if needed)
140
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
141
+
142
+ # form parameters
143
+ form_params = opts[:form_params] || {}
144
+
145
+ # http body (model)
146
+ post_body = opts[:body]
147
+
148
+ # return_type
149
+ return_type = opts[:return_type] || 'PaginatedrpmModulemdObsoleteResponseList'
150
+
151
+ # auth_names
152
+ auth_names = opts[:auth_names] || ['basicAuth']
153
+
154
+ new_options = opts.merge(
155
+ :header_params => header_params,
156
+ :query_params => query_params,
157
+ :form_params => form_params,
158
+ :body => post_body,
159
+ :auth_names => auth_names,
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: ContentModulemdObsoletesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Inspect a modulemd obsolete
171
+ # ViewSet for Modulemd.
172
+ # @param rpm_modulemd_obsolete_href [String]
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [String] :fields A list of fields to include in the response.
175
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
176
+ # @return [RpmModulemdObsoleteResponse]
177
+ def read(rpm_modulemd_obsolete_href, opts = {})
178
+ data, _status_code, _headers = read_with_http_info(rpm_modulemd_obsolete_href, opts)
179
+ data
180
+ end
181
+
182
+ # Inspect a modulemd obsolete
183
+ # ViewSet for Modulemd.
184
+ # @param rpm_modulemd_obsolete_href [String]
185
+ # @param [Hash] opts the optional parameters
186
+ # @option opts [String] :fields A list of fields to include in the response.
187
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
188
+ # @return [Array<(RpmModulemdObsoleteResponse, Integer, Hash)>] RpmModulemdObsoleteResponse data, response status code and response headers
189
+ def read_with_http_info(rpm_modulemd_obsolete_href, opts = {})
190
+ if @api_client.config.debugging
191
+ @api_client.config.logger.debug 'Calling API: ContentModulemdObsoletesApi.read ...'
192
+ end
193
+ # verify the required parameter 'rpm_modulemd_obsolete_href' is set
194
+ if @api_client.config.client_side_validation && rpm_modulemd_obsolete_href.nil?
195
+ fail ArgumentError, "Missing the required parameter 'rpm_modulemd_obsolete_href' when calling ContentModulemdObsoletesApi.read"
196
+ end
197
+ # resource path
198
+ local_var_path = '{rpm_modulemd_obsolete_href}'.sub('{' + 'rpm_modulemd_obsolete_href' + '}', CGI.escape(rpm_modulemd_obsolete_href.to_s).gsub('%2F', '/'))
199
+
200
+ # query parameters
201
+ query_params = opts[:query_params] || {}
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] || 'RpmModulemdObsoleteResponse'
218
+
219
+ # auth_names
220
+ auth_names = opts[:auth_names] || ['basicAuth']
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: ContentModulemdObsoletesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+ end
238
+ end
@@ -21,97 +21,27 @@ module PulpRpmClient
21
21
  end
22
22
  # Create a modulemd
23
23
  # Trigger an asynchronous task to create content,optionally create new repository version.
24
- # @param relative_path [String] Path where the artifact is located relative to distributions base_path
25
- # @param name [String] Modulemd name.
26
- # @param stream [String] Stream name.
27
- # @param version [String] Modulemd version.
28
- # @param context [String] Modulemd context.
29
- # @param arch [String] Modulemd architecture.
30
- # @param artifacts [Object] Modulemd artifacts.
31
- # @param dependencies [Object] Modulemd dependencies.
24
+ # @param rpm_modulemd [RpmModulemd]
32
25
  # @param [Hash] opts the optional parameters
33
- # @option opts [String] :artifact Artifact file representing the physical content
34
- # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
35
- # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
36
- # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
37
- # @option opts [Boolean] :static_context Modulemd static-context flag.
38
- # @option opts [Array<String>] :packages Modulemd artifacts&#39; packages.
39
26
  # @return [AsyncOperationResponse]
40
- def create(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts = {})
41
- data, _status_code, _headers = create_with_http_info(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts)
27
+ def create(rpm_modulemd, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(rpm_modulemd, opts)
42
29
  data
43
30
  end
44
31
 
45
32
  # Create a modulemd
46
33
  # Trigger an asynchronous task to create content,optionally create new repository version.
47
- # @param relative_path [String] Path where the artifact is located relative to distributions base_path
48
- # @param name [String] Modulemd name.
49
- # @param stream [String] Stream name.
50
- # @param version [String] Modulemd version.
51
- # @param context [String] Modulemd context.
52
- # @param arch [String] Modulemd architecture.
53
- # @param artifacts [Object] Modulemd artifacts.
54
- # @param dependencies [Object] Modulemd dependencies.
34
+ # @param rpm_modulemd [RpmModulemd]
55
35
  # @param [Hash] opts the optional parameters
56
- # @option opts [String] :artifact Artifact file representing the physical content
57
- # @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
58
- # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
59
- # @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
60
- # @option opts [Boolean] :static_context Modulemd static-context flag.
61
- # @option opts [Array<String>] :packages Modulemd artifacts&#39; packages.
62
36
  # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
63
- def create_with_http_info(relative_path, name, stream, version, context, arch, artifacts, dependencies, opts = {})
37
+ def create_with_http_info(rpm_modulemd, opts = {})
64
38
  if @api_client.config.debugging
65
39
  @api_client.config.logger.debug 'Calling API: ContentModulemdsApi.create ...'
66
40
  end
67
- # verify the required parameter 'relative_path' is set
68
- if @api_client.config.client_side_validation && relative_path.nil?
69
- fail ArgumentError, "Missing the required parameter 'relative_path' when calling ContentModulemdsApi.create"
41
+ # verify the required parameter 'rpm_modulemd' is set
42
+ if @api_client.config.client_side_validation && rpm_modulemd.nil?
43
+ fail ArgumentError, "Missing the required parameter 'rpm_modulemd' when calling ContentModulemdsApi.create"
70
44
  end
71
- if @api_client.config.client_side_validation && relative_path.to_s.length < 1
72
- fail ArgumentError, 'invalid value for "relative_path" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
73
- end
74
-
75
- # verify the required parameter 'name' is set
76
- if @api_client.config.client_side_validation && name.nil?
77
- fail ArgumentError, "Missing the required parameter 'name' when calling ContentModulemdsApi.create"
78
- end
79
- if @api_client.config.client_side_validation && name.to_s.length < 1
80
- fail ArgumentError, 'invalid value for "name" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
81
- end
82
-
83
- # verify the required parameter 'stream' is set
84
- if @api_client.config.client_side_validation && stream.nil?
85
- fail ArgumentError, "Missing the required parameter 'stream' when calling ContentModulemdsApi.create"
86
- end
87
- if @api_client.config.client_side_validation && stream.to_s.length < 1
88
- fail ArgumentError, 'invalid value for "stream" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
89
- end
90
-
91
- # verify the required parameter 'version' is set
92
- if @api_client.config.client_side_validation && version.nil?
93
- fail ArgumentError, "Missing the required parameter 'version' when calling ContentModulemdsApi.create"
94
- end
95
- if @api_client.config.client_side_validation && version.to_s.length < 1
96
- fail ArgumentError, 'invalid value for "version" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
97
- end
98
-
99
- # verify the required parameter 'context' is set
100
- if @api_client.config.client_side_validation && context.nil?
101
- fail ArgumentError, "Missing the required parameter 'context' when calling ContentModulemdsApi.create"
102
- end
103
- if @api_client.config.client_side_validation && context.to_s.length < 1
104
- fail ArgumentError, 'invalid value for "context" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
105
- end
106
-
107
- # verify the required parameter 'arch' is set
108
- if @api_client.config.client_side_validation && arch.nil?
109
- fail ArgumentError, "Missing the required parameter 'arch' when calling ContentModulemdsApi.create"
110
- end
111
- if @api_client.config.client_side_validation && arch.to_s.length < 1
112
- fail ArgumentError, 'invalid value for "arch" when calling ContentModulemdsApi.create, the character length must be great than or equal to 1.'
113
- end
114
-
115
45
  # resource path
116
46
  local_var_path = '/pulp/api/v3/content/rpm/modulemds/'
117
47
 
@@ -123,27 +53,13 @@ module PulpRpmClient
123
53
  # HTTP header 'Accept' (if needed)
124
54
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
55
  # HTTP header 'Content-Type'
126
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
127
57
 
128
58
  # form parameters
129
59
  form_params = opts[:form_params] || {}
130
- form_params['relative_path'] = relative_path
131
- form_params['name'] = name
132
- form_params['stream'] = stream
133
- form_params['version'] = version
134
- form_params['context'] = context
135
- form_params['arch'] = arch
136
- form_params['artifacts'] = artifacts
137
- form_params['dependencies'] = dependencies
138
- form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
139
- form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
140
- form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
141
- form_params['upload'] = opts[:'upload'] if !opts[:'upload'].nil?
142
- form_params['static_context'] = opts[:'static_context'] if !opts[:'static_context'].nil?
143
- form_params['packages'] = @api_client.build_collection_param(opts[:'packages'], :csv) if !opts[:'packages'].nil?
144
60
 
145
61
  # http body (model)
146
- post_body = opts[:body]
62
+ post_body = opts[:body] || @api_client.object_to_http_body(rpm_modulemd)
147
63
 
148
64
  # return_type
149
65
  return_type = opts[:return_type] || 'AsyncOperationResponse'
@@ -181,8 +97,8 @@ module PulpRpmClient
181
97
  # @option opts [String] :sha256
182
98
  # @option opts [String] :stream Filter results where stream matches value
183
99
  # @option opts [Array<String>] :stream__in Filter results where stream is in a comma-separated list of values
184
- # @option opts [Array<String>] :fields A list of fields to include in the response.
185
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
100
+ # @option opts [String] :fields A list of fields to include in the response.
101
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
186
102
  # @return [PaginatedrpmModulemdResponseList]
187
103
  def list(opts = {})
188
104
  data, _status_code, _headers = list_with_http_info(opts)
@@ -203,14 +119,14 @@ module PulpRpmClient
203
119
  # @option opts [String] :sha256
204
120
  # @option opts [String] :stream Filter results where stream matches value
205
121
  # @option opts [Array<String>] :stream__in Filter results where stream is in a comma-separated list of values
206
- # @option opts [Array<String>] :fields A list of fields to include in the response.
207
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
122
+ # @option opts [String] :fields A list of fields to include in the response.
123
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
208
124
  # @return [Array<(PaginatedrpmModulemdResponseList, Integer, Hash)>] PaginatedrpmModulemdResponseList data, response status code and response headers
209
125
  def list_with_http_info(opts = {})
210
126
  if @api_client.config.debugging
211
127
  @api_client.config.logger.debug 'Calling API: ContentModulemdsApi.list ...'
212
128
  end
213
- allowable_values = ["-_artifacts", "-arch", "-artifacts", "-content_ptr", "-contentartifact", "-context", "-dependencies", "-group_roles", "-name", "-packages", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repositories", "-static_context", "-stream", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version", "-version_memberships", "_artifacts", "arch", "artifacts", "content_ptr", "contentartifact", "context", "dependencies", "group_roles", "name", "packages", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repositories", "static_context", "stream", "timestamp_of_interest", "upstream_id", "user_roles", "version", "version_memberships"]
129
+ allowable_values = ["-_artifacts", "-arch", "-artifacts", "-content_ptr", "-contentartifact", "-context", "-dependencies", "-description", "-group_roles", "-name", "-packages", "-pk", "-profiles", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-repositories", "-snippet", "-static_context", "-stream", "-timestamp_of_interest", "-upstream_id", "-user_roles", "-version", "-version_memberships", "_artifacts", "arch", "artifacts", "content_ptr", "contentartifact", "context", "dependencies", "description", "group_roles", "name", "packages", "pk", "profiles", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "repositories", "snippet", "static_context", "stream", "timestamp_of_interest", "upstream_id", "user_roles", "version", "version_memberships"]
214
130
  if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
215
131
  fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
216
132
  end
@@ -230,8 +146,8 @@ module PulpRpmClient
230
146
  query_params[:'sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
231
147
  query_params[:'stream'] = opts[:'stream'] if !opts[:'stream'].nil?
232
148
  query_params[:'stream__in'] = @api_client.build_collection_param(opts[:'stream__in'], :csv) if !opts[:'stream__in'].nil?
233
- query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
234
- query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
149
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
150
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
235
151
 
236
152
  # header parameters
237
153
  header_params = opts[:header_params] || {}
@@ -270,8 +186,8 @@ module PulpRpmClient
270
186
  # ViewSet for Modulemd.
271
187
  # @param rpm_modulemd_href [String]
272
188
  # @param [Hash] opts the optional parameters
273
- # @option opts [Array<String>] :fields A list of fields to include in the response.
274
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
189
+ # @option opts [String] :fields A list of fields to include in the response.
190
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
275
191
  # @return [RpmModulemdResponse]
276
192
  def read(rpm_modulemd_href, opts = {})
277
193
  data, _status_code, _headers = read_with_http_info(rpm_modulemd_href, opts)
@@ -282,8 +198,8 @@ module PulpRpmClient
282
198
  # ViewSet for Modulemd.
283
199
  # @param rpm_modulemd_href [String]
284
200
  # @param [Hash] opts the optional parameters
285
- # @option opts [Array<String>] :fields A list of fields to include in the response.
286
- # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
201
+ # @option opts [String] :fields A list of fields to include in the response.
202
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
287
203
  # @return [Array<(RpmModulemdResponse, Integer, Hash)>] RpmModulemdResponse data, response status code and response headers
288
204
  def read_with_http_info(rpm_modulemd_href, opts = {})
289
205
  if @api_client.config.debugging
@@ -298,8 +214,8 @@ module PulpRpmClient
298
214
 
299
215
  # query parameters
300
216
  query_params = opts[:query_params] || {}
301
- query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
302
- query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
217
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
218
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
303
219
 
304
220
  # header parameters
305
221
  header_params = opts[:header_params] || {}