pulp_ansible_client 0.2.0b1
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/Gemfile.lock +79 -0
- data/README.md +150 -0
- data/Rakefile +10 -0
- data/docs/AnsibleCollectionsApi.md +66 -0
- data/docs/AnsibleDistribution.md +31 -0
- data/docs/AnsibleRemote.md +45 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/Collection.md +41 -0
- data/docs/CollectionRemote.md +47 -0
- data/docs/ContentCollectionsApi.md +134 -0
- data/docs/ContentRolesApi.md +186 -0
- data/docs/DistributionsAnsibleApi.md +352 -0
- data/docs/GalaxyCollection.md +25 -0
- data/docs/GalaxyRole.md +21 -0
- data/docs/GalaxyRoleVersion.md +19 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/InlineResponse2006.md +23 -0
- data/docs/InlineResponse2007.md +23 -0
- data/docs/PulpAnsibleApiApi.md +60 -0
- data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +113 -0
- data/docs/PulpAnsibleGalaxyApiRolesApi.md +67 -0
- data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +69 -0
- data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +67 -0
- data/docs/RemotesAnsibleApi.md +411 -0
- data/docs/RemotesCollectionApi.md +411 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/Role.md +29 -0
- data/git_push.sh +55 -0
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +94 -0
- data/lib/pulp_ansible_client/api/content_collections_api.rb +169 -0
- data/lib/pulp_ansible_client/api/content_roles_api.rb +228 -0
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +430 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +80 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +140 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +88 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +94 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +88 -0
- data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +504 -0
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +504 -0
- data/lib/pulp_ansible_client/api_client.rb +387 -0
- data/lib/pulp_ansible_client/api_error.rb +57 -0
- data/lib/pulp_ansible_client/configuration.rb +251 -0
- data/lib/pulp_ansible_client/models/ansible_distribution.rb +347 -0
- data/lib/pulp_ansible_client/models/ansible_remote.rb +539 -0
- data/lib/pulp_ansible_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_ansible_client/models/collection.rb +494 -0
- data/lib/pulp_ansible_client/models/collection_remote.rb +572 -0
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +304 -0
- data/lib/pulp_ansible_client/models/galaxy_role.rb +262 -0
- data/lib/pulp_ansible_client/models/galaxy_role_version.rb +229 -0
- data/lib/pulp_ansible_client/models/inline_response200.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2005.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2006.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2007.rb +235 -0
- data/lib/pulp_ansible_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_ansible_client/models/role.rb +344 -0
- data/lib/pulp_ansible_client/version.rb +15 -0
- data/lib/pulp_ansible_client.rb +68 -0
- data/pulp_ansible_client.gemspec +45 -0
- data/spec/api/ansible_collections_api_spec.rb +48 -0
- data/spec/api/content_collections_api_spec.rb +67 -0
- data/spec/api/content_roles_api_spec.rb +78 -0
- data/spec/api/distributions_ansible_api_spec.rb +116 -0
- data/spec/api/pulp_ansible_api_api_spec.rb +46 -0
- data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +57 -0
- data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +48 -0
- data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +48 -0
- data/spec/api/remotes_ansible_api_spec.rb +130 -0
- data/spec/api/remotes_collection_api_spec.rb +130 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/ansible_distribution_spec.rb +83 -0
- data/spec/models/ansible_remote_spec.rb +129 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/collection_remote_spec.rb +135 -0
- data/spec/models/collection_spec.rb +113 -0
- data/spec/models/galaxy_collection_spec.rb +65 -0
- data/spec/models/galaxy_role_spec.rb +53 -0
- data/spec/models/galaxy_role_version_spec.rb +47 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response2006_spec.rb +59 -0
- data/spec/models/inline_response2007_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/role_spec.rb +77 -0
- data/spec/spec_helper.rb +111 -0
- metadata +357 -0
|
@@ -0,0 +1,504 @@
|
|
|
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 PulpAnsibleClient
|
|
16
|
+
class RemotesCollectionApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a collection remote
|
|
23
|
+
# ViewSet for Collection Remotes.
|
|
24
|
+
# @param data [CollectionRemote]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CollectionRemote]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a collection remote
|
|
33
|
+
# ViewSet for Collection Remotes.
|
|
34
|
+
# @param data [CollectionRemote]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CollectionRemote, Integer, Hash)>] CollectionRemote 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: RemotesCollectionApi.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 RemotesCollectionApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/remotes/ansible/collection/'
|
|
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] || 'CollectionRemote'
|
|
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: RemotesCollectionApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete a collection remote
|
|
87
|
+
# Trigger an asynchronous delete task
|
|
88
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [AsyncOperationResponse]
|
|
91
|
+
def delete(collection_remote_href, opts = {})
|
|
92
|
+
data, _status_code, _headers = delete_with_http_info(collection_remote_href, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete a collection remote
|
|
97
|
+
# Trigger an asynchronous delete task
|
|
98
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/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(collection_remote_href, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.delete ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'collection_remote_href' is set
|
|
106
|
+
if @api_client.config.client_side_validation && collection_remote_href.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'collection_remote_href' when calling RemotesCollectionApi.delete"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '{collection_remote_href}'.sub('{' + 'collection_remote_href' + '}', collection_remote_href.to_s)
|
|
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: RemotesCollectionApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
+
end
|
|
145
|
+
return data, status_code, headers
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# List collection remotes
|
|
149
|
+
# ViewSet for Collection Remotes.
|
|
150
|
+
# @param [Hash] opts the optional parameters
|
|
151
|
+
# @option opts [String] :name
|
|
152
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
153
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
|
154
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
|
155
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
|
156
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
|
157
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
|
158
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
|
159
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
160
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
161
|
+
# @return [InlineResponse2004]
|
|
162
|
+
def list(opts = {})
|
|
163
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# List collection remotes
|
|
168
|
+
# ViewSet for Collection Remotes.
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @option opts [String] :name
|
|
171
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
172
|
+
# @option opts [String] :_last_updated__lt Filter results where _last_updated is less than value
|
|
173
|
+
# @option opts [String] :_last_updated__lte Filter results where _last_updated is less than or equal to value
|
|
174
|
+
# @option opts [String] :_last_updated__gt Filter results where _last_updated is greater than value
|
|
175
|
+
# @option opts [String] :_last_updated__gte Filter results where _last_updated is greater than or equal to value
|
|
176
|
+
# @option opts [String] :_last_updated__range Filter results where _last_updated is between two comma separated values
|
|
177
|
+
# @option opts [String] :_last_updated ISO 8601 formatted dates are supported
|
|
178
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
179
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
180
|
+
# @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
|
|
181
|
+
def list_with_http_info(opts = {})
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.list ...'
|
|
184
|
+
end
|
|
185
|
+
# resource path
|
|
186
|
+
local_var_path = '/pulp/api/v3/remotes/ansible/collection/'
|
|
187
|
+
|
|
188
|
+
# query parameters
|
|
189
|
+
query_params = opts[:query_params] || {}
|
|
190
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
191
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
|
192
|
+
query_params[:'_last_updated__lt'] = opts[:'_last_updated__lt'] if !opts[:'_last_updated__lt'].nil?
|
|
193
|
+
query_params[:'_last_updated__lte'] = opts[:'_last_updated__lte'] if !opts[:'_last_updated__lte'].nil?
|
|
194
|
+
query_params[:'_last_updated__gt'] = opts[:'_last_updated__gt'] if !opts[:'_last_updated__gt'].nil?
|
|
195
|
+
query_params[:'_last_updated__gte'] = opts[:'_last_updated__gte'] if !opts[:'_last_updated__gte'].nil?
|
|
196
|
+
query_params[:'_last_updated__range'] = opts[:'_last_updated__range'] if !opts[:'_last_updated__range'].nil?
|
|
197
|
+
query_params[:'_last_updated'] = opts[:'_last_updated'] if !opts[:'_last_updated'].nil?
|
|
198
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
199
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
200
|
+
|
|
201
|
+
# header parameters
|
|
202
|
+
header_params = opts[:header_params] || {}
|
|
203
|
+
# HTTP header 'Accept' (if needed)
|
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
205
|
+
|
|
206
|
+
# form parameters
|
|
207
|
+
form_params = opts[:form_params] || {}
|
|
208
|
+
|
|
209
|
+
# http body (model)
|
|
210
|
+
post_body = opts[:body]
|
|
211
|
+
|
|
212
|
+
# return_type
|
|
213
|
+
return_type = opts[:return_type] || 'InlineResponse2004'
|
|
214
|
+
|
|
215
|
+
# auth_names
|
|
216
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
217
|
+
|
|
218
|
+
new_options = opts.merge(
|
|
219
|
+
:header_params => header_params,
|
|
220
|
+
:query_params => query_params,
|
|
221
|
+
:form_params => form_params,
|
|
222
|
+
:body => post_body,
|
|
223
|
+
:auth_names => auth_names,
|
|
224
|
+
:return_type => return_type
|
|
225
|
+
)
|
|
226
|
+
|
|
227
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
228
|
+
if @api_client.config.debugging
|
|
229
|
+
@api_client.config.logger.debug "API called: RemotesCollectionApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
230
|
+
end
|
|
231
|
+
return data, status_code, headers
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Partially update a collection remote
|
|
235
|
+
# Trigger an asynchronous partial update task
|
|
236
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
237
|
+
# @param data [CollectionRemote]
|
|
238
|
+
# @param [Hash] opts the optional parameters
|
|
239
|
+
# @return [AsyncOperationResponse]
|
|
240
|
+
def partial_update(collection_remote_href, data, opts = {})
|
|
241
|
+
data, _status_code, _headers = partial_update_with_http_info(collection_remote_href, data, opts)
|
|
242
|
+
data
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Partially update a collection remote
|
|
246
|
+
# Trigger an asynchronous partial update task
|
|
247
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
248
|
+
# @param data [CollectionRemote]
|
|
249
|
+
# @param [Hash] opts the optional parameters
|
|
250
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
251
|
+
def partial_update_with_http_info(collection_remote_href, data, opts = {})
|
|
252
|
+
if @api_client.config.debugging
|
|
253
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.partial_update ...'
|
|
254
|
+
end
|
|
255
|
+
# verify the required parameter 'collection_remote_href' is set
|
|
256
|
+
if @api_client.config.client_side_validation && collection_remote_href.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'collection_remote_href' when calling RemotesCollectionApi.partial_update"
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'data' is set
|
|
260
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesCollectionApi.partial_update"
|
|
262
|
+
end
|
|
263
|
+
# resource path
|
|
264
|
+
local_var_path = '{collection_remote_href}'.sub('{' + 'collection_remote_href' + '}', collection_remote_href.to_s)
|
|
265
|
+
|
|
266
|
+
# query parameters
|
|
267
|
+
query_params = opts[:query_params] || {}
|
|
268
|
+
|
|
269
|
+
# header parameters
|
|
270
|
+
header_params = opts[:header_params] || {}
|
|
271
|
+
# HTTP header 'Accept' (if needed)
|
|
272
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
273
|
+
# HTTP header 'Content-Type'
|
|
274
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
275
|
+
|
|
276
|
+
# form parameters
|
|
277
|
+
form_params = opts[:form_params] || {}
|
|
278
|
+
|
|
279
|
+
# http body (model)
|
|
280
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
281
|
+
|
|
282
|
+
# return_type
|
|
283
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
284
|
+
|
|
285
|
+
# auth_names
|
|
286
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
287
|
+
|
|
288
|
+
new_options = opts.merge(
|
|
289
|
+
:header_params => header_params,
|
|
290
|
+
:query_params => query_params,
|
|
291
|
+
:form_params => form_params,
|
|
292
|
+
:body => post_body,
|
|
293
|
+
:auth_names => auth_names,
|
|
294
|
+
:return_type => return_type
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
298
|
+
if @api_client.config.debugging
|
|
299
|
+
@api_client.config.logger.debug "API called: RemotesCollectionApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
300
|
+
end
|
|
301
|
+
return data, status_code, headers
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Inspect a collection remote
|
|
305
|
+
# ViewSet for Collection Remotes.
|
|
306
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @return [CollectionRemote]
|
|
309
|
+
def read(collection_remote_href, opts = {})
|
|
310
|
+
data, _status_code, _headers = read_with_http_info(collection_remote_href, opts)
|
|
311
|
+
data
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Inspect a collection remote
|
|
315
|
+
# ViewSet for Collection Remotes.
|
|
316
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
317
|
+
# @param [Hash] opts the optional parameters
|
|
318
|
+
# @return [Array<(CollectionRemote, Integer, Hash)>] CollectionRemote data, response status code and response headers
|
|
319
|
+
def read_with_http_info(collection_remote_href, opts = {})
|
|
320
|
+
if @api_client.config.debugging
|
|
321
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.read ...'
|
|
322
|
+
end
|
|
323
|
+
# verify the required parameter 'collection_remote_href' is set
|
|
324
|
+
if @api_client.config.client_side_validation && collection_remote_href.nil?
|
|
325
|
+
fail ArgumentError, "Missing the required parameter 'collection_remote_href' when calling RemotesCollectionApi.read"
|
|
326
|
+
end
|
|
327
|
+
# resource path
|
|
328
|
+
local_var_path = '{collection_remote_href}'.sub('{' + 'collection_remote_href' + '}', collection_remote_href.to_s)
|
|
329
|
+
|
|
330
|
+
# query parameters
|
|
331
|
+
query_params = opts[:query_params] || {}
|
|
332
|
+
|
|
333
|
+
# header parameters
|
|
334
|
+
header_params = opts[:header_params] || {}
|
|
335
|
+
# HTTP header 'Accept' (if needed)
|
|
336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
337
|
+
|
|
338
|
+
# form parameters
|
|
339
|
+
form_params = opts[:form_params] || {}
|
|
340
|
+
|
|
341
|
+
# http body (model)
|
|
342
|
+
post_body = opts[:body]
|
|
343
|
+
|
|
344
|
+
# return_type
|
|
345
|
+
return_type = opts[:return_type] || 'CollectionRemote'
|
|
346
|
+
|
|
347
|
+
# auth_names
|
|
348
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
349
|
+
|
|
350
|
+
new_options = opts.merge(
|
|
351
|
+
:header_params => header_params,
|
|
352
|
+
:query_params => query_params,
|
|
353
|
+
:form_params => form_params,
|
|
354
|
+
:body => post_body,
|
|
355
|
+
:auth_names => auth_names,
|
|
356
|
+
:return_type => return_type
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
360
|
+
if @api_client.config.debugging
|
|
361
|
+
@api_client.config.logger.debug "API called: RemotesCollectionApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
362
|
+
end
|
|
363
|
+
return data, status_code, headers
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Trigger an asynchronous task to sync Collection content.
|
|
367
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
368
|
+
# @param data [RepositorySyncURL]
|
|
369
|
+
# @param [Hash] opts the optional parameters
|
|
370
|
+
# @return [AsyncOperationResponse]
|
|
371
|
+
def sync(collection_remote_href, data, opts = {})
|
|
372
|
+
data, _status_code, _headers = sync_with_http_info(collection_remote_href, data, opts)
|
|
373
|
+
data
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Trigger an asynchronous task to sync Collection content.
|
|
377
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
378
|
+
# @param data [RepositorySyncURL]
|
|
379
|
+
# @param [Hash] opts the optional parameters
|
|
380
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
381
|
+
def sync_with_http_info(collection_remote_href, data, opts = {})
|
|
382
|
+
if @api_client.config.debugging
|
|
383
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.sync ...'
|
|
384
|
+
end
|
|
385
|
+
# verify the required parameter 'collection_remote_href' is set
|
|
386
|
+
if @api_client.config.client_side_validation && collection_remote_href.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'collection_remote_href' when calling RemotesCollectionApi.sync"
|
|
388
|
+
end
|
|
389
|
+
# verify the required parameter 'data' is set
|
|
390
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
391
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesCollectionApi.sync"
|
|
392
|
+
end
|
|
393
|
+
# resource path
|
|
394
|
+
local_var_path = '{collection_remote_href}sync/'.sub('{' + 'collection_remote_href' + '}', collection_remote_href.to_s)
|
|
395
|
+
|
|
396
|
+
# query parameters
|
|
397
|
+
query_params = opts[:query_params] || {}
|
|
398
|
+
|
|
399
|
+
# header parameters
|
|
400
|
+
header_params = opts[:header_params] || {}
|
|
401
|
+
# HTTP header 'Accept' (if needed)
|
|
402
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
403
|
+
# HTTP header 'Content-Type'
|
|
404
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
405
|
+
|
|
406
|
+
# form parameters
|
|
407
|
+
form_params = opts[:form_params] || {}
|
|
408
|
+
|
|
409
|
+
# http body (model)
|
|
410
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
411
|
+
|
|
412
|
+
# return_type
|
|
413
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
414
|
+
|
|
415
|
+
# auth_names
|
|
416
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
417
|
+
|
|
418
|
+
new_options = opts.merge(
|
|
419
|
+
:header_params => header_params,
|
|
420
|
+
:query_params => query_params,
|
|
421
|
+
:form_params => form_params,
|
|
422
|
+
:body => post_body,
|
|
423
|
+
:auth_names => auth_names,
|
|
424
|
+
:return_type => return_type
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
428
|
+
if @api_client.config.debugging
|
|
429
|
+
@api_client.config.logger.debug "API called: RemotesCollectionApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
430
|
+
end
|
|
431
|
+
return data, status_code, headers
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Update a collection remote
|
|
435
|
+
# Trigger an asynchronous update task
|
|
436
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
437
|
+
# @param data [CollectionRemote]
|
|
438
|
+
# @param [Hash] opts the optional parameters
|
|
439
|
+
# @return [AsyncOperationResponse]
|
|
440
|
+
def update(collection_remote_href, data, opts = {})
|
|
441
|
+
data, _status_code, _headers = update_with_http_info(collection_remote_href, data, opts)
|
|
442
|
+
data
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Update a collection remote
|
|
446
|
+
# Trigger an asynchronous update task
|
|
447
|
+
# @param collection_remote_href [String] URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
448
|
+
# @param data [CollectionRemote]
|
|
449
|
+
# @param [Hash] opts the optional parameters
|
|
450
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
451
|
+
def update_with_http_info(collection_remote_href, data, opts = {})
|
|
452
|
+
if @api_client.config.debugging
|
|
453
|
+
@api_client.config.logger.debug 'Calling API: RemotesCollectionApi.update ...'
|
|
454
|
+
end
|
|
455
|
+
# verify the required parameter 'collection_remote_href' is set
|
|
456
|
+
if @api_client.config.client_side_validation && collection_remote_href.nil?
|
|
457
|
+
fail ArgumentError, "Missing the required parameter 'collection_remote_href' when calling RemotesCollectionApi.update"
|
|
458
|
+
end
|
|
459
|
+
# verify the required parameter 'data' is set
|
|
460
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
461
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling RemotesCollectionApi.update"
|
|
462
|
+
end
|
|
463
|
+
# resource path
|
|
464
|
+
local_var_path = '{collection_remote_href}'.sub('{' + 'collection_remote_href' + '}', collection_remote_href.to_s)
|
|
465
|
+
|
|
466
|
+
# query parameters
|
|
467
|
+
query_params = opts[:query_params] || {}
|
|
468
|
+
|
|
469
|
+
# header parameters
|
|
470
|
+
header_params = opts[:header_params] || {}
|
|
471
|
+
# HTTP header 'Accept' (if needed)
|
|
472
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
473
|
+
# HTTP header 'Content-Type'
|
|
474
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
475
|
+
|
|
476
|
+
# form parameters
|
|
477
|
+
form_params = opts[:form_params] || {}
|
|
478
|
+
|
|
479
|
+
# http body (model)
|
|
480
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
481
|
+
|
|
482
|
+
# return_type
|
|
483
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
484
|
+
|
|
485
|
+
# auth_names
|
|
486
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
487
|
+
|
|
488
|
+
new_options = opts.merge(
|
|
489
|
+
:header_params => header_params,
|
|
490
|
+
:query_params => query_params,
|
|
491
|
+
:form_params => form_params,
|
|
492
|
+
:body => post_body,
|
|
493
|
+
:auth_names => auth_names,
|
|
494
|
+
:return_type => return_type
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
498
|
+
if @api_client.config.debugging
|
|
499
|
+
@api_client.config.logger.debug "API called: RemotesCollectionApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
500
|
+
end
|
|
501
|
+
return data, status_code, headers
|
|
502
|
+
end
|
|
503
|
+
end
|
|
504
|
+
end
|