pulp_ansible_client 0.2.0b5 → 0.2.0b6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +43 -23
  3. data/docs/{AnsibleDistribution.md → AnsibleAnsibleDistribution.md} +6 -6
  4. data/docs/AnsibleAnsibleRemote.md +39 -0
  5. data/docs/AnsibleAnsibleRepository.md +27 -0
  6. data/docs/AnsibleCollection.md +19 -0
  7. data/docs/AnsibleCollectionRemote.md +41 -0
  8. data/docs/AnsibleCollectionVersion.md +67 -0
  9. data/docs/AnsibleCollectionsApi.md +80 -18
  10. data/docs/AnsibleRole.md +27 -0
  11. data/docs/AnsibleTag.md +17 -0
  12. data/docs/Collection.md +31 -0
  13. data/docs/CollectionImportDetail.md +2 -2
  14. data/docs/CollectionMetadata.md +9 -9
  15. data/docs/{TagNested.md → CollectionNamespace.md} +3 -3
  16. data/docs/CollectionRef.md +21 -0
  17. data/docs/CollectionVersion.md +19 -59
  18. data/docs/ContentCollectionVersionsApi.md +25 -27
  19. data/docs/ContentRolesApi.md +17 -25
  20. data/docs/ContentSummary.md +21 -0
  21. data/docs/DistributionsAnsibleApi.md +16 -12
  22. data/docs/GalaxyCollection.md +2 -2
  23. data/docs/GalaxyCollectionVersion.md +4 -4
  24. data/docs/GalaxyRole.md +1 -1
  25. data/docs/GalaxyRoleVersion.md +1 -1
  26. data/docs/InlineResponse200.md +1 -1
  27. data/docs/InlineResponse2001.md +1 -1
  28. data/docs/InlineResponse20010.md +23 -0
  29. data/docs/InlineResponse20011.md +23 -0
  30. data/docs/InlineResponse20012.md +23 -0
  31. data/docs/InlineResponse20013.md +23 -0
  32. data/docs/InlineResponse2002.md +1 -1
  33. data/docs/InlineResponse2003.md +1 -1
  34. data/docs/InlineResponse2004.md +1 -1
  35. data/docs/InlineResponse2005.md +1 -1
  36. data/docs/InlineResponse2006.md +1 -1
  37. data/docs/InlineResponse2007.md +1 -1
  38. data/docs/InlineResponse2008.md +1 -1
  39. data/docs/InlineResponse2009.md +1 -1
  40. data/docs/PulpAnsibleApiApi.md +3 -1
  41. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +16 -9
  42. data/docs/PulpAnsibleGalaxyApiRolesApi.md +5 -3
  43. data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +5 -3
  44. data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +5 -3
  45. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +28 -10
  46. data/docs/PulpAnsibleTagsApi.md +5 -3
  47. data/docs/RemotesAnsibleApi.md +30 -81
  48. data/docs/RemotesCollectionApi.md +30 -81
  49. data/docs/RepositoriesAnsibleApi.md +409 -0
  50. data/docs/RepositoriesAnsibleVersionsApi.md +214 -0
  51. data/docs/RepositorySyncURL.md +2 -2
  52. data/docs/RepositoryVersion.md +25 -0
  53. data/docs/Tag.md +1 -1
  54. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +103 -35
  55. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +40 -57
  56. data/lib/pulp_ansible_client/api/content_roles_api.rb +28 -58
  57. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +19 -13
  58. data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +4 -1
  59. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +20 -9
  60. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +7 -4
  61. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +7 -4
  62. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +7 -4
  63. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +59 -12
  64. data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +7 -4
  65. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +40 -102
  66. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +40 -102
  67. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +498 -0
  68. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +268 -0
  69. data/lib/pulp_ansible_client/api_client.rb +1 -1
  70. data/lib/pulp_ansible_client/api_error.rb +1 -1
  71. data/lib/pulp_ansible_client/configuration.rb +1 -1
  72. data/lib/pulp_ansible_client/models/{ansible_distribution.rb → ansible_ansible_distribution.rb} +31 -36
  73. data/lib/pulp_ansible_client/models/{ansible_remote.rb → ansible_ansible_remote.rb} +87 -147
  74. data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +294 -0
  75. data/lib/pulp_ansible_client/models/ansible_collection.rb +265 -0
  76. data/lib/pulp_ansible_client/models/{collection_remote.rb → ansible_collection_remote.rb} +88 -147
  77. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +816 -0
  78. data/lib/pulp_ansible_client/models/{role.rb → ansible_role.rb} +31 -60
  79. data/lib/pulp_ansible_client/models/{tag_nested.rb → ansible_tag.rb} +15 -5
  80. data/lib/pulp_ansible_client/models/async_operation_response.rb +12 -2
  81. data/lib/pulp_ansible_client/models/collection.rb +314 -0
  82. data/lib/pulp_ansible_client/models/collection_import_detail.rb +14 -4
  83. data/lib/pulp_ansible_client/models/collection_metadata.rb +14 -4
  84. data/lib/pulp_ansible_client/models/collection_namespace.rb +230 -0
  85. data/lib/pulp_ansible_client/models/collection_ref.rb +272 -0
  86. data/lib/pulp_ansible_client/models/collection_version.rb +109 -536
  87. data/lib/pulp_ansible_client/models/content_summary.rb +246 -0
  88. data/lib/pulp_ansible_client/models/galaxy_collection.rb +12 -2
  89. data/lib/pulp_ansible_client/models/galaxy_collection_version.rb +12 -2
  90. data/lib/pulp_ansible_client/models/galaxy_role.rb +12 -2
  91. data/lib/pulp_ansible_client/models/galaxy_role_version.rb +12 -2
  92. data/lib/pulp_ansible_client/models/inline_response200.rb +15 -3
  93. data/lib/pulp_ansible_client/models/inline_response2001.rb +15 -3
  94. data/lib/pulp_ansible_client/models/inline_response20010.rb +247 -0
  95. data/lib/pulp_ansible_client/models/inline_response20011.rb +247 -0
  96. data/lib/pulp_ansible_client/models/inline_response20012.rb +247 -0
  97. data/lib/pulp_ansible_client/models/inline_response20013.rb +247 -0
  98. data/lib/pulp_ansible_client/models/inline_response2002.rb +15 -3
  99. data/lib/pulp_ansible_client/models/inline_response2003.rb +15 -3
  100. data/lib/pulp_ansible_client/models/inline_response2004.rb +15 -3
  101. data/lib/pulp_ansible_client/models/inline_response2005.rb +15 -3
  102. data/lib/pulp_ansible_client/models/inline_response2006.rb +15 -3
  103. data/lib/pulp_ansible_client/models/inline_response2007.rb +15 -3
  104. data/lib/pulp_ansible_client/models/inline_response2008.rb +15 -3
  105. data/lib/pulp_ansible_client/models/inline_response2009.rb +15 -3
  106. data/lib/pulp_ansible_client/models/repository_sync_url.rb +22 -12
  107. data/lib/pulp_ansible_client/models/repository_version.rb +244 -0
  108. data/lib/pulp_ansible_client/models/tag.rb +12 -2
  109. data/lib/pulp_ansible_client/version.rb +2 -2
  110. data/lib/pulp_ansible_client.rb +20 -6
  111. data/pulp_ansible_client.gemspec +1 -1
  112. data/spec/api/ansible_collections_api_spec.rb +25 -10
  113. data/spec/api/content_collection_versions_api_spec.rb +12 -12
  114. data/spec/api/content_roles_api_spec.rb +8 -11
  115. data/spec/api/distributions_ansible_api_spec.rb +5 -3
  116. data/spec/api/pulp_ansible_api_api_spec.rb +2 -1
  117. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +6 -3
  118. data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +3 -2
  119. data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +3 -2
  120. data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +3 -2
  121. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +12 -4
  122. data/spec/api/pulp_ansible_tags_api_spec.rb +3 -2
  123. data/spec/api/remotes_ansible_api_spec.rb +12 -22
  124. data/spec/api/remotes_collection_api_spec.rb +12 -22
  125. data/spec/api/repositories_ansible_api_spec.rb +128 -0
  126. data/spec/api/repositories_ansible_versions_api_spec.rb +91 -0
  127. data/spec/api_client_spec.rb +2 -2
  128. data/spec/configuration_spec.rb +1 -1
  129. data/spec/models/{ansible_distribution_spec.rb → ansible_ansible_distribution_spec.rb} +9 -9
  130. data/spec/models/{collection_remote_spec.rb → ansible_ansible_remote_spec.rb} +14 -38
  131. data/spec/models/ansible_ansible_repository_spec.rb +71 -0
  132. data/spec/models/{ansible_remote_spec.rb → ansible_collection_remote_spec.rb} +20 -32
  133. data/spec/models/ansible_collection_spec.rb +47 -0
  134. data/spec/models/ansible_collection_version_spec.rb +191 -0
  135. data/spec/models/ansible_role_spec.rb +71 -0
  136. data/spec/models/{tag_nested_spec.rb → ansible_tag_spec.rb} +7 -7
  137. data/spec/models/async_operation_response_spec.rb +1 -1
  138. data/spec/models/collection_import_detail_spec.rb +1 -1
  139. data/spec/models/collection_metadata_spec.rb +1 -1
  140. data/spec/models/collection_namespace_spec.rb +41 -0
  141. data/spec/models/collection_ref_spec.rb +53 -0
  142. data/spec/models/{role_spec.rb → collection_spec.rb} +15 -21
  143. data/spec/models/collection_version_spec.rb +14 -130
  144. data/spec/models/content_summary_spec.rb +53 -0
  145. data/spec/models/galaxy_collection_spec.rb +1 -1
  146. data/spec/models/galaxy_collection_version_spec.rb +1 -1
  147. data/spec/models/galaxy_role_spec.rb +1 -1
  148. data/spec/models/galaxy_role_version_spec.rb +1 -1
  149. data/spec/models/inline_response20010_spec.rb +59 -0
  150. data/spec/models/inline_response20011_spec.rb +59 -0
  151. data/spec/models/inline_response20012_spec.rb +59 -0
  152. data/spec/models/inline_response20013_spec.rb +59 -0
  153. data/spec/models/inline_response2001_spec.rb +1 -1
  154. data/spec/models/inline_response2002_spec.rb +1 -1
  155. data/spec/models/inline_response2003_spec.rb +1 -1
  156. data/spec/models/inline_response2004_spec.rb +1 -1
  157. data/spec/models/inline_response2005_spec.rb +1 -1
  158. data/spec/models/inline_response2006_spec.rb +1 -1
  159. data/spec/models/inline_response2007_spec.rb +1 -1
  160. data/spec/models/inline_response2008_spec.rb +1 -1
  161. data/spec/models/inline_response2009_spec.rb +1 -1
  162. data/spec/models/inline_response200_spec.rb +1 -1
  163. data/spec/models/repository_sync_url_spec.rb +2 -2
  164. data/spec/models/repository_version_spec.rb +65 -0
  165. data/spec/models/tag_spec.rb +1 -1
  166. data/spec/spec_helper.rb +1 -1
  167. metadata +78 -22
  168. data/docs/AnsibleRemote.md +0 -45
  169. data/docs/CollectionRemote.md +0 -47
  170. data/docs/Role.md +0 -33
@@ -0,0 +1,498 @@
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.2.2-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpAnsibleClient
16
+ class RepositoriesAnsibleApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an ansible repository
23
+ # ViewSet for Ansible Remotes.
24
+ # @param data [AnsibleAnsibleRepository]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [AnsibleAnsibleRepository]
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 repository
33
+ # ViewSet for Ansible Remotes.
34
+ # @param data [AnsibleAnsibleRepository]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(AnsibleAnsibleRepository, Integer, Hash)>] AnsibleAnsibleRepository 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: RepositoriesAnsibleApi.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 RepositoriesAnsibleApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/repositories/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] || 'AnsibleAnsibleRepository'
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: RepositoriesAnsibleApi#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 repository
87
+ # Trigger an asynchronous task to delete a repository.
88
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(ansible_repository_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(ansible_repository_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete an ansible repository
97
+ # Trigger an asynchronous task to delete a repository.
98
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/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_repository_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.delete ...'
104
+ end
105
+ # verify the required parameter 'ansible_repository_href' is set
106
+ if @api_client.config.client_side_validation && ansible_repository_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_href' when calling RepositoriesAnsibleApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{ansible_repository_href}'.sub('{' + 'ansible_repository_href' + '}', CGI.escape(ansible_repository_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] || ['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: RepositoriesAnsibleApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List ansible repositorys
149
+ # ViewSet for Ansible 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 [Integer] :limit Number of results to return per page.
154
+ # @option opts [Integer] :offset The initial index from which to return the results.
155
+ # @option opts [String] :fields A list of fields to include in the response.
156
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
157
+ # @return [InlineResponse2007]
158
+ def list(opts = {})
159
+ data, _status_code, _headers = list_with_http_info(opts)
160
+ data
161
+ end
162
+
163
+ # List ansible repositorys
164
+ # ViewSet for Ansible Remotes.
165
+ # @param [Hash] opts the optional parameters
166
+ # @option opts [String] :name
167
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
168
+ # @option opts [Integer] :limit Number of results to return per page.
169
+ # @option opts [Integer] :offset The initial index from which to return the results.
170
+ # @option opts [String] :fields A list of fields to include in the response.
171
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
172
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
173
+ def list_with_http_info(opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.list ...'
176
+ end
177
+ # resource path
178
+ local_var_path = '/pulp/api/v3/repositories/ansible/ansible/'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
183
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
184
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
185
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
186
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
187
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
188
+
189
+ # header parameters
190
+ header_params = opts[:header_params] || {}
191
+ # HTTP header 'Accept' (if needed)
192
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
193
+
194
+ # form parameters
195
+ form_params = opts[:form_params] || {}
196
+
197
+ # http body (model)
198
+ post_body = opts[:body]
199
+
200
+ # return_type
201
+ return_type = opts[:return_type] || 'InlineResponse2007'
202
+
203
+ # auth_names
204
+ auth_names = opts[:auth_names] || ['Basic']
205
+
206
+ new_options = opts.merge(
207
+ :header_params => header_params,
208
+ :query_params => query_params,
209
+ :form_params => form_params,
210
+ :body => post_body,
211
+ :auth_names => auth_names,
212
+ :return_type => return_type
213
+ )
214
+
215
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
+ end
219
+ return data, status_code, headers
220
+ end
221
+
222
+ # Partially update an ansible repository
223
+ # ViewSet for Ansible Remotes.
224
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
225
+ # @param data [AnsibleAnsibleRepository]
226
+ # @param [Hash] opts the optional parameters
227
+ # @return [AnsibleAnsibleRepository]
228
+ def partial_update(ansible_repository_href, data, opts = {})
229
+ data, _status_code, _headers = partial_update_with_http_info(ansible_repository_href, data, opts)
230
+ data
231
+ end
232
+
233
+ # Partially update an ansible repository
234
+ # ViewSet for Ansible Remotes.
235
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
236
+ # @param data [AnsibleAnsibleRepository]
237
+ # @param [Hash] opts the optional parameters
238
+ # @return [Array<(AnsibleAnsibleRepository, Integer, Hash)>] AnsibleAnsibleRepository data, response status code and response headers
239
+ def partial_update_with_http_info(ansible_repository_href, data, opts = {})
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.partial_update ...'
242
+ end
243
+ # verify the required parameter 'ansible_repository_href' is set
244
+ if @api_client.config.client_side_validation && ansible_repository_href.nil?
245
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_href' when calling RepositoriesAnsibleApi.partial_update"
246
+ end
247
+ # verify the required parameter 'data' is set
248
+ if @api_client.config.client_side_validation && data.nil?
249
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAnsibleApi.partial_update"
250
+ end
251
+ # resource path
252
+ local_var_path = '{ansible_repository_href}'.sub('{' + 'ansible_repository_href' + '}', CGI.escape(ansible_repository_href.to_s).gsub('%2F', '/'))
253
+
254
+ # query parameters
255
+ query_params = opts[:query_params] || {}
256
+
257
+ # header parameters
258
+ header_params = opts[:header_params] || {}
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+ # HTTP header 'Content-Type'
262
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
263
+
264
+ # form parameters
265
+ form_params = opts[:form_params] || {}
266
+
267
+ # http body (model)
268
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
269
+
270
+ # return_type
271
+ return_type = opts[:return_type] || 'AnsibleAnsibleRepository'
272
+
273
+ # auth_names
274
+ auth_names = opts[:auth_names] || ['Basic']
275
+
276
+ new_options = opts.merge(
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => return_type
283
+ )
284
+
285
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
288
+ end
289
+ return data, status_code, headers
290
+ end
291
+
292
+ # Inspect an ansible repository
293
+ # ViewSet for Ansible Remotes.
294
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
295
+ # @param [Hash] opts the optional parameters
296
+ # @option opts [String] :fields A list of fields to include in the response.
297
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
298
+ # @return [AnsibleAnsibleRepository]
299
+ def read(ansible_repository_href, opts = {})
300
+ data, _status_code, _headers = read_with_http_info(ansible_repository_href, opts)
301
+ data
302
+ end
303
+
304
+ # Inspect an ansible repository
305
+ # ViewSet for Ansible Remotes.
306
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
307
+ # @param [Hash] opts the optional parameters
308
+ # @option opts [String] :fields A list of fields to include in the response.
309
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
310
+ # @return [Array<(AnsibleAnsibleRepository, Integer, Hash)>] AnsibleAnsibleRepository data, response status code and response headers
311
+ def read_with_http_info(ansible_repository_href, opts = {})
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.read ...'
314
+ end
315
+ # verify the required parameter 'ansible_repository_href' is set
316
+ if @api_client.config.client_side_validation && ansible_repository_href.nil?
317
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_href' when calling RepositoriesAnsibleApi.read"
318
+ end
319
+ # resource path
320
+ local_var_path = '{ansible_repository_href}'.sub('{' + 'ansible_repository_href' + '}', CGI.escape(ansible_repository_href.to_s).gsub('%2F', '/'))
321
+
322
+ # query parameters
323
+ query_params = opts[:query_params] || {}
324
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
325
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
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] || 'AnsibleAnsibleRepository'
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: RepositoriesAnsibleApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
356
+ end
357
+ return data, status_code, headers
358
+ end
359
+
360
+ # Trigger an asynchronous task to sync Ansible content.
361
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
362
+ # @param data [RepositorySyncURL]
363
+ # @param [Hash] opts the optional parameters
364
+ # @return [AsyncOperationResponse]
365
+ def sync(ansible_repository_href, data, opts = {})
366
+ data, _status_code, _headers = sync_with_http_info(ansible_repository_href, data, opts)
367
+ data
368
+ end
369
+
370
+ # Trigger an asynchronous task to sync Ansible content.
371
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
372
+ # @param data [RepositorySyncURL]
373
+ # @param [Hash] opts the optional parameters
374
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
375
+ def sync_with_http_info(ansible_repository_href, data, opts = {})
376
+ if @api_client.config.debugging
377
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.sync ...'
378
+ end
379
+ # verify the required parameter 'ansible_repository_href' is set
380
+ if @api_client.config.client_side_validation && ansible_repository_href.nil?
381
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_href' when calling RepositoriesAnsibleApi.sync"
382
+ end
383
+ # verify the required parameter 'data' is set
384
+ if @api_client.config.client_side_validation && data.nil?
385
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAnsibleApi.sync"
386
+ end
387
+ # resource path
388
+ local_var_path = '{ansible_repository_href}sync/'.sub('{' + 'ansible_repository_href' + '}', CGI.escape(ansible_repository_href.to_s).gsub('%2F', '/'))
389
+
390
+ # query parameters
391
+ query_params = opts[:query_params] || {}
392
+
393
+ # header parameters
394
+ header_params = opts[:header_params] || {}
395
+ # HTTP header 'Accept' (if needed)
396
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
397
+ # HTTP header 'Content-Type'
398
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
399
+
400
+ # form parameters
401
+ form_params = opts[:form_params] || {}
402
+
403
+ # http body (model)
404
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
405
+
406
+ # return_type
407
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
408
+
409
+ # auth_names
410
+ auth_names = opts[:auth_names] || ['Basic']
411
+
412
+ new_options = opts.merge(
413
+ :header_params => header_params,
414
+ :query_params => query_params,
415
+ :form_params => form_params,
416
+ :body => post_body,
417
+ :auth_names => auth_names,
418
+ :return_type => return_type
419
+ )
420
+
421
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
422
+ if @api_client.config.debugging
423
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
424
+ end
425
+ return data, status_code, headers
426
+ end
427
+
428
+ # Update an ansible repository
429
+ # Trigger an asynchronous task to update a repository.
430
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
431
+ # @param data [AnsibleAnsibleRepository]
432
+ # @param [Hash] opts the optional parameters
433
+ # @return [AsyncOperationResponse]
434
+ def update(ansible_repository_href, data, opts = {})
435
+ data, _status_code, _headers = update_with_http_info(ansible_repository_href, data, opts)
436
+ data
437
+ end
438
+
439
+ # Update an ansible repository
440
+ # Trigger an asynchronous task to update a repository.
441
+ # @param ansible_repository_href [String] URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
442
+ # @param data [AnsibleAnsibleRepository]
443
+ # @param [Hash] opts the optional parameters
444
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
445
+ def update_with_http_info(ansible_repository_href, data, opts = {})
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug 'Calling API: RepositoriesAnsibleApi.update ...'
448
+ end
449
+ # verify the required parameter 'ansible_repository_href' is set
450
+ if @api_client.config.client_side_validation && ansible_repository_href.nil?
451
+ fail ArgumentError, "Missing the required parameter 'ansible_repository_href' when calling RepositoriesAnsibleApi.update"
452
+ end
453
+ # verify the required parameter 'data' is set
454
+ if @api_client.config.client_side_validation && data.nil?
455
+ fail ArgumentError, "Missing the required parameter 'data' when calling RepositoriesAnsibleApi.update"
456
+ end
457
+ # resource path
458
+ local_var_path = '{ansible_repository_href}'.sub('{' + 'ansible_repository_href' + '}', CGI.escape(ansible_repository_href.to_s).gsub('%2F', '/'))
459
+
460
+ # query parameters
461
+ query_params = opts[:query_params] || {}
462
+
463
+ # header parameters
464
+ header_params = opts[:header_params] || {}
465
+ # HTTP header 'Accept' (if needed)
466
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
467
+ # HTTP header 'Content-Type'
468
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
469
+
470
+ # form parameters
471
+ form_params = opts[:form_params] || {}
472
+
473
+ # http body (model)
474
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
475
+
476
+ # return_type
477
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
478
+
479
+ # auth_names
480
+ auth_names = opts[:auth_names] || ['Basic']
481
+
482
+ new_options = opts.merge(
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: RepositoriesAnsibleApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+ end
498
+ end