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,411 @@
|
|
|
1
|
+
# PulpAnsibleClient::RemotesCollectionApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost:24817*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**create**](RemotesCollectionApi.md#create) | **POST** /pulp/api/v3/remotes/ansible/collection/ | Create a collection remote
|
|
8
|
+
[**delete**](RemotesCollectionApi.md#delete) | **DELETE** {collection_remote_href} | Delete a collection remote
|
|
9
|
+
[**list**](RemotesCollectionApi.md#list) | **GET** /pulp/api/v3/remotes/ansible/collection/ | List collection remotes
|
|
10
|
+
[**partial_update**](RemotesCollectionApi.md#partial_update) | **PATCH** {collection_remote_href} | Partially update a collection remote
|
|
11
|
+
[**read**](RemotesCollectionApi.md#read) | **GET** {collection_remote_href} | Inspect a collection remote
|
|
12
|
+
[**sync**](RemotesCollectionApi.md#sync) | **POST** {collection_remote_href}sync/ |
|
|
13
|
+
[**update**](RemotesCollectionApi.md#update) | **PUT** {collection_remote_href} | Update a collection remote
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## create
|
|
18
|
+
|
|
19
|
+
> CollectionRemote create(data)
|
|
20
|
+
|
|
21
|
+
Create a collection remote
|
|
22
|
+
|
|
23
|
+
ViewSet for Collection Remotes.
|
|
24
|
+
|
|
25
|
+
### Example
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
# load the gem
|
|
29
|
+
require 'pulp_ansible_client'
|
|
30
|
+
# setup authorization
|
|
31
|
+
PulpAnsibleClient.configure do |config|
|
|
32
|
+
# Configure HTTP basic authorization: Basic
|
|
33
|
+
config.username = 'YOUR USERNAME'
|
|
34
|
+
config.password = 'YOUR PASSWORD'
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
38
|
+
data = PulpAnsibleClient::CollectionRemote.new # CollectionRemote |
|
|
39
|
+
|
|
40
|
+
begin
|
|
41
|
+
#Create a collection remote
|
|
42
|
+
result = api_instance.create(data)
|
|
43
|
+
p result
|
|
44
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
45
|
+
puts "Exception when calling RemotesCollectionApi->create: #{e}"
|
|
46
|
+
end
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Parameters
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
Name | Type | Description | Notes
|
|
53
|
+
------------- | ------------- | ------------- | -------------
|
|
54
|
+
**data** | [**CollectionRemote**](CollectionRemote.md)| |
|
|
55
|
+
|
|
56
|
+
### Return type
|
|
57
|
+
|
|
58
|
+
[**CollectionRemote**](CollectionRemote.md)
|
|
59
|
+
|
|
60
|
+
### Authorization
|
|
61
|
+
|
|
62
|
+
[Basic](../README.md#Basic)
|
|
63
|
+
|
|
64
|
+
### HTTP request headers
|
|
65
|
+
|
|
66
|
+
- **Content-Type**: application/json
|
|
67
|
+
- **Accept**: application/json
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## delete
|
|
71
|
+
|
|
72
|
+
> AsyncOperationResponse delete(collection_remote_href)
|
|
73
|
+
|
|
74
|
+
Delete a collection remote
|
|
75
|
+
|
|
76
|
+
Trigger an asynchronous delete task
|
|
77
|
+
|
|
78
|
+
### Example
|
|
79
|
+
|
|
80
|
+
```ruby
|
|
81
|
+
# load the gem
|
|
82
|
+
require 'pulp_ansible_client'
|
|
83
|
+
# setup authorization
|
|
84
|
+
PulpAnsibleClient.configure do |config|
|
|
85
|
+
# Configure HTTP basic authorization: Basic
|
|
86
|
+
config.username = 'YOUR USERNAME'
|
|
87
|
+
config.password = 'YOUR PASSWORD'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
91
|
+
collection_remote_href = 'collection_remote_href_example' # String | URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
92
|
+
|
|
93
|
+
begin
|
|
94
|
+
#Delete a collection remote
|
|
95
|
+
result = api_instance.delete(collection_remote_href)
|
|
96
|
+
p result
|
|
97
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
98
|
+
puts "Exception when calling RemotesCollectionApi->delete: #{e}"
|
|
99
|
+
end
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Parameters
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
Name | Type | Description | Notes
|
|
106
|
+
------------- | ------------- | ------------- | -------------
|
|
107
|
+
**collection_remote_href** | **String**| URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/ |
|
|
108
|
+
|
|
109
|
+
### Return type
|
|
110
|
+
|
|
111
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
|
112
|
+
|
|
113
|
+
### Authorization
|
|
114
|
+
|
|
115
|
+
[Basic](../README.md#Basic)
|
|
116
|
+
|
|
117
|
+
### HTTP request headers
|
|
118
|
+
|
|
119
|
+
- **Content-Type**: Not defined
|
|
120
|
+
- **Accept**: application/json
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## list
|
|
124
|
+
|
|
125
|
+
> InlineResponse2004 list(opts)
|
|
126
|
+
|
|
127
|
+
List collection remotes
|
|
128
|
+
|
|
129
|
+
ViewSet for Collection Remotes.
|
|
130
|
+
|
|
131
|
+
### Example
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
# load the gem
|
|
135
|
+
require 'pulp_ansible_client'
|
|
136
|
+
# setup authorization
|
|
137
|
+
PulpAnsibleClient.configure do |config|
|
|
138
|
+
# Configure HTTP basic authorization: Basic
|
|
139
|
+
config.username = 'YOUR USERNAME'
|
|
140
|
+
config.password = 'YOUR PASSWORD'
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
144
|
+
opts = {
|
|
145
|
+
name: 'name_example', # String |
|
|
146
|
+
name__in: 'name__in_example', # String | Filter results where name is in a comma-separated list of values
|
|
147
|
+
_last_updated__lt: '_last_updated__lt_example', # String | Filter results where _last_updated is less than value
|
|
148
|
+
_last_updated__lte: '_last_updated__lte_example', # String | Filter results where _last_updated is less than or equal to value
|
|
149
|
+
_last_updated__gt: '_last_updated__gt_example', # String | Filter results where _last_updated is greater than value
|
|
150
|
+
_last_updated__gte: '_last_updated__gte_example', # String | Filter results where _last_updated is greater than or equal to value
|
|
151
|
+
_last_updated__range: '_last_updated__range_example', # String | Filter results where _last_updated is between two comma separated values
|
|
152
|
+
_last_updated: '_last_updated_example', # String | ISO 8601 formatted dates are supported
|
|
153
|
+
page: 56, # Integer | A page number within the paginated result set.
|
|
154
|
+
page_size: 56 # Integer | Number of results to return per page.
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
begin
|
|
158
|
+
#List collection remotes
|
|
159
|
+
result = api_instance.list(opts)
|
|
160
|
+
p result
|
|
161
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
162
|
+
puts "Exception when calling RemotesCollectionApi->list: #{e}"
|
|
163
|
+
end
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Parameters
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
Name | Type | Description | Notes
|
|
170
|
+
------------- | ------------- | ------------- | -------------
|
|
171
|
+
**name** | **String**| | [optional]
|
|
172
|
+
**name__in** | **String**| Filter results where name is in a comma-separated list of values | [optional]
|
|
173
|
+
**_last_updated__lt** | **String**| Filter results where _last_updated is less than value | [optional]
|
|
174
|
+
**_last_updated__lte** | **String**| Filter results where _last_updated is less than or equal to value | [optional]
|
|
175
|
+
**_last_updated__gt** | **String**| Filter results where _last_updated is greater than value | [optional]
|
|
176
|
+
**_last_updated__gte** | **String**| Filter results where _last_updated is greater than or equal to value | [optional]
|
|
177
|
+
**_last_updated__range** | **String**| Filter results where _last_updated is between two comma separated values | [optional]
|
|
178
|
+
**_last_updated** | **String**| ISO 8601 formatted dates are supported | [optional]
|
|
179
|
+
**page** | **Integer**| A page number within the paginated result set. | [optional]
|
|
180
|
+
**page_size** | **Integer**| Number of results to return per page. | [optional]
|
|
181
|
+
|
|
182
|
+
### Return type
|
|
183
|
+
|
|
184
|
+
[**InlineResponse2004**](InlineResponse2004.md)
|
|
185
|
+
|
|
186
|
+
### Authorization
|
|
187
|
+
|
|
188
|
+
[Basic](../README.md#Basic)
|
|
189
|
+
|
|
190
|
+
### HTTP request headers
|
|
191
|
+
|
|
192
|
+
- **Content-Type**: Not defined
|
|
193
|
+
- **Accept**: application/json
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## partial_update
|
|
197
|
+
|
|
198
|
+
> AsyncOperationResponse partial_update(collection_remote_href, data)
|
|
199
|
+
|
|
200
|
+
Partially update a collection remote
|
|
201
|
+
|
|
202
|
+
Trigger an asynchronous partial update task
|
|
203
|
+
|
|
204
|
+
### Example
|
|
205
|
+
|
|
206
|
+
```ruby
|
|
207
|
+
# load the gem
|
|
208
|
+
require 'pulp_ansible_client'
|
|
209
|
+
# setup authorization
|
|
210
|
+
PulpAnsibleClient.configure do |config|
|
|
211
|
+
# Configure HTTP basic authorization: Basic
|
|
212
|
+
config.username = 'YOUR USERNAME'
|
|
213
|
+
config.password = 'YOUR PASSWORD'
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
217
|
+
collection_remote_href = 'collection_remote_href_example' # String | URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
218
|
+
data = PulpAnsibleClient::CollectionRemote.new # CollectionRemote |
|
|
219
|
+
|
|
220
|
+
begin
|
|
221
|
+
#Partially update a collection remote
|
|
222
|
+
result = api_instance.partial_update(collection_remote_href, data)
|
|
223
|
+
p result
|
|
224
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
225
|
+
puts "Exception when calling RemotesCollectionApi->partial_update: #{e}"
|
|
226
|
+
end
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Parameters
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
Name | Type | Description | Notes
|
|
233
|
+
------------- | ------------- | ------------- | -------------
|
|
234
|
+
**collection_remote_href** | **String**| URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/ |
|
|
235
|
+
**data** | [**CollectionRemote**](CollectionRemote.md)| |
|
|
236
|
+
|
|
237
|
+
### Return type
|
|
238
|
+
|
|
239
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
|
240
|
+
|
|
241
|
+
### Authorization
|
|
242
|
+
|
|
243
|
+
[Basic](../README.md#Basic)
|
|
244
|
+
|
|
245
|
+
### HTTP request headers
|
|
246
|
+
|
|
247
|
+
- **Content-Type**: application/json
|
|
248
|
+
- **Accept**: application/json
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## read
|
|
252
|
+
|
|
253
|
+
> CollectionRemote read(collection_remote_href)
|
|
254
|
+
|
|
255
|
+
Inspect a collection remote
|
|
256
|
+
|
|
257
|
+
ViewSet for Collection Remotes.
|
|
258
|
+
|
|
259
|
+
### Example
|
|
260
|
+
|
|
261
|
+
```ruby
|
|
262
|
+
# load the gem
|
|
263
|
+
require 'pulp_ansible_client'
|
|
264
|
+
# setup authorization
|
|
265
|
+
PulpAnsibleClient.configure do |config|
|
|
266
|
+
# Configure HTTP basic authorization: Basic
|
|
267
|
+
config.username = 'YOUR USERNAME'
|
|
268
|
+
config.password = 'YOUR PASSWORD'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
272
|
+
collection_remote_href = 'collection_remote_href_example' # String | URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
273
|
+
|
|
274
|
+
begin
|
|
275
|
+
#Inspect a collection remote
|
|
276
|
+
result = api_instance.read(collection_remote_href)
|
|
277
|
+
p result
|
|
278
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
279
|
+
puts "Exception when calling RemotesCollectionApi->read: #{e}"
|
|
280
|
+
end
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Parameters
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
Name | Type | Description | Notes
|
|
287
|
+
------------- | ------------- | ------------- | -------------
|
|
288
|
+
**collection_remote_href** | **String**| URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/ |
|
|
289
|
+
|
|
290
|
+
### Return type
|
|
291
|
+
|
|
292
|
+
[**CollectionRemote**](CollectionRemote.md)
|
|
293
|
+
|
|
294
|
+
### Authorization
|
|
295
|
+
|
|
296
|
+
[Basic](../README.md#Basic)
|
|
297
|
+
|
|
298
|
+
### HTTP request headers
|
|
299
|
+
|
|
300
|
+
- **Content-Type**: Not defined
|
|
301
|
+
- **Accept**: application/json
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
## sync
|
|
305
|
+
|
|
306
|
+
> AsyncOperationResponse sync(collection_remote_href, data)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
Trigger an asynchronous task to sync Collection content.
|
|
311
|
+
|
|
312
|
+
### Example
|
|
313
|
+
|
|
314
|
+
```ruby
|
|
315
|
+
# load the gem
|
|
316
|
+
require 'pulp_ansible_client'
|
|
317
|
+
# setup authorization
|
|
318
|
+
PulpAnsibleClient.configure do |config|
|
|
319
|
+
# Configure HTTP basic authorization: Basic
|
|
320
|
+
config.username = 'YOUR USERNAME'
|
|
321
|
+
config.password = 'YOUR PASSWORD'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
325
|
+
collection_remote_href = 'collection_remote_href_example' # String | URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
326
|
+
data = PulpAnsibleClient::RepositorySyncURL.new # RepositorySyncURL |
|
|
327
|
+
|
|
328
|
+
begin
|
|
329
|
+
result = api_instance.sync(collection_remote_href, data)
|
|
330
|
+
p result
|
|
331
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
332
|
+
puts "Exception when calling RemotesCollectionApi->sync: #{e}"
|
|
333
|
+
end
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Parameters
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
Name | Type | Description | Notes
|
|
340
|
+
------------- | ------------- | ------------- | -------------
|
|
341
|
+
**collection_remote_href** | **String**| URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/ |
|
|
342
|
+
**data** | [**RepositorySyncURL**](RepositorySyncURL.md)| |
|
|
343
|
+
|
|
344
|
+
### Return type
|
|
345
|
+
|
|
346
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
|
347
|
+
|
|
348
|
+
### Authorization
|
|
349
|
+
|
|
350
|
+
[Basic](../README.md#Basic)
|
|
351
|
+
|
|
352
|
+
### HTTP request headers
|
|
353
|
+
|
|
354
|
+
- **Content-Type**: application/json
|
|
355
|
+
- **Accept**: application/json
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## update
|
|
359
|
+
|
|
360
|
+
> AsyncOperationResponse update(collection_remote_href, data)
|
|
361
|
+
|
|
362
|
+
Update a collection remote
|
|
363
|
+
|
|
364
|
+
Trigger an asynchronous update task
|
|
365
|
+
|
|
366
|
+
### Example
|
|
367
|
+
|
|
368
|
+
```ruby
|
|
369
|
+
# load the gem
|
|
370
|
+
require 'pulp_ansible_client'
|
|
371
|
+
# setup authorization
|
|
372
|
+
PulpAnsibleClient.configure do |config|
|
|
373
|
+
# Configure HTTP basic authorization: Basic
|
|
374
|
+
config.username = 'YOUR USERNAME'
|
|
375
|
+
config.password = 'YOUR PASSWORD'
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
api_instance = PulpAnsibleClient::RemotesCollectionApi.new
|
|
379
|
+
collection_remote_href = 'collection_remote_href_example' # String | URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/
|
|
380
|
+
data = PulpAnsibleClient::CollectionRemote.new # CollectionRemote |
|
|
381
|
+
|
|
382
|
+
begin
|
|
383
|
+
#Update a collection remote
|
|
384
|
+
result = api_instance.update(collection_remote_href, data)
|
|
385
|
+
p result
|
|
386
|
+
rescue PulpAnsibleClient::ApiError => e
|
|
387
|
+
puts "Exception when calling RemotesCollectionApi->update: #{e}"
|
|
388
|
+
end
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Parameters
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
Name | Type | Description | Notes
|
|
395
|
+
------------- | ------------- | ------------- | -------------
|
|
396
|
+
**collection_remote_href** | **String**| URI of Collection Remote. e.g.: /pulp/api/v3/remotes/ansible/collection/1/ |
|
|
397
|
+
**data** | [**CollectionRemote**](CollectionRemote.md)| |
|
|
398
|
+
|
|
399
|
+
### Return type
|
|
400
|
+
|
|
401
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
|
402
|
+
|
|
403
|
+
### Authorization
|
|
404
|
+
|
|
405
|
+
[Basic](../README.md#Basic)
|
|
406
|
+
|
|
407
|
+
### HTTP request headers
|
|
408
|
+
|
|
409
|
+
- **Content-Type**: application/json
|
|
410
|
+
- **Accept**: application/json
|
|
411
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# PulpAnsibleClient::RepositorySyncURL
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**repository** | **String** | A URI of the repository to be synchronized. |
|
|
8
|
+
**mirror** | **Boolean** | If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only. | [optional] [default to false]
|
|
9
|
+
|
|
10
|
+
## Code Sample
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'PulpAnsibleClient'
|
|
14
|
+
|
|
15
|
+
instance = PulpAnsibleClient::RepositorySyncURL.new(repository: null,
|
|
16
|
+
mirror: null)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
data/docs/Role.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# PulpAnsibleClient::Role
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
Name | Type | Description | Notes
|
|
6
|
+
------------ | ------------- | ------------- | -------------
|
|
7
|
+
**_created** | **DateTime** | Timestamp of creation. | [optional]
|
|
8
|
+
**_artifact** | **String** | Artifact file representing the physical content |
|
|
9
|
+
**_href** | **String** | | [optional]
|
|
10
|
+
**_type** | **String** | | [optional]
|
|
11
|
+
**version** | **String** | |
|
|
12
|
+
**name** | **String** | |
|
|
13
|
+
**namespace** | **String** | |
|
|
14
|
+
|
|
15
|
+
## Code Sample
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'PulpAnsibleClient'
|
|
19
|
+
|
|
20
|
+
instance = PulpAnsibleClient::Role.new(_created: null,
|
|
21
|
+
_artifact: null,
|
|
22
|
+
_href: null,
|
|
23
|
+
_type: null,
|
|
24
|
+
version: null,
|
|
25
|
+
name: null,
|
|
26
|
+
namespace: null)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
|
data/git_push.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Generated by: https://openapi-generator.tech
|
|
4
|
+
#
|
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
|
+
#
|
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
|
8
|
+
|
|
9
|
+
git_user_id=$1
|
|
10
|
+
git_repo_id=$2
|
|
11
|
+
release_note=$3
|
|
12
|
+
|
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
|
14
|
+
git_user_id="GIT_USER_ID"
|
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ "$release_note" = "" ]; then
|
|
24
|
+
release_note="Minor update"
|
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Initialize the local directory as a Git repository
|
|
29
|
+
git init
|
|
30
|
+
|
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
35
|
+
git commit -m "$release_note"
|
|
36
|
+
|
|
37
|
+
# Sets the new remote
|
|
38
|
+
git_remote=`git remote`
|
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
40
|
+
|
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
44
|
+
else
|
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
git pull origin master
|
|
51
|
+
|
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
|
55
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
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 AnsibleCollectionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Upload a collection
|
|
23
|
+
# Create an artifact and trigger an asynchronous task to create Collection content from it.
|
|
24
|
+
# @param file [File] The Collection tarball.
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
|
|
27
|
+
# @return [AsyncOperationResponse]
|
|
28
|
+
def upload_collection(file, opts = {})
|
|
29
|
+
data, _status_code, _headers = upload_collection_with_http_info(file, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Upload a collection
|
|
34
|
+
# Create an artifact and trigger an asynchronous task to create Collection content from it.
|
|
35
|
+
# @param file [File] The Collection tarball.
|
|
36
|
+
# @param [Hash] opts the optional parameters
|
|
37
|
+
# @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
|
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
39
|
+
def upload_collection_with_http_info(file, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.upload_collection ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'file' is set
|
|
44
|
+
if @api_client.config.client_side_validation && file.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling AnsibleCollectionsApi.upload_collection"
|
|
46
|
+
end
|
|
47
|
+
if @api_client.config.client_side_validation && !opts[:'sha256'].nil? && opts[:'sha256'].to_s.length < 1
|
|
48
|
+
fail ArgumentError, 'invalid value for "opts[:"sha256"]" when calling AnsibleCollectionsApi.upload_collection, the character length must be great than or equal to 1.'
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/ansible/collections/'
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
|
63
|
+
|
|
64
|
+
# form parameters
|
|
65
|
+
form_params = opts[:form_params] || {}
|
|
66
|
+
form_params['file'] = file
|
|
67
|
+
form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
|
|
68
|
+
|
|
69
|
+
# http body (model)
|
|
70
|
+
post_body = opts[:body]
|
|
71
|
+
|
|
72
|
+
# return_type
|
|
73
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
74
|
+
|
|
75
|
+
# auth_names
|
|
76
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
77
|
+
|
|
78
|
+
new_options = opts.merge(
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug "API called: AnsibleCollectionsApi#upload_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|