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,430 @@
|
|
|
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 DistributionsAnsibleApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create an ansible distribution
|
|
23
|
+
# Trigger an asynchronous create task
|
|
24
|
+
# @param data [AnsibleDistribution]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AsyncOperationResponse]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create an ansible distribution
|
|
33
|
+
# Trigger an asynchronous create task
|
|
34
|
+
# @param data [AnsibleDistribution]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
37
|
+
def create_with_http_info(data, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.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 DistributionsAnsibleApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/distributions/ansible/ansible/'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
|
|
58
|
+
# form parameters
|
|
59
|
+
form_params = opts[:form_params] || {}
|
|
60
|
+
|
|
61
|
+
# http body (model)
|
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
63
|
+
|
|
64
|
+
# return_type
|
|
65
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
66
|
+
|
|
67
|
+
# auth_names
|
|
68
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
69
|
+
|
|
70
|
+
new_options = opts.merge(
|
|
71
|
+
:header_params => header_params,
|
|
72
|
+
:query_params => query_params,
|
|
73
|
+
:form_params => form_params,
|
|
74
|
+
:body => post_body,
|
|
75
|
+
:auth_names => auth_names,
|
|
76
|
+
:return_type => return_type
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
+
if @api_client.config.debugging
|
|
81
|
+
@api_client.config.logger.debug "API called: DistributionsAnsibleApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Delete an ansible distribution
|
|
87
|
+
# Trigger an asynchronous delete task
|
|
88
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [AsyncOperationResponse]
|
|
91
|
+
def delete(ansible_distribution_href, opts = {})
|
|
92
|
+
data, _status_code, _headers = delete_with_http_info(ansible_distribution_href, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete an ansible distribution
|
|
97
|
+
# Trigger an asynchronous delete task
|
|
98
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/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(ansible_distribution_href, opts = {})
|
|
102
|
+
if @api_client.config.debugging
|
|
103
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.delete ...'
|
|
104
|
+
end
|
|
105
|
+
# verify the required parameter 'ansible_distribution_href' is set
|
|
106
|
+
if @api_client.config.client_side_validation && ansible_distribution_href.nil?
|
|
107
|
+
fail ArgumentError, "Missing the required parameter 'ansible_distribution_href' when calling DistributionsAnsibleApi.delete"
|
|
108
|
+
end
|
|
109
|
+
# resource path
|
|
110
|
+
local_var_path = '{ansible_distribution_href}'.sub('{' + 'ansible_distribution_href' + '}', ansible_distribution_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: DistributionsAnsibleApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
+
end
|
|
145
|
+
return data, status_code, headers
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# List ansible distributions
|
|
149
|
+
# ViewSet for Ansible Distributions.
|
|
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] :base_path
|
|
154
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
155
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
|
156
|
+
# @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
|
|
157
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
158
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
159
|
+
# @return [InlineResponse2002]
|
|
160
|
+
def list(opts = {})
|
|
161
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
162
|
+
data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# List ansible distributions
|
|
166
|
+
# ViewSet for Ansible Distributions.
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @option opts [String] :name
|
|
169
|
+
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
|
170
|
+
# @option opts [String] :base_path
|
|
171
|
+
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
172
|
+
# @option opts [String] :base_path__icontains Filter results where base_path contains value
|
|
173
|
+
# @option opts [String] :base_path__in Filter results where base_path is in a comma-separated list of values
|
|
174
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
175
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
176
|
+
# @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
|
|
177
|
+
def list_with_http_info(opts = {})
|
|
178
|
+
if @api_client.config.debugging
|
|
179
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.list ...'
|
|
180
|
+
end
|
|
181
|
+
# resource path
|
|
182
|
+
local_var_path = '/pulp/api/v3/distributions/ansible/ansible/'
|
|
183
|
+
|
|
184
|
+
# query parameters
|
|
185
|
+
query_params = opts[:query_params] || {}
|
|
186
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
187
|
+
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
|
188
|
+
query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
|
|
189
|
+
query_params[:'base_path__contains'] = opts[:'base_path__contains'] if !opts[:'base_path__contains'].nil?
|
|
190
|
+
query_params[:'base_path__icontains'] = opts[:'base_path__icontains'] if !opts[:'base_path__icontains'].nil?
|
|
191
|
+
query_params[:'base_path__in'] = opts[:'base_path__in'] if !opts[:'base_path__in'].nil?
|
|
192
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
193
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
194
|
+
|
|
195
|
+
# header parameters
|
|
196
|
+
header_params = opts[:header_params] || {}
|
|
197
|
+
# HTTP header 'Accept' (if needed)
|
|
198
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:body]
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:return_type] || 'InlineResponse2002'
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:header_params => header_params,
|
|
214
|
+
:query_params => query_params,
|
|
215
|
+
:form_params => form_params,
|
|
216
|
+
:body => post_body,
|
|
217
|
+
:auth_names => auth_names,
|
|
218
|
+
:return_type => return_type
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug "API called: DistributionsAnsibleApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
224
|
+
end
|
|
225
|
+
return data, status_code, headers
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Partially update an ansible distribution
|
|
229
|
+
# Trigger an asynchronous partial update task
|
|
230
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
231
|
+
# @param data [AnsibleDistribution]
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [AsyncOperationResponse]
|
|
234
|
+
def partial_update(ansible_distribution_href, data, opts = {})
|
|
235
|
+
data, _status_code, _headers = partial_update_with_http_info(ansible_distribution_href, data, opts)
|
|
236
|
+
data
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Partially update an ansible distribution
|
|
240
|
+
# Trigger an asynchronous partial update task
|
|
241
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
242
|
+
# @param data [AnsibleDistribution]
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
245
|
+
def partial_update_with_http_info(ansible_distribution_href, data, opts = {})
|
|
246
|
+
if @api_client.config.debugging
|
|
247
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.partial_update ...'
|
|
248
|
+
end
|
|
249
|
+
# verify the required parameter 'ansible_distribution_href' is set
|
|
250
|
+
if @api_client.config.client_side_validation && ansible_distribution_href.nil?
|
|
251
|
+
fail ArgumentError, "Missing the required parameter 'ansible_distribution_href' when calling DistributionsAnsibleApi.partial_update"
|
|
252
|
+
end
|
|
253
|
+
# verify the required parameter 'data' is set
|
|
254
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
255
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsAnsibleApi.partial_update"
|
|
256
|
+
end
|
|
257
|
+
# resource path
|
|
258
|
+
local_var_path = '{ansible_distribution_href}'.sub('{' + 'ansible_distribution_href' + '}', ansible_distribution_href.to_s)
|
|
259
|
+
|
|
260
|
+
# query parameters
|
|
261
|
+
query_params = opts[:query_params] || {}
|
|
262
|
+
|
|
263
|
+
# header parameters
|
|
264
|
+
header_params = opts[:header_params] || {}
|
|
265
|
+
# HTTP header 'Accept' (if needed)
|
|
266
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
267
|
+
# HTTP header 'Content-Type'
|
|
268
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
269
|
+
|
|
270
|
+
# form parameters
|
|
271
|
+
form_params = opts[:form_params] || {}
|
|
272
|
+
|
|
273
|
+
# http body (model)
|
|
274
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
275
|
+
|
|
276
|
+
# return_type
|
|
277
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
278
|
+
|
|
279
|
+
# auth_names
|
|
280
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
281
|
+
|
|
282
|
+
new_options = opts.merge(
|
|
283
|
+
:header_params => header_params,
|
|
284
|
+
:query_params => query_params,
|
|
285
|
+
:form_params => form_params,
|
|
286
|
+
:body => post_body,
|
|
287
|
+
:auth_names => auth_names,
|
|
288
|
+
:return_type => return_type
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
292
|
+
if @api_client.config.debugging
|
|
293
|
+
@api_client.config.logger.debug "API called: DistributionsAnsibleApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
294
|
+
end
|
|
295
|
+
return data, status_code, headers
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
# Inspect an ansible distribution
|
|
299
|
+
# ViewSet for Ansible Distributions.
|
|
300
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
301
|
+
# @param [Hash] opts the optional parameters
|
|
302
|
+
# @return [AnsibleDistribution]
|
|
303
|
+
def read(ansible_distribution_href, opts = {})
|
|
304
|
+
data, _status_code, _headers = read_with_http_info(ansible_distribution_href, opts)
|
|
305
|
+
data
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Inspect an ansible distribution
|
|
309
|
+
# ViewSet for Ansible Distributions.
|
|
310
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
311
|
+
# @param [Hash] opts the optional parameters
|
|
312
|
+
# @return [Array<(AnsibleDistribution, Integer, Hash)>] AnsibleDistribution data, response status code and response headers
|
|
313
|
+
def read_with_http_info(ansible_distribution_href, opts = {})
|
|
314
|
+
if @api_client.config.debugging
|
|
315
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.read ...'
|
|
316
|
+
end
|
|
317
|
+
# verify the required parameter 'ansible_distribution_href' is set
|
|
318
|
+
if @api_client.config.client_side_validation && ansible_distribution_href.nil?
|
|
319
|
+
fail ArgumentError, "Missing the required parameter 'ansible_distribution_href' when calling DistributionsAnsibleApi.read"
|
|
320
|
+
end
|
|
321
|
+
# resource path
|
|
322
|
+
local_var_path = '{ansible_distribution_href}'.sub('{' + 'ansible_distribution_href' + '}', ansible_distribution_href.to_s)
|
|
323
|
+
|
|
324
|
+
# query parameters
|
|
325
|
+
query_params = opts[:query_params] || {}
|
|
326
|
+
|
|
327
|
+
# header parameters
|
|
328
|
+
header_params = opts[:header_params] || {}
|
|
329
|
+
# HTTP header 'Accept' (if needed)
|
|
330
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
331
|
+
|
|
332
|
+
# form parameters
|
|
333
|
+
form_params = opts[:form_params] || {}
|
|
334
|
+
|
|
335
|
+
# http body (model)
|
|
336
|
+
post_body = opts[:body]
|
|
337
|
+
|
|
338
|
+
# return_type
|
|
339
|
+
return_type = opts[:return_type] || 'AnsibleDistribution'
|
|
340
|
+
|
|
341
|
+
# auth_names
|
|
342
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
343
|
+
|
|
344
|
+
new_options = opts.merge(
|
|
345
|
+
:header_params => header_params,
|
|
346
|
+
:query_params => query_params,
|
|
347
|
+
:form_params => form_params,
|
|
348
|
+
:body => post_body,
|
|
349
|
+
:auth_names => auth_names,
|
|
350
|
+
:return_type => return_type
|
|
351
|
+
)
|
|
352
|
+
|
|
353
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
354
|
+
if @api_client.config.debugging
|
|
355
|
+
@api_client.config.logger.debug "API called: DistributionsAnsibleApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
356
|
+
end
|
|
357
|
+
return data, status_code, headers
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Update an ansible distribution
|
|
361
|
+
# Trigger an asynchronous update task
|
|
362
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
363
|
+
# @param data [AnsibleDistribution]
|
|
364
|
+
# @param [Hash] opts the optional parameters
|
|
365
|
+
# @return [AsyncOperationResponse]
|
|
366
|
+
def update(ansible_distribution_href, data, opts = {})
|
|
367
|
+
data, _status_code, _headers = update_with_http_info(ansible_distribution_href, data, opts)
|
|
368
|
+
data
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Update an ansible distribution
|
|
372
|
+
# Trigger an asynchronous update task
|
|
373
|
+
# @param ansible_distribution_href [String] URI of Ansible Distribution. e.g.: /pulp/api/v3/distributions/ansible/ansible/1/
|
|
374
|
+
# @param data [AnsibleDistribution]
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
377
|
+
def update_with_http_info(ansible_distribution_href, data, opts = {})
|
|
378
|
+
if @api_client.config.debugging
|
|
379
|
+
@api_client.config.logger.debug 'Calling API: DistributionsAnsibleApi.update ...'
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'ansible_distribution_href' is set
|
|
382
|
+
if @api_client.config.client_side_validation && ansible_distribution_href.nil?
|
|
383
|
+
fail ArgumentError, "Missing the required parameter 'ansible_distribution_href' when calling DistributionsAnsibleApi.update"
|
|
384
|
+
end
|
|
385
|
+
# verify the required parameter 'data' is set
|
|
386
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
387
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling DistributionsAnsibleApi.update"
|
|
388
|
+
end
|
|
389
|
+
# resource path
|
|
390
|
+
local_var_path = '{ansible_distribution_href}'.sub('{' + 'ansible_distribution_href' + '}', ansible_distribution_href.to_s)
|
|
391
|
+
|
|
392
|
+
# query parameters
|
|
393
|
+
query_params = opts[:query_params] || {}
|
|
394
|
+
|
|
395
|
+
# header parameters
|
|
396
|
+
header_params = opts[:header_params] || {}
|
|
397
|
+
# HTTP header 'Accept' (if needed)
|
|
398
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
399
|
+
# HTTP header 'Content-Type'
|
|
400
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
401
|
+
|
|
402
|
+
# form parameters
|
|
403
|
+
form_params = opts[:form_params] || {}
|
|
404
|
+
|
|
405
|
+
# http body (model)
|
|
406
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
|
407
|
+
|
|
408
|
+
# return_type
|
|
409
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
410
|
+
|
|
411
|
+
# auth_names
|
|
412
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
413
|
+
|
|
414
|
+
new_options = opts.merge(
|
|
415
|
+
:header_params => header_params,
|
|
416
|
+
:query_params => query_params,
|
|
417
|
+
:form_params => form_params,
|
|
418
|
+
:body => post_body,
|
|
419
|
+
:auth_names => auth_names,
|
|
420
|
+
:return_type => return_type
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug "API called: DistributionsAnsibleApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
426
|
+
end
|
|
427
|
+
return data, status_code, headers
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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 PulpAnsibleApiApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Return a response to the \"GET\" action.
|
|
23
|
+
# @param path [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [nil]
|
|
26
|
+
def list(path, opts = {})
|
|
27
|
+
list_with_http_info(path, opts)
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Return a response to the \"GET\" action.
|
|
32
|
+
# @param path [String]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
35
|
+
def list_with_http_info(path, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleApiApi.list ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'path' is set
|
|
40
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleApiApi.list"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/pulp_ansible/galaxy/{path}/api/'.sub('{' + 'path' + '}', path.to_s)
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
|
|
52
|
+
# form parameters
|
|
53
|
+
form_params = opts[:form_params] || {}
|
|
54
|
+
|
|
55
|
+
# http body (model)
|
|
56
|
+
post_body = opts[:body]
|
|
57
|
+
|
|
58
|
+
# return_type
|
|
59
|
+
return_type = opts[:return_type]
|
|
60
|
+
|
|
61
|
+
# auth_names
|
|
62
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
63
|
+
|
|
64
|
+
new_options = opts.merge(
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
74
|
+
if @api_client.config.debugging
|
|
75
|
+
@api_client.config.logger.debug "API called: PulpAnsibleApiApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
76
|
+
end
|
|
77
|
+
return data, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
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 PulpAnsibleGalaxyApiCollectionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Queues a task that creates a new Collection from an uploaded artifact.
|
|
23
|
+
# @param path [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [nil]
|
|
26
|
+
def create(path, opts = {})
|
|
27
|
+
create_with_http_info(path, opts)
|
|
28
|
+
nil
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Queues a task that creates a new Collection from an uploaded artifact.
|
|
32
|
+
# @param path [String]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
35
|
+
def create_with_http_info(path, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiCollectionsApi.create ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'path' is set
|
|
40
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleGalaxyApiCollectionsApi.create"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/pulp_ansible/galaxy/{path}/api/v2/collections/'.sub('{' + 'path' + '}', path.to_s)
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
|
|
52
|
+
# form parameters
|
|
53
|
+
form_params = opts[:form_params] || {}
|
|
54
|
+
|
|
55
|
+
# http body (model)
|
|
56
|
+
post_body = opts[:body]
|
|
57
|
+
|
|
58
|
+
# return_type
|
|
59
|
+
return_type = opts[:return_type]
|
|
60
|
+
|
|
61
|
+
# auth_names
|
|
62
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
63
|
+
|
|
64
|
+
new_options = opts.merge(
|
|
65
|
+
:header_params => header_params,
|
|
66
|
+
:query_params => query_params,
|
|
67
|
+
:form_params => form_params,
|
|
68
|
+
:body => post_body,
|
|
69
|
+
:auth_names => auth_names,
|
|
70
|
+
:return_type => return_type
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
74
|
+
if @api_client.config.debugging
|
|
75
|
+
@api_client.config.logger.debug "API called: PulpAnsibleGalaxyApiCollectionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
76
|
+
end
|
|
77
|
+
return data, status_code, headers
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Get the detail view of a Collection.
|
|
81
|
+
# @param collection_href [String] URI of Collection. e.g.: /pulp_ansible/galaxy/1/api/v2/collections/1/1/
|
|
82
|
+
# @param [Hash] opts the optional parameters
|
|
83
|
+
# @return [GalaxyCollection]
|
|
84
|
+
def read(collection_href, opts = {})
|
|
85
|
+
data, _status_code, _headers = read_with_http_info(collection_href, opts)
|
|
86
|
+
data
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Get the detail view of a Collection.
|
|
90
|
+
# @param collection_href [String] URI of Collection. e.g.: /pulp_ansible/galaxy/1/api/v2/collections/1/1/
|
|
91
|
+
# @param [Hash] opts the optional parameters
|
|
92
|
+
# @return [Array<(GalaxyCollection, Integer, Hash)>] GalaxyCollection data, response status code and response headers
|
|
93
|
+
def read_with_http_info(collection_href, opts = {})
|
|
94
|
+
if @api_client.config.debugging
|
|
95
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiCollectionsApi.read ...'
|
|
96
|
+
end
|
|
97
|
+
# verify the required parameter 'collection_href' is set
|
|
98
|
+
if @api_client.config.client_side_validation && collection_href.nil?
|
|
99
|
+
fail ArgumentError, "Missing the required parameter 'collection_href' when calling PulpAnsibleGalaxyApiCollectionsApi.read"
|
|
100
|
+
end
|
|
101
|
+
# resource path
|
|
102
|
+
local_var_path = '{collection_href}'.sub('{' + 'collection_href' + '}', collection_href.to_s)
|
|
103
|
+
|
|
104
|
+
# query parameters
|
|
105
|
+
query_params = opts[:query_params] || {}
|
|
106
|
+
|
|
107
|
+
# header parameters
|
|
108
|
+
header_params = opts[:header_params] || {}
|
|
109
|
+
# HTTP header 'Accept' (if needed)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
111
|
+
|
|
112
|
+
# form parameters
|
|
113
|
+
form_params = opts[:form_params] || {}
|
|
114
|
+
|
|
115
|
+
# http body (model)
|
|
116
|
+
post_body = opts[:body]
|
|
117
|
+
|
|
118
|
+
# return_type
|
|
119
|
+
return_type = opts[:return_type] || 'GalaxyCollection'
|
|
120
|
+
|
|
121
|
+
# auth_names
|
|
122
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
123
|
+
|
|
124
|
+
new_options = opts.merge(
|
|
125
|
+
:header_params => header_params,
|
|
126
|
+
:query_params => query_params,
|
|
127
|
+
:form_params => form_params,
|
|
128
|
+
:body => post_body,
|
|
129
|
+
:auth_names => auth_names,
|
|
130
|
+
:return_type => return_type
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
134
|
+
if @api_client.config.debugging
|
|
135
|
+
@api_client.config.logger.debug "API called: PulpAnsibleGalaxyApiCollectionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
136
|
+
end
|
|
137
|
+
return data, status_code, headers
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|