pulp_ansible_client 0.10.5 → 0.11.0
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 +4 -4
- data/README.md +14 -4
- data/docs/AnsibleCollectionRemote.md +1 -1
- data/docs/AnsibleCollectionRemoteResponse.md +3 -1
- data/docs/AnsibleCollectionVersionResponse.md +4 -4
- data/docs/AnsibleGitRemote.md +59 -0
- data/docs/AnsibleGitRemoteResponse.md +55 -0
- data/docs/AnsibleRoleRemote.md +1 -1
- data/docs/AnsibleRoleRemoteResponse.md +1 -1
- data/docs/AnsibleRoleResponse.md +4 -4
- data/docs/CollectionVersionResponse.md +4 -0
- data/docs/PaginatedansibleGitRemoteResponseList.md +23 -0
- data/docs/PatchedansibleCollectionRemote.md +1 -1
- data/docs/PatchedansibleGitRemote.md +59 -0
- data/docs/PatchedansibleRoleRemote.md +1 -1
- data/docs/RemotesGitApi.md +376 -0
- data/docs/UnpaginatedCollectionVersionResponse.md +5 -1
- data/git_push.sh +58 -0
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +16 -0
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +12 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_artifacts_collections_v3_api.rb +16 -0
- data/lib/pulp_ansible_client/api/remotes_git_api.rb +463 -0
- data/lib/pulp_ansible_client/api_client.rb +5 -2
- data/lib/pulp_ansible_client/configuration.rb +0 -1
- data/lib/pulp_ansible_client/models/ansible_ansible_distribution.rb +38 -0
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +34 -0
- data/lib/pulp_ansible_client/models/ansible_collection.rb +38 -0
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +192 -1
- data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +28 -2
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +27 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +14 -19
- data/lib/pulp_ansible_client/models/ansible_git_remote.rb +692 -0
- data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +493 -0
- data/lib/pulp_ansible_client/models/ansible_role.rb +57 -0
- data/lib/pulp_ansible_client/models/ansible_role_remote.rb +159 -1
- data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +14 -14
- data/lib/pulp_ansible_client/models/collection_one_shot.rb +60 -0
- data/lib/pulp_ansible_client/models/collection_version_response.rb +19 -1
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +38 -0
- data/lib/pulp_ansible_client/models/paginatedansible_git_remote_response_list.rb +237 -0
- data/lib/pulp_ansible_client/models/patchedansible_ansible_distribution.rb +30 -0
- data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +30 -0
- data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +184 -1
- data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +674 -0
- data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +151 -1
- data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +22 -4
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +5 -0
- data/pulp_ansible_client.gemspec +3 -3
- data/spec/api/remotes_git_api_spec.rb +127 -0
- data/spec/models/ansible_collection_remote_response_spec.rb +6 -0
- data/spec/models/ansible_collection_version_response_spec.rb +2 -2
- data/spec/models/ansible_git_remote_response_spec.rb +155 -0
- data/spec/models/ansible_git_remote_spec.rb +167 -0
- data/spec/models/ansible_role_response_spec.rb +2 -2
- data/spec/models/collection_version_response_spec.rb +12 -0
- data/spec/models/paginatedansible_git_remote_response_list_spec.rb +59 -0
- data/spec/models/patchedansible_git_remote_spec.rb +167 -0
- data/spec/models/unpaginated_collection_version_response_spec.rb +12 -0
- metadata +94 -79
@@ -0,0 +1,463 @@
|
|
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 PulpAnsibleClient
|
16
|
+
class RemotesGitApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a git remote
|
23
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
24
|
+
# @param ansible_git_remote [AnsibleGitRemote]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [AnsibleGitRemoteResponse]
|
27
|
+
def create(ansible_git_remote, opts = {})
|
28
|
+
data, _status_code, _headers = create_with_http_info(ansible_git_remote, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create a git remote
|
33
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
34
|
+
# @param ansible_git_remote [AnsibleGitRemote]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(AnsibleGitRemoteResponse, Integer, Hash)>] AnsibleGitRemoteResponse data, response status code and response headers
|
37
|
+
def create_with_http_info(ansible_git_remote, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.create ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'ansible_git_remote' is set
|
42
|
+
if @api_client.config.client_side_validation && ansible_git_remote.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote' when calling RemotesGitApi.create"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/pulp/api/v3/remotes/ansible/git/'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(ansible_git_remote)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'AnsibleGitRemoteResponse'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: RemotesGitApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete a git remote
|
87
|
+
# Trigger an asynchronous delete task
|
88
|
+
# @param ansible_git_remote_href [String]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [AsyncOperationResponse]
|
91
|
+
def delete(ansible_git_remote_href, opts = {})
|
92
|
+
data, _status_code, _headers = delete_with_http_info(ansible_git_remote_href, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Delete a git remote
|
97
|
+
# Trigger an asynchronous delete task
|
98
|
+
# @param ansible_git_remote_href [String]
|
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_git_remote_href, opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.delete ...'
|
104
|
+
end
|
105
|
+
# verify the required parameter 'ansible_git_remote_href' is set
|
106
|
+
if @api_client.config.client_side_validation && ansible_git_remote_href.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote_href' when calling RemotesGitApi.delete"
|
108
|
+
end
|
109
|
+
# resource path
|
110
|
+
local_var_path = '{ansible_git_remote_href}'.sub('{' + 'ansible_git_remote_href' + '}', CGI.escape(ansible_git_remote_href.to_s).gsub('%2F', '/'))
|
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] || ['basicAuth']
|
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: RemotesGitApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# List git remotes
|
149
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
150
|
+
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
152
|
+
# @option opts [String] :name
|
153
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
154
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
155
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
156
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
157
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
158
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
159
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
160
|
+
# @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
|
161
|
+
# @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
162
|
+
# @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
163
|
+
# @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
164
|
+
# @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
165
|
+
# @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
166
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
167
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
168
|
+
# @return [PaginatedansibleGitRemoteResponseList]
|
169
|
+
def list(opts = {})
|
170
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
171
|
+
data
|
172
|
+
end
|
173
|
+
|
174
|
+
# List git remotes
|
175
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
178
|
+
# @option opts [String] :name
|
179
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
180
|
+
# @option opts [String] :name__icontains Filter results where name contains value
|
181
|
+
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
182
|
+
# @option opts [String] :name__startswith Filter results where name starts with value
|
183
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
184
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
185
|
+
# @option opts [String] :pulp_label_select Filter labels by search string
|
186
|
+
# @option opts [DateTime] :pulp_last_updated ISO 8601 formatted dates are supported
|
187
|
+
# @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
|
188
|
+
# @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
|
189
|
+
# @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
190
|
+
# @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
191
|
+
# @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
192
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
193
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
194
|
+
# @return [Array<(PaginatedansibleGitRemoteResponseList, Integer, Hash)>] PaginatedansibleGitRemoteResponseList data, response status code and response headers
|
195
|
+
def list_with_http_info(opts = {})
|
196
|
+
if @api_client.config.debugging
|
197
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.list ...'
|
198
|
+
end
|
199
|
+
# resource path
|
200
|
+
local_var_path = '/pulp/api/v3/remotes/ansible/git/'
|
201
|
+
|
202
|
+
# query parameters
|
203
|
+
query_params = opts[:query_params] || {}
|
204
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
205
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
206
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
207
|
+
query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
|
208
|
+
query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
|
209
|
+
query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
|
210
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
211
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
212
|
+
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
213
|
+
query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
|
214
|
+
query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
|
215
|
+
query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
|
216
|
+
query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
|
217
|
+
query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
|
218
|
+
query_params[:'pulp_last_updated__range'] = @api_client.build_collection_param(opts[:'pulp_last_updated__range'], :csv) if !opts[:'pulp_last_updated__range'].nil?
|
219
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
220
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
221
|
+
|
222
|
+
# header parameters
|
223
|
+
header_params = opts[:header_params] || {}
|
224
|
+
# HTTP header 'Accept' (if needed)
|
225
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
226
|
+
|
227
|
+
# form parameters
|
228
|
+
form_params = opts[:form_params] || {}
|
229
|
+
|
230
|
+
# http body (model)
|
231
|
+
post_body = opts[:body]
|
232
|
+
|
233
|
+
# return_type
|
234
|
+
return_type = opts[:return_type] || 'PaginatedansibleGitRemoteResponseList'
|
235
|
+
|
236
|
+
# auth_names
|
237
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
238
|
+
|
239
|
+
new_options = opts.merge(
|
240
|
+
:header_params => header_params,
|
241
|
+
:query_params => query_params,
|
242
|
+
:form_params => form_params,
|
243
|
+
:body => post_body,
|
244
|
+
:auth_names => auth_names,
|
245
|
+
:return_type => return_type
|
246
|
+
)
|
247
|
+
|
248
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
249
|
+
if @api_client.config.debugging
|
250
|
+
@api_client.config.logger.debug "API called: RemotesGitApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
251
|
+
end
|
252
|
+
return data, status_code, headers
|
253
|
+
end
|
254
|
+
|
255
|
+
# Update a git remote
|
256
|
+
# Trigger an asynchronous partial update task
|
257
|
+
# @param ansible_git_remote_href [String]
|
258
|
+
# @param patchedansible_git_remote [PatchedansibleGitRemote]
|
259
|
+
# @param [Hash] opts the optional parameters
|
260
|
+
# @return [AsyncOperationResponse]
|
261
|
+
def partial_update(ansible_git_remote_href, patchedansible_git_remote, opts = {})
|
262
|
+
data, _status_code, _headers = partial_update_with_http_info(ansible_git_remote_href, patchedansible_git_remote, opts)
|
263
|
+
data
|
264
|
+
end
|
265
|
+
|
266
|
+
# Update a git remote
|
267
|
+
# Trigger an asynchronous partial update task
|
268
|
+
# @param ansible_git_remote_href [String]
|
269
|
+
# @param patchedansible_git_remote [PatchedansibleGitRemote]
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
272
|
+
def partial_update_with_http_info(ansible_git_remote_href, patchedansible_git_remote, opts = {})
|
273
|
+
if @api_client.config.debugging
|
274
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.partial_update ...'
|
275
|
+
end
|
276
|
+
# verify the required parameter 'ansible_git_remote_href' is set
|
277
|
+
if @api_client.config.client_side_validation && ansible_git_remote_href.nil?
|
278
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote_href' when calling RemotesGitApi.partial_update"
|
279
|
+
end
|
280
|
+
# verify the required parameter 'patchedansible_git_remote' is set
|
281
|
+
if @api_client.config.client_side_validation && patchedansible_git_remote.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'patchedansible_git_remote' when calling RemotesGitApi.partial_update"
|
283
|
+
end
|
284
|
+
# resource path
|
285
|
+
local_var_path = '{ansible_git_remote_href}'.sub('{' + 'ansible_git_remote_href' + '}', CGI.escape(ansible_git_remote_href.to_s).gsub('%2F', '/'))
|
286
|
+
|
287
|
+
# query parameters
|
288
|
+
query_params = opts[:query_params] || {}
|
289
|
+
|
290
|
+
# header parameters
|
291
|
+
header_params = opts[:header_params] || {}
|
292
|
+
# HTTP header 'Accept' (if needed)
|
293
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
294
|
+
# HTTP header 'Content-Type'
|
295
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
296
|
+
|
297
|
+
# form parameters
|
298
|
+
form_params = opts[:form_params] || {}
|
299
|
+
|
300
|
+
# http body (model)
|
301
|
+
post_body = opts[:body] || @api_client.object_to_http_body(patchedansible_git_remote)
|
302
|
+
|
303
|
+
# return_type
|
304
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
305
|
+
|
306
|
+
# auth_names
|
307
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
308
|
+
|
309
|
+
new_options = opts.merge(
|
310
|
+
:header_params => header_params,
|
311
|
+
:query_params => query_params,
|
312
|
+
:form_params => form_params,
|
313
|
+
:body => post_body,
|
314
|
+
:auth_names => auth_names,
|
315
|
+
:return_type => return_type
|
316
|
+
)
|
317
|
+
|
318
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
319
|
+
if @api_client.config.debugging
|
320
|
+
@api_client.config.logger.debug "API called: RemotesGitApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
321
|
+
end
|
322
|
+
return data, status_code, headers
|
323
|
+
end
|
324
|
+
|
325
|
+
# Inspect a git remote
|
326
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
327
|
+
# @param ansible_git_remote_href [String]
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
330
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
331
|
+
# @return [AnsibleGitRemoteResponse]
|
332
|
+
def read(ansible_git_remote_href, opts = {})
|
333
|
+
data, _status_code, _headers = read_with_http_info(ansible_git_remote_href, opts)
|
334
|
+
data
|
335
|
+
end
|
336
|
+
|
337
|
+
# Inspect a git remote
|
338
|
+
# ViewSet for Ansible Remotes. This is a tech preview feature. The functionality may change in the future.
|
339
|
+
# @param ansible_git_remote_href [String]
|
340
|
+
# @param [Hash] opts the optional parameters
|
341
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
342
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
343
|
+
# @return [Array<(AnsibleGitRemoteResponse, Integer, Hash)>] AnsibleGitRemoteResponse data, response status code and response headers
|
344
|
+
def read_with_http_info(ansible_git_remote_href, opts = {})
|
345
|
+
if @api_client.config.debugging
|
346
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.read ...'
|
347
|
+
end
|
348
|
+
# verify the required parameter 'ansible_git_remote_href' is set
|
349
|
+
if @api_client.config.client_side_validation && ansible_git_remote_href.nil?
|
350
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote_href' when calling RemotesGitApi.read"
|
351
|
+
end
|
352
|
+
# resource path
|
353
|
+
local_var_path = '{ansible_git_remote_href}'.sub('{' + 'ansible_git_remote_href' + '}', CGI.escape(ansible_git_remote_href.to_s).gsub('%2F', '/'))
|
354
|
+
|
355
|
+
# query parameters
|
356
|
+
query_params = opts[:query_params] || {}
|
357
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
358
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
359
|
+
|
360
|
+
# header parameters
|
361
|
+
header_params = opts[:header_params] || {}
|
362
|
+
# HTTP header 'Accept' (if needed)
|
363
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
364
|
+
|
365
|
+
# form parameters
|
366
|
+
form_params = opts[:form_params] || {}
|
367
|
+
|
368
|
+
# http body (model)
|
369
|
+
post_body = opts[:body]
|
370
|
+
|
371
|
+
# return_type
|
372
|
+
return_type = opts[:return_type] || 'AnsibleGitRemoteResponse'
|
373
|
+
|
374
|
+
# auth_names
|
375
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
376
|
+
|
377
|
+
new_options = opts.merge(
|
378
|
+
:header_params => header_params,
|
379
|
+
:query_params => query_params,
|
380
|
+
:form_params => form_params,
|
381
|
+
:body => post_body,
|
382
|
+
:auth_names => auth_names,
|
383
|
+
:return_type => return_type
|
384
|
+
)
|
385
|
+
|
386
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
387
|
+
if @api_client.config.debugging
|
388
|
+
@api_client.config.logger.debug "API called: RemotesGitApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
389
|
+
end
|
390
|
+
return data, status_code, headers
|
391
|
+
end
|
392
|
+
|
393
|
+
# Update a git remote
|
394
|
+
# Trigger an asynchronous update task
|
395
|
+
# @param ansible_git_remote_href [String]
|
396
|
+
# @param ansible_git_remote [AnsibleGitRemote]
|
397
|
+
# @param [Hash] opts the optional parameters
|
398
|
+
# @return [AsyncOperationResponse]
|
399
|
+
def update(ansible_git_remote_href, ansible_git_remote, opts = {})
|
400
|
+
data, _status_code, _headers = update_with_http_info(ansible_git_remote_href, ansible_git_remote, opts)
|
401
|
+
data
|
402
|
+
end
|
403
|
+
|
404
|
+
# Update a git remote
|
405
|
+
# Trigger an asynchronous update task
|
406
|
+
# @param ansible_git_remote_href [String]
|
407
|
+
# @param ansible_git_remote [AnsibleGitRemote]
|
408
|
+
# @param [Hash] opts the optional parameters
|
409
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
410
|
+
def update_with_http_info(ansible_git_remote_href, ansible_git_remote, opts = {})
|
411
|
+
if @api_client.config.debugging
|
412
|
+
@api_client.config.logger.debug 'Calling API: RemotesGitApi.update ...'
|
413
|
+
end
|
414
|
+
# verify the required parameter 'ansible_git_remote_href' is set
|
415
|
+
if @api_client.config.client_side_validation && ansible_git_remote_href.nil?
|
416
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote_href' when calling RemotesGitApi.update"
|
417
|
+
end
|
418
|
+
# verify the required parameter 'ansible_git_remote' is set
|
419
|
+
if @api_client.config.client_side_validation && ansible_git_remote.nil?
|
420
|
+
fail ArgumentError, "Missing the required parameter 'ansible_git_remote' when calling RemotesGitApi.update"
|
421
|
+
end
|
422
|
+
# resource path
|
423
|
+
local_var_path = '{ansible_git_remote_href}'.sub('{' + 'ansible_git_remote_href' + '}', CGI.escape(ansible_git_remote_href.to_s).gsub('%2F', '/'))
|
424
|
+
|
425
|
+
# query parameters
|
426
|
+
query_params = opts[:query_params] || {}
|
427
|
+
|
428
|
+
# header parameters
|
429
|
+
header_params = opts[:header_params] || {}
|
430
|
+
# HTTP header 'Accept' (if needed)
|
431
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
432
|
+
# HTTP header 'Content-Type'
|
433
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
434
|
+
|
435
|
+
# form parameters
|
436
|
+
form_params = opts[:form_params] || {}
|
437
|
+
|
438
|
+
# http body (model)
|
439
|
+
post_body = opts[:body] || @api_client.object_to_http_body(ansible_git_remote)
|
440
|
+
|
441
|
+
# return_type
|
442
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
443
|
+
|
444
|
+
# auth_names
|
445
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
446
|
+
|
447
|
+
new_options = opts.merge(
|
448
|
+
:header_params => header_params,
|
449
|
+
:query_params => query_params,
|
450
|
+
:form_params => form_params,
|
451
|
+
:body => post_body,
|
452
|
+
:auth_names => auth_names,
|
453
|
+
:return_type => return_type
|
454
|
+
)
|
455
|
+
|
456
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug "API called: RemotesGitApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
459
|
+
end
|
460
|
+
return data, status_code, headers
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|
@@ -118,6 +118,9 @@ module PulpAnsibleClient
|
|
118
118
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
119
119
|
|
120
120
|
req_opts = {
|
121
|
+
:method => http_method,
|
122
|
+
:headers => header_params,
|
123
|
+
:params => query_params,
|
121
124
|
:params_encoding => @config.params_encoding,
|
122
125
|
:timeout => @config.timeout,
|
123
126
|
:verbose => @config.debugging
|
@@ -125,13 +128,13 @@ module PulpAnsibleClient
|
|
125
128
|
|
126
129
|
if [:post, :patch, :put, :delete].include?(http_method)
|
127
130
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
131
|
+
req_opts.update :body => req_body
|
128
132
|
if @config.debugging
|
129
133
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
130
134
|
end
|
131
135
|
end
|
132
136
|
request.headers = header_params
|
133
137
|
request.body = req_body
|
134
|
-
request.options = OpenStruct.new(req_opts)
|
135
138
|
request.url url
|
136
139
|
request.params = query_params
|
137
140
|
download_file(request) if opts[:return_type] == 'File'
|
@@ -154,7 +157,7 @@ module PulpAnsibleClient
|
|
154
157
|
case value
|
155
158
|
when ::File, ::Tempfile
|
156
159
|
# TODO hardcode to application/octet-stream, need better way to detect content type
|
157
|
-
data[key] = Faraday::
|
160
|
+
data[key] = Faraday::UploadIO.new(value.path, 'application/octet-stream', value.path)
|
158
161
|
when ::Array, nil
|
159
162
|
# let Faraday handle Array and nil parameters
|
160
163
|
data[key] = value
|
@@ -113,10 +113,18 @@ module PulpAnsibleClient
|
|
113
113
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
114
114
|
end
|
115
115
|
|
116
|
+
if @base_path.to_s.length < 1
|
117
|
+
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
118
|
+
end
|
119
|
+
|
116
120
|
if @name.nil?
|
117
121
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
118
122
|
end
|
119
123
|
|
124
|
+
if @name.to_s.length < 1
|
125
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
126
|
+
end
|
127
|
+
|
120
128
|
invalid_properties
|
121
129
|
end
|
122
130
|
|
@@ -124,10 +132,40 @@ module PulpAnsibleClient
|
|
124
132
|
# @return true if the model is valid
|
125
133
|
def valid?
|
126
134
|
return false if @base_path.nil?
|
135
|
+
return false if @base_path.to_s.length < 1
|
127
136
|
return false if @name.nil?
|
137
|
+
return false if @name.to_s.length < 1
|
128
138
|
true
|
129
139
|
end
|
130
140
|
|
141
|
+
# Custom attribute writer method with validation
|
142
|
+
# @param [Object] base_path Value to be assigned
|
143
|
+
def base_path=(base_path)
|
144
|
+
if base_path.nil?
|
145
|
+
fail ArgumentError, 'base_path cannot be nil'
|
146
|
+
end
|
147
|
+
|
148
|
+
if base_path.to_s.length < 1
|
149
|
+
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
150
|
+
end
|
151
|
+
|
152
|
+
@base_path = base_path
|
153
|
+
end
|
154
|
+
|
155
|
+
# Custom attribute writer method with validation
|
156
|
+
# @param [Object] name Value to be assigned
|
157
|
+
def name=(name)
|
158
|
+
if name.nil?
|
159
|
+
fail ArgumentError, 'name cannot be nil'
|
160
|
+
end
|
161
|
+
|
162
|
+
if name.to_s.length < 1
|
163
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
164
|
+
end
|
165
|
+
|
166
|
+
@name = name
|
167
|
+
end
|
168
|
+
|
131
169
|
# Checks equality by comparing each attribute.
|
132
170
|
# @param [Object] Object to be compared
|
133
171
|
def ==(o)
|
@@ -114,6 +114,14 @@ module PulpAnsibleClient
|
|
114
114
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
115
115
|
end
|
116
116
|
|
117
|
+
if @name.to_s.length < 1
|
118
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
119
|
+
end
|
120
|
+
|
121
|
+
if !@description.nil? && @description.to_s.length < 1
|
122
|
+
invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
|
123
|
+
end
|
124
|
+
|
117
125
|
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
118
126
|
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
119
127
|
end
|
@@ -125,10 +133,36 @@ module PulpAnsibleClient
|
|
125
133
|
# @return true if the model is valid
|
126
134
|
def valid?
|
127
135
|
return false if @name.nil?
|
136
|
+
return false if @name.to_s.length < 1
|
137
|
+
return false if !@description.nil? && @description.to_s.length < 1
|
128
138
|
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
129
139
|
true
|
130
140
|
end
|
131
141
|
|
142
|
+
# Custom attribute writer method with validation
|
143
|
+
# @param [Object] name Value to be assigned
|
144
|
+
def name=(name)
|
145
|
+
if name.nil?
|
146
|
+
fail ArgumentError, 'name cannot be nil'
|
147
|
+
end
|
148
|
+
|
149
|
+
if name.to_s.length < 1
|
150
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
151
|
+
end
|
152
|
+
|
153
|
+
@name = name
|
154
|
+
end
|
155
|
+
|
156
|
+
# Custom attribute writer method with validation
|
157
|
+
# @param [Object] description Value to be assigned
|
158
|
+
def description=(description)
|
159
|
+
if !description.nil? && description.to_s.length < 1
|
160
|
+
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
|
161
|
+
end
|
162
|
+
|
163
|
+
@description = description
|
164
|
+
end
|
165
|
+
|
132
166
|
# Custom attribute writer method with validation
|
133
167
|
# @param [Object] retain_repo_versions Value to be assigned
|
134
168
|
def retain_repo_versions=(retain_repo_versions)
|
@@ -75,10 +75,18 @@ module PulpAnsibleClient
|
|
75
75
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
76
76
|
end
|
77
77
|
|
78
|
+
if @name.to_s.length < 1
|
79
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
80
|
+
end
|
81
|
+
|
78
82
|
if @namespace.nil?
|
79
83
|
invalid_properties.push('invalid value for "namespace", namespace cannot be nil.')
|
80
84
|
end
|
81
85
|
|
86
|
+
if @namespace.to_s.length < 1
|
87
|
+
invalid_properties.push('invalid value for "namespace", the character length must be great than or equal to 1.')
|
88
|
+
end
|
89
|
+
|
82
90
|
invalid_properties
|
83
91
|
end
|
84
92
|
|
@@ -86,10 +94,40 @@ module PulpAnsibleClient
|
|
86
94
|
# @return true if the model is valid
|
87
95
|
def valid?
|
88
96
|
return false if @name.nil?
|
97
|
+
return false if @name.to_s.length < 1
|
89
98
|
return false if @namespace.nil?
|
99
|
+
return false if @namespace.to_s.length < 1
|
90
100
|
true
|
91
101
|
end
|
92
102
|
|
103
|
+
# Custom attribute writer method with validation
|
104
|
+
# @param [Object] name Value to be assigned
|
105
|
+
def name=(name)
|
106
|
+
if name.nil?
|
107
|
+
fail ArgumentError, 'name cannot be nil'
|
108
|
+
end
|
109
|
+
|
110
|
+
if name.to_s.length < 1
|
111
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
112
|
+
end
|
113
|
+
|
114
|
+
@name = name
|
115
|
+
end
|
116
|
+
|
117
|
+
# Custom attribute writer method with validation
|
118
|
+
# @param [Object] namespace Value to be assigned
|
119
|
+
def namespace=(namespace)
|
120
|
+
if namespace.nil?
|
121
|
+
fail ArgumentError, 'namespace cannot be nil'
|
122
|
+
end
|
123
|
+
|
124
|
+
if namespace.to_s.length < 1
|
125
|
+
fail ArgumentError, 'invalid value for "namespace", the character length must be great than or equal to 1.'
|
126
|
+
end
|
127
|
+
|
128
|
+
@namespace = namespace
|
129
|
+
end
|
130
|
+
|
93
131
|
# Checks equality by comparing each attribute.
|
94
132
|
# @param [Object] Object to be compared
|
95
133
|
def ==(o)
|