pulp_cookbook_client 0.1.0b9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +162 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentCookbooksApi.md +208 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/ContentSummaryResponse.md +21 -0
- data/docs/CookbookCookbookDistribution.md +27 -0
- data/docs/CookbookCookbookDistributionResponse.md +33 -0
- data/docs/CookbookCookbookPackageContent.md +25 -0
- data/docs/CookbookCookbookPackageContentResponse.md +29 -0
- data/docs/CookbookCookbookPublication.md +19 -0
- data/docs/CookbookCookbookPublicationResponse.md +25 -0
- data/docs/CookbookCookbookRemote.md +59 -0
- data/docs/CookbookCookbookRemoteResponse.md +55 -0
- data/docs/CookbookCookbookRepository.md +25 -0
- data/docs/CookbookCookbookRepositoryResponse.md +33 -0
- data/docs/DistributionsCookbookApi.md +372 -0
- data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookDistributionResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookPackageContentResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookPublicationResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookRemoteResponseList.md +23 -0
- data/docs/PaginatedcookbookCookbookRepositoryResponseList.md +23 -0
- data/docs/PatchedcookbookCookbookDistribution.md +27 -0
- data/docs/PatchedcookbookCookbookRemote.md +59 -0
- data/docs/PatchedcookbookCookbookRepository.md +25 -0
- data/docs/PolicyEnum.md +16 -0
- data/docs/PublicationsCookbookApi.md +257 -0
- data/docs/RemotesCookbookApi.md +376 -0
- data/docs/RepositoriesCookbookApi.md +475 -0
- data/docs/RepositoriesCookbookVersionsApi.md +271 -0
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersion.md +17 -0
- data/docs/RepositoryVersionResponse.md +27 -0
- data/git_push.sh +58 -0
- data/lib/pulp_cookbook_client/api/content_cookbooks_api.rb +264 -0
- data/lib/pulp_cookbook_client/api/distributions_cookbook_api.rb +457 -0
- data/lib/pulp_cookbook_client/api/publications_cookbook_api.rb +312 -0
- data/lib/pulp_cookbook_client/api/remotes_cookbook_api.rb +463 -0
- data/lib/pulp_cookbook_client/api/repositories_cookbook_api.rb +583 -0
- data/lib/pulp_cookbook_client/api/repositories_cookbook_versions_api.rb +339 -0
- data/lib/pulp_cookbook_client/api_client.rb +406 -0
- data/lib/pulp_cookbook_client/api_error.rb +57 -0
- data/lib/pulp_cookbook_client/configuration.rb +250 -0
- data/lib/pulp_cookbook_client/models/async_operation_response.rb +213 -0
- data/lib/pulp_cookbook_client/models/content_summary.rb +246 -0
- data/lib/pulp_cookbook_client/models/content_summary_response.rb +246 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution.rb +308 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution_response.rb +299 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content.rb +287 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content_response.rb +272 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication.rb +217 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication_response.rb +248 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote.rb +677 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote_response.rb +493 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository.rb +304 -0
- data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository_response.rb +307 -0
- data/lib/pulp_cookbook_client/models/paginated_repository_version_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_distribution_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_package_content_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_publication_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_remote_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_repository_response_list.rb +237 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_distribution.rb +290 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_remote.rb +659 -0
- data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_repository.rb +295 -0
- data/lib/pulp_cookbook_client/models/policy_enum.rb +37 -0
- data/lib/pulp_cookbook_client/models/repository_add_remove_content.rb +232 -0
- data/lib/pulp_cookbook_client/models/repository_sync_url.rb +220 -0
- data/lib/pulp_cookbook_client/models/repository_version.rb +208 -0
- data/lib/pulp_cookbook_client/models/repository_version_response.rb +255 -0
- data/lib/pulp_cookbook_client/version.rb +15 -0
- data/lib/pulp_cookbook_client.rb +72 -0
- data/pulp_cookbook_client.gemspec +39 -0
- data/spec/api/content_cookbooks_api_spec.rb +87 -0
- data/spec/api/distributions_cookbook_api_spec.rb +125 -0
- data/spec/api/publications_cookbook_api_spec.rb +98 -0
- data/spec/api/remotes_cookbook_api_spec.rb +127 -0
- data/spec/api/repositories_cookbook_api_spec.rb +146 -0
- data/spec/api/repositories_cookbook_versions_api_spec.rb +104 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/content_summary_response_spec.rb +53 -0
- data/spec/models/content_summary_spec.rb +53 -0
- data/spec/models/cookbook_cookbook_distribution_response_spec.rb +89 -0
- data/spec/models/cookbook_cookbook_distribution_spec.rb +71 -0
- data/spec/models/cookbook_cookbook_package_content_response_spec.rb +77 -0
- data/spec/models/cookbook_cookbook_package_content_spec.rb +65 -0
- data/spec/models/cookbook_cookbook_publication_response_spec.rb +65 -0
- data/spec/models/cookbook_cookbook_publication_spec.rb +47 -0
- data/spec/models/cookbook_cookbook_remote_response_spec.rb +155 -0
- data/spec/models/cookbook_cookbook_remote_spec.rb +167 -0
- data/spec/models/cookbook_cookbook_repository_response_spec.rb +89 -0
- data/spec/models/cookbook_cookbook_repository_spec.rb +65 -0
- data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_distribution_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_package_content_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_publication_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_remote_response_list_spec.rb +59 -0
- data/spec/models/paginatedcookbook_cookbook_repository_response_list_spec.rb +59 -0
- data/spec/models/patchedcookbook_cookbook_distribution_spec.rb +71 -0
- data/spec/models/patchedcookbook_cookbook_remote_spec.rb +167 -0
- data/spec/models/patchedcookbook_cookbook_repository_spec.rb +65 -0
- data/spec/models/policy_enum_spec.rb +35 -0
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_response_spec.rb +71 -0
- data/spec/models/repository_version_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +251 -0
@@ -0,0 +1,339 @@
|
|
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 PulpCookbookClient
|
16
|
+
class RepositoriesCookbookVersionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a repository version
|
23
|
+
# Trigger an asynchronous task to delete a repository version.
|
24
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AsyncOperationResponse]
|
27
|
+
def delete(cookbook_cookbook_repository_version_href, opts = {})
|
28
|
+
data, _status_code, _headers = delete_with_http_info(cookbook_cookbook_repository_version_href, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a repository version
|
33
|
+
# Trigger an asynchronous task to delete a repository version.
|
34
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
37
|
+
def delete_with_http_info(cookbook_cookbook_repository_version_href, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesCookbookVersionsApi.delete ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'cookbook_cookbook_repository_version_href' is set
|
42
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_repository_version_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_version_href' when calling RepositoriesCookbookVersionsApi.delete"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '{cookbook_cookbook_repository_version_href}'.sub('{' + 'cookbook_cookbook_repository_version_href' + '}', CGI.escape(cookbook_cookbook_repository_version_href.to_s).gsub('%2F', '/'))
|
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
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: RepositoriesCookbookVersionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# List repository versions
|
85
|
+
# Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
|
86
|
+
# @param cookbook_cookbook_repository_href [String]
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
89
|
+
# @option opts [String] :content__in Content Unit referenced by HREF
|
90
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
91
|
+
# @option opts [Integer] :number
|
92
|
+
# @option opts [Integer] :number__gt Filter results where number is greater than value
|
93
|
+
# @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
|
94
|
+
# @option opts [Integer] :number__lt Filter results where number is less than value
|
95
|
+
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
96
|
+
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
97
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
98
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
99
|
+
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
100
|
+
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
101
|
+
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
102
|
+
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
103
|
+
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
104
|
+
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
105
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
106
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
107
|
+
# @return [PaginatedRepositoryVersionResponseList]
|
108
|
+
def list(cookbook_cookbook_repository_href, opts = {})
|
109
|
+
data, _status_code, _headers = list_with_http_info(cookbook_cookbook_repository_href, opts)
|
110
|
+
data
|
111
|
+
end
|
112
|
+
|
113
|
+
# List repository versions
|
114
|
+
# Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
|
115
|
+
# @param cookbook_cookbook_repository_href [String]
|
116
|
+
# @param [Hash] opts the optional parameters
|
117
|
+
# @option opts [String] :content Content Unit referenced by HREF
|
118
|
+
# @option opts [String] :content__in Content Unit referenced by HREF
|
119
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
120
|
+
# @option opts [Integer] :number
|
121
|
+
# @option opts [Integer] :number__gt Filter results where number is greater than value
|
122
|
+
# @option opts [Integer] :number__gte Filter results where number is greater than or equal to value
|
123
|
+
# @option opts [Integer] :number__lt Filter results where number is less than value
|
124
|
+
# @option opts [Integer] :number__lte Filter results where number is less than or equal to value
|
125
|
+
# @option opts [Array<Integer>] :number__range Filter results where number is between two comma separated values
|
126
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
127
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
128
|
+
# @option opts [DateTime] :pulp_created ISO 8601 formatted dates are supported
|
129
|
+
# @option opts [DateTime] :pulp_created__gt Filter results where pulp_created is greater than value
|
130
|
+
# @option opts [DateTime] :pulp_created__gte Filter results where pulp_created is greater than or equal to value
|
131
|
+
# @option opts [DateTime] :pulp_created__lt Filter results where pulp_created is less than value
|
132
|
+
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
133
|
+
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
134
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
135
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
136
|
+
# @return [Array<(PaginatedRepositoryVersionResponseList, Integer, Hash)>] PaginatedRepositoryVersionResponseList data, response status code and response headers
|
137
|
+
def list_with_http_info(cookbook_cookbook_repository_href, opts = {})
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesCookbookVersionsApi.list ...'
|
140
|
+
end
|
141
|
+
# verify the required parameter 'cookbook_cookbook_repository_href' is set
|
142
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
|
143
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookVersionsApi.list"
|
144
|
+
end
|
145
|
+
# resource path
|
146
|
+
local_var_path = '{cookbook_cookbook_repository_href}versions/'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
|
147
|
+
|
148
|
+
# query parameters
|
149
|
+
query_params = opts[:query_params] || {}
|
150
|
+
query_params[:'content'] = opts[:'content'] if !opts[:'content'].nil?
|
151
|
+
query_params[:'content__in'] = opts[:'content__in'] if !opts[:'content__in'].nil?
|
152
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
153
|
+
query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil?
|
154
|
+
query_params[:'number__gt'] = opts[:'number__gt'] if !opts[:'number__gt'].nil?
|
155
|
+
query_params[:'number__gte'] = opts[:'number__gte'] if !opts[:'number__gte'].nil?
|
156
|
+
query_params[:'number__lt'] = opts[:'number__lt'] if !opts[:'number__lt'].nil?
|
157
|
+
query_params[:'number__lte'] = opts[:'number__lte'] if !opts[:'number__lte'].nil?
|
158
|
+
query_params[:'number__range'] = @api_client.build_collection_param(opts[:'number__range'], :csv) if !opts[:'number__range'].nil?
|
159
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
160
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
161
|
+
query_params[:'pulp_created'] = opts[:'pulp_created'] if !opts[:'pulp_created'].nil?
|
162
|
+
query_params[:'pulp_created__gt'] = opts[:'pulp_created__gt'] if !opts[:'pulp_created__gt'].nil?
|
163
|
+
query_params[:'pulp_created__gte'] = opts[:'pulp_created__gte'] if !opts[:'pulp_created__gte'].nil?
|
164
|
+
query_params[:'pulp_created__lt'] = opts[:'pulp_created__lt'] if !opts[:'pulp_created__lt'].nil?
|
165
|
+
query_params[:'pulp_created__lte'] = opts[:'pulp_created__lte'] if !opts[:'pulp_created__lte'].nil?
|
166
|
+
query_params[:'pulp_created__range'] = @api_client.build_collection_param(opts[:'pulp_created__range'], :csv) if !opts[:'pulp_created__range'].nil?
|
167
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
168
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
169
|
+
|
170
|
+
# header parameters
|
171
|
+
header_params = opts[:header_params] || {}
|
172
|
+
# HTTP header 'Accept' (if needed)
|
173
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
174
|
+
|
175
|
+
# form parameters
|
176
|
+
form_params = opts[:form_params] || {}
|
177
|
+
|
178
|
+
# http body (model)
|
179
|
+
post_body = opts[:body]
|
180
|
+
|
181
|
+
# return_type
|
182
|
+
return_type = opts[:return_type] || 'PaginatedRepositoryVersionResponseList'
|
183
|
+
|
184
|
+
# auth_names
|
185
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
186
|
+
|
187
|
+
new_options = opts.merge(
|
188
|
+
:header_params => header_params,
|
189
|
+
:query_params => query_params,
|
190
|
+
:form_params => form_params,
|
191
|
+
:body => post_body,
|
192
|
+
:auth_names => auth_names,
|
193
|
+
:return_type => return_type
|
194
|
+
)
|
195
|
+
|
196
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
197
|
+
if @api_client.config.debugging
|
198
|
+
@api_client.config.logger.debug "API called: RepositoriesCookbookVersionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
199
|
+
end
|
200
|
+
return data, status_code, headers
|
201
|
+
end
|
202
|
+
|
203
|
+
# Inspect a repository version
|
204
|
+
# Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
|
205
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
208
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
209
|
+
# @return [RepositoryVersionResponse]
|
210
|
+
def read(cookbook_cookbook_repository_version_href, opts = {})
|
211
|
+
data, _status_code, _headers = read_with_http_info(cookbook_cookbook_repository_version_href, opts)
|
212
|
+
data
|
213
|
+
end
|
214
|
+
|
215
|
+
# Inspect a repository version
|
216
|
+
# Cookbook Repository Version Endpoint. CookbookRepositoryVersion represents a single cookbook repository version.
|
217
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
220
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
221
|
+
# @return [Array<(RepositoryVersionResponse, Integer, Hash)>] RepositoryVersionResponse data, response status code and response headers
|
222
|
+
def read_with_http_info(cookbook_cookbook_repository_version_href, opts = {})
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesCookbookVersionsApi.read ...'
|
225
|
+
end
|
226
|
+
# verify the required parameter 'cookbook_cookbook_repository_version_href' is set
|
227
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_repository_version_href.nil?
|
228
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_version_href' when calling RepositoriesCookbookVersionsApi.read"
|
229
|
+
end
|
230
|
+
# resource path
|
231
|
+
local_var_path = '{cookbook_cookbook_repository_version_href}'.sub('{' + 'cookbook_cookbook_repository_version_href' + '}', CGI.escape(cookbook_cookbook_repository_version_href.to_s).gsub('%2F', '/'))
|
232
|
+
|
233
|
+
# query parameters
|
234
|
+
query_params = opts[:query_params] || {}
|
235
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
236
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
237
|
+
|
238
|
+
# header parameters
|
239
|
+
header_params = opts[:header_params] || {}
|
240
|
+
# HTTP header 'Accept' (if needed)
|
241
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
242
|
+
|
243
|
+
# form parameters
|
244
|
+
form_params = opts[:form_params] || {}
|
245
|
+
|
246
|
+
# http body (model)
|
247
|
+
post_body = opts[:body]
|
248
|
+
|
249
|
+
# return_type
|
250
|
+
return_type = opts[:return_type] || 'RepositoryVersionResponse'
|
251
|
+
|
252
|
+
# auth_names
|
253
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
254
|
+
|
255
|
+
new_options = opts.merge(
|
256
|
+
:header_params => header_params,
|
257
|
+
:query_params => query_params,
|
258
|
+
:form_params => form_params,
|
259
|
+
:body => post_body,
|
260
|
+
:auth_names => auth_names,
|
261
|
+
:return_type => return_type
|
262
|
+
)
|
263
|
+
|
264
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
265
|
+
if @api_client.config.debugging
|
266
|
+
@api_client.config.logger.debug "API called: RepositoriesCookbookVersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
267
|
+
end
|
268
|
+
return data, status_code, headers
|
269
|
+
end
|
270
|
+
|
271
|
+
# Trigger an asynchronous task to repair a repository version.
|
272
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
273
|
+
# @param repository_version [RepositoryVersion]
|
274
|
+
# @param [Hash] opts the optional parameters
|
275
|
+
# @return [AsyncOperationResponse]
|
276
|
+
def repair(cookbook_cookbook_repository_version_href, repository_version, opts = {})
|
277
|
+
data, _status_code, _headers = repair_with_http_info(cookbook_cookbook_repository_version_href, repository_version, opts)
|
278
|
+
data
|
279
|
+
end
|
280
|
+
|
281
|
+
# Trigger an asynchronous task to repair a repository version.
|
282
|
+
# @param cookbook_cookbook_repository_version_href [String]
|
283
|
+
# @param repository_version [RepositoryVersion]
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
286
|
+
def repair_with_http_info(cookbook_cookbook_repository_version_href, repository_version, opts = {})
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesCookbookVersionsApi.repair ...'
|
289
|
+
end
|
290
|
+
# verify the required parameter 'cookbook_cookbook_repository_version_href' is set
|
291
|
+
if @api_client.config.client_side_validation && cookbook_cookbook_repository_version_href.nil?
|
292
|
+
fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_version_href' when calling RepositoriesCookbookVersionsApi.repair"
|
293
|
+
end
|
294
|
+
# verify the required parameter 'repository_version' is set
|
295
|
+
if @api_client.config.client_side_validation && repository_version.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'repository_version' when calling RepositoriesCookbookVersionsApi.repair"
|
297
|
+
end
|
298
|
+
# resource path
|
299
|
+
local_var_path = '{cookbook_cookbook_repository_version_href}repair/'.sub('{' + 'cookbook_cookbook_repository_version_href' + '}', CGI.escape(cookbook_cookbook_repository_version_href.to_s).gsub('%2F', '/'))
|
300
|
+
|
301
|
+
# query parameters
|
302
|
+
query_params = opts[:query_params] || {}
|
303
|
+
|
304
|
+
# header parameters
|
305
|
+
header_params = opts[:header_params] || {}
|
306
|
+
# HTTP header 'Accept' (if needed)
|
307
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
308
|
+
# HTTP header 'Content-Type'
|
309
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
310
|
+
|
311
|
+
# form parameters
|
312
|
+
form_params = opts[:form_params] || {}
|
313
|
+
|
314
|
+
# http body (model)
|
315
|
+
post_body = opts[:body] || @api_client.object_to_http_body(repository_version)
|
316
|
+
|
317
|
+
# return_type
|
318
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
319
|
+
|
320
|
+
# auth_names
|
321
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
322
|
+
|
323
|
+
new_options = opts.merge(
|
324
|
+
:header_params => header_params,
|
325
|
+
:query_params => query_params,
|
326
|
+
:form_params => form_params,
|
327
|
+
:body => post_body,
|
328
|
+
:auth_names => auth_names,
|
329
|
+
:return_type => return_type
|
330
|
+
)
|
331
|
+
|
332
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug "API called: RepositoriesCookbookVersionsApi#repair\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
335
|
+
end
|
336
|
+
return data, status_code, headers
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|