pulp_file_client 0.1.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.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README.md +127 -0
  5. data/Rakefile +10 -0
  6. data/docs/AsyncOperationResponse.md +17 -0
  7. data/docs/ContentFilesApi.md +184 -0
  8. data/docs/DistributionsFileApi.md +352 -0
  9. data/docs/FileContent.md +37 -0
  10. data/docs/FileDistribution.md +29 -0
  11. data/docs/FilePublication.md +31 -0
  12. data/docs/FileRemote.md +45 -0
  13. data/docs/InlineResponse200.md +23 -0
  14. data/docs/InlineResponse2001.md +23 -0
  15. data/docs/InlineResponse2002.md +23 -0
  16. data/docs/InlineResponse2003.md +23 -0
  17. data/docs/PublicationsFileApi.md +229 -0
  18. data/docs/RemotesFileApi.md +411 -0
  19. data/docs/RepositorySyncURL.md +19 -0
  20. data/git_push.sh +55 -0
  21. data/lib/pulp_file_client/api/content_files_api.rb +225 -0
  22. data/lib/pulp_file_client/api/distributions_file_api.rb +430 -0
  23. data/lib/pulp_file_client/api/publications_file_api.rb +273 -0
  24. data/lib/pulp_file_client/api/remotes_file_api.rb +504 -0
  25. data/lib/pulp_file_client/api_client.rb +387 -0
  26. data/lib/pulp_file_client/api_error.rb +57 -0
  27. data/lib/pulp_file_client/configuration.rb +251 -0
  28. data/lib/pulp_file_client/models/async_operation_response.rb +202 -0
  29. data/lib/pulp_file_client/models/file_content.rb +429 -0
  30. data/lib/pulp_file_client/models/file_distribution.rb +337 -0
  31. data/lib/pulp_file_client/models/file_publication.rb +297 -0
  32. data/lib/pulp_file_client/models/file_remote.rb +539 -0
  33. data/lib/pulp_file_client/models/inline_response200.rb +235 -0
  34. data/lib/pulp_file_client/models/inline_response2001.rb +235 -0
  35. data/lib/pulp_file_client/models/inline_response2002.rb +235 -0
  36. data/lib/pulp_file_client/models/inline_response2003.rb +235 -0
  37. data/lib/pulp_file_client/models/repository_sync_url.rb +214 -0
  38. data/lib/pulp_file_client/version.rb +15 -0
  39. data/lib/pulp_file_client.rb +53 -0
  40. data/pulp_file_client.gemspec +45 -0
  41. data/spec/api/content_files_api_spec.rb +77 -0
  42. data/spec/api/distributions_file_api_spec.rb +116 -0
  43. data/spec/api/publications_file_api_spec.rb +85 -0
  44. data/spec/api/remotes_file_api_spec.rb +130 -0
  45. data/spec/api_client_spec.rb +226 -0
  46. data/spec/configuration_spec.rb +42 -0
  47. data/spec/models/async_operation_response_spec.rb +41 -0
  48. data/spec/models/file_content_spec.rb +101 -0
  49. data/spec/models/file_distribution_spec.rb +77 -0
  50. data/spec/models/file_publication_spec.rb +83 -0
  51. data/spec/models/file_remote_spec.rb +129 -0
  52. data/spec/models/inline_response2001_spec.rb +59 -0
  53. data/spec/models/inline_response2002_spec.rb +59 -0
  54. data/spec/models/inline_response2003_spec.rb +59 -0
  55. data/spec/models/inline_response200_spec.rb +59 -0
  56. data/spec/models/repository_sync_url_spec.rb +47 -0
  57. data/spec/spec_helper.rb +111 -0
  58. metadata +297 -0
@@ -0,0 +1,229 @@
1
+ # PulpFileClient::PublicationsFileApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create**](PublicationsFileApi.md#create) | **POST** /pulp/api/v3/publications/file/file/ | Create a file publication
8
+ [**delete**](PublicationsFileApi.md#delete) | **DELETE** {file_publication_href} | Delete a file publication
9
+ [**list**](PublicationsFileApi.md#list) | **GET** /pulp/api/v3/publications/file/file/ | List file publications
10
+ [**read**](PublicationsFileApi.md#read) | **GET** {file_publication_href} | Inspect a file publication
11
+
12
+
13
+
14
+ ## create
15
+
16
+ > AsyncOperationResponse create(data)
17
+
18
+ Create a file publication
19
+
20
+ Trigger an asynchronous task to publish file content.
21
+
22
+ ### Example
23
+
24
+ ```ruby
25
+ # load the gem
26
+ require 'pulp_file_client'
27
+ # setup authorization
28
+ PulpFileClient.configure do |config|
29
+ # Configure HTTP basic authorization: Basic
30
+ config.username = 'YOUR USERNAME'
31
+ config.password = 'YOUR PASSWORD'
32
+ end
33
+
34
+ api_instance = PulpFileClient::PublicationsFileApi.new
35
+ data = PulpFileClient::FilePublication.new # FilePublication |
36
+
37
+ begin
38
+ #Create a file publication
39
+ result = api_instance.create(data)
40
+ p result
41
+ rescue PulpFileClient::ApiError => e
42
+ puts "Exception when calling PublicationsFileApi->create: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **data** | [**FilePublication**](FilePublication.md)| |
52
+
53
+ ### Return type
54
+
55
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [Basic](../README.md#Basic)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: application/json
64
+ - **Accept**: application/json
65
+
66
+
67
+ ## delete
68
+
69
+ > delete(file_publication_href)
70
+
71
+ Delete a file publication
72
+
73
+ <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
74
+
75
+ ### Example
76
+
77
+ ```ruby
78
+ # load the gem
79
+ require 'pulp_file_client'
80
+ # setup authorization
81
+ PulpFileClient.configure do |config|
82
+ # Configure HTTP basic authorization: Basic
83
+ config.username = 'YOUR USERNAME'
84
+ config.password = 'YOUR PASSWORD'
85
+ end
86
+
87
+ api_instance = PulpFileClient::PublicationsFileApi.new
88
+ file_publication_href = 'file_publication_href_example' # String | URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
89
+
90
+ begin
91
+ #Delete a file publication
92
+ api_instance.delete(file_publication_href)
93
+ rescue PulpFileClient::ApiError => e
94
+ puts "Exception when calling PublicationsFileApi->delete: #{e}"
95
+ end
96
+ ```
97
+
98
+ ### Parameters
99
+
100
+
101
+ Name | Type | Description | Notes
102
+ ------------- | ------------- | ------------- | -------------
103
+ **file_publication_href** | **String**| URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/ |
104
+
105
+ ### Return type
106
+
107
+ nil (empty response body)
108
+
109
+ ### Authorization
110
+
111
+ [Basic](../README.md#Basic)
112
+
113
+ ### HTTP request headers
114
+
115
+ - **Content-Type**: Not defined
116
+ - **Accept**: Not defined
117
+
118
+
119
+ ## list
120
+
121
+ > InlineResponse2002 list(opts)
122
+
123
+ List file publications
124
+
125
+ <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
126
+
127
+ ### Example
128
+
129
+ ```ruby
130
+ # load the gem
131
+ require 'pulp_file_client'
132
+ # setup authorization
133
+ PulpFileClient.configure do |config|
134
+ # Configure HTTP basic authorization: Basic
135
+ config.username = 'YOUR USERNAME'
136
+ config.password = 'YOUR PASSWORD'
137
+ end
138
+
139
+ api_instance = PulpFileClient::PublicationsFileApi.new
140
+ opts = {
141
+ ordering: 'ordering_example', # String | Which field to use when ordering the results.
142
+ page: 56, # Integer | A page number within the paginated result set.
143
+ page_size: 56 # Integer | Number of results to return per page.
144
+ }
145
+
146
+ begin
147
+ #List file publications
148
+ result = api_instance.list(opts)
149
+ p result
150
+ rescue PulpFileClient::ApiError => e
151
+ puts "Exception when calling PublicationsFileApi->list: #{e}"
152
+ end
153
+ ```
154
+
155
+ ### Parameters
156
+
157
+
158
+ Name | Type | Description | Notes
159
+ ------------- | ------------- | ------------- | -------------
160
+ **ordering** | **String**| Which field to use when ordering the results. | [optional]
161
+ **page** | **Integer**| A page number within the paginated result set. | [optional]
162
+ **page_size** | **Integer**| Number of results to return per page. | [optional]
163
+
164
+ ### Return type
165
+
166
+ [**InlineResponse2002**](InlineResponse2002.md)
167
+
168
+ ### Authorization
169
+
170
+ [Basic](../README.md#Basic)
171
+
172
+ ### HTTP request headers
173
+
174
+ - **Content-Type**: Not defined
175
+ - **Accept**: application/json
176
+
177
+
178
+ ## read
179
+
180
+ > FilePublication read(file_publication_href)
181
+
182
+ Inspect a file publication
183
+
184
+ <!-- User-facing documentation, rendered as html--> A FilePublication contains metadata about all the <a href=\"#operation/content_file_files_list\">File Content</a> in a particular <a href=\"https://docs.pulpproject.org/en/3.0/nightly/restapi.html#operation/repositories_versions_list\">Repository Version.</a> Once a FilePublication has been created, it can be hosted using the <a href=\"#operation/distributions_file_file_list\">File Distribution API.</a>
185
+
186
+ ### Example
187
+
188
+ ```ruby
189
+ # load the gem
190
+ require 'pulp_file_client'
191
+ # setup authorization
192
+ PulpFileClient.configure do |config|
193
+ # Configure HTTP basic authorization: Basic
194
+ config.username = 'YOUR USERNAME'
195
+ config.password = 'YOUR PASSWORD'
196
+ end
197
+
198
+ api_instance = PulpFileClient::PublicationsFileApi.new
199
+ file_publication_href = 'file_publication_href_example' # String | URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/
200
+
201
+ begin
202
+ #Inspect a file publication
203
+ result = api_instance.read(file_publication_href)
204
+ p result
205
+ rescue PulpFileClient::ApiError => e
206
+ puts "Exception when calling PublicationsFileApi->read: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+
213
+ Name | Type | Description | Notes
214
+ ------------- | ------------- | ------------- | -------------
215
+ **file_publication_href** | **String**| URI of File Publication. e.g.: /pulp/api/v3/publications/file/file/1/ |
216
+
217
+ ### Return type
218
+
219
+ [**FilePublication**](FilePublication.md)
220
+
221
+ ### Authorization
222
+
223
+ [Basic](../README.md#Basic)
224
+
225
+ ### HTTP request headers
226
+
227
+ - **Content-Type**: Not defined
228
+ - **Accept**: application/json
229
+
@@ -0,0 +1,411 @@
1
+ # PulpFileClient::RemotesFileApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**create**](RemotesFileApi.md#create) | **POST** /pulp/api/v3/remotes/file/file/ | Create a file remote
8
+ [**delete**](RemotesFileApi.md#delete) | **DELETE** {file_remote_href} | Delete a file remote
9
+ [**list**](RemotesFileApi.md#list) | **GET** /pulp/api/v3/remotes/file/file/ | List file remotes
10
+ [**partial_update**](RemotesFileApi.md#partial_update) | **PATCH** {file_remote_href} | Partially update a file remote
11
+ [**read**](RemotesFileApi.md#read) | **GET** {file_remote_href} | Inspect a file remote
12
+ [**sync**](RemotesFileApi.md#sync) | **POST** {file_remote_href}sync/ |
13
+ [**update**](RemotesFileApi.md#update) | **PUT** {file_remote_href} | Update a file remote
14
+
15
+
16
+
17
+ ## create
18
+
19
+ > FileRemote create(data)
20
+
21
+ Create a file remote
22
+
23
+ <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
24
+
25
+ ### Example
26
+
27
+ ```ruby
28
+ # load the gem
29
+ require 'pulp_file_client'
30
+ # setup authorization
31
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
38
+ data = PulpFileClient::FileRemote.new # FileRemote |
39
+
40
+ begin
41
+ #Create a file remote
42
+ result = api_instance.create(data)
43
+ p result
44
+ rescue PulpFileClient::ApiError => e
45
+ puts "Exception when calling RemotesFileApi->create: #{e}"
46
+ end
47
+ ```
48
+
49
+ ### Parameters
50
+
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **data** | [**FileRemote**](FileRemote.md)| |
55
+
56
+ ### Return type
57
+
58
+ [**FileRemote**](FileRemote.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(file_remote_href)
73
+
74
+ Delete a file remote
75
+
76
+ Trigger an asynchronous delete task
77
+
78
+ ### Example
79
+
80
+ ```ruby
81
+ # load the gem
82
+ require 'pulp_file_client'
83
+ # setup authorization
84
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
91
+ file_remote_href = 'file_remote_href_example' # String | URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
92
+
93
+ begin
94
+ #Delete a file remote
95
+ result = api_instance.delete(file_remote_href)
96
+ p result
97
+ rescue PulpFileClient::ApiError => e
98
+ puts "Exception when calling RemotesFileApi->delete: #{e}"
99
+ end
100
+ ```
101
+
102
+ ### Parameters
103
+
104
+
105
+ Name | Type | Description | Notes
106
+ ------------- | ------------- | ------------- | -------------
107
+ **file_remote_href** | **String**| URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/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
+ > InlineResponse2003 list(opts)
126
+
127
+ List file remotes
128
+
129
+ <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
130
+
131
+ ### Example
132
+
133
+ ```ruby
134
+ # load the gem
135
+ require 'pulp_file_client'
136
+ # setup authorization
137
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.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 file remotes
159
+ result = api_instance.list(opts)
160
+ p result
161
+ rescue PulpFileClient::ApiError => e
162
+ puts "Exception when calling RemotesFileApi->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
+ [**InlineResponse2003**](InlineResponse2003.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(file_remote_href, data)
199
+
200
+ Partially update a file remote
201
+
202
+ Trigger an asynchronous partial update task
203
+
204
+ ### Example
205
+
206
+ ```ruby
207
+ # load the gem
208
+ require 'pulp_file_client'
209
+ # setup authorization
210
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
217
+ file_remote_href = 'file_remote_href_example' # String | URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
218
+ data = PulpFileClient::FileRemote.new # FileRemote |
219
+
220
+ begin
221
+ #Partially update a file remote
222
+ result = api_instance.partial_update(file_remote_href, data)
223
+ p result
224
+ rescue PulpFileClient::ApiError => e
225
+ puts "Exception when calling RemotesFileApi->partial_update: #{e}"
226
+ end
227
+ ```
228
+
229
+ ### Parameters
230
+
231
+
232
+ Name | Type | Description | Notes
233
+ ------------- | ------------- | ------------- | -------------
234
+ **file_remote_href** | **String**| URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/ |
235
+ **data** | [**FileRemote**](FileRemote.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
+ > FileRemote read(file_remote_href)
254
+
255
+ Inspect a file remote
256
+
257
+ <!-- User-facing documentation, rendered as html--> FileRemote represents an external source of <a href=\"#operation/content_file_files_list\">File Content</a>. The target url of a FileRemote must contain a file manifest, which contains the metadata for all files at the source.
258
+
259
+ ### Example
260
+
261
+ ```ruby
262
+ # load the gem
263
+ require 'pulp_file_client'
264
+ # setup authorization
265
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
272
+ file_remote_href = 'file_remote_href_example' # String | URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
273
+
274
+ begin
275
+ #Inspect a file remote
276
+ result = api_instance.read(file_remote_href)
277
+ p result
278
+ rescue PulpFileClient::ApiError => e
279
+ puts "Exception when calling RemotesFileApi->read: #{e}"
280
+ end
281
+ ```
282
+
283
+ ### Parameters
284
+
285
+
286
+ Name | Type | Description | Notes
287
+ ------------- | ------------- | ------------- | -------------
288
+ **file_remote_href** | **String**| URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/ |
289
+
290
+ ### Return type
291
+
292
+ [**FileRemote**](FileRemote.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(file_remote_href, data)
307
+
308
+
309
+
310
+ Trigger an asynchronous task to sync file content.
311
+
312
+ ### Example
313
+
314
+ ```ruby
315
+ # load the gem
316
+ require 'pulp_file_client'
317
+ # setup authorization
318
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
325
+ file_remote_href = 'file_remote_href_example' # String | URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
326
+ data = PulpFileClient::RepositorySyncURL.new # RepositorySyncURL |
327
+
328
+ begin
329
+ result = api_instance.sync(file_remote_href, data)
330
+ p result
331
+ rescue PulpFileClient::ApiError => e
332
+ puts "Exception when calling RemotesFileApi->sync: #{e}"
333
+ end
334
+ ```
335
+
336
+ ### Parameters
337
+
338
+
339
+ Name | Type | Description | Notes
340
+ ------------- | ------------- | ------------- | -------------
341
+ **file_remote_href** | **String**| URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/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(file_remote_href, data)
361
+
362
+ Update a file remote
363
+
364
+ Trigger an asynchronous update task
365
+
366
+ ### Example
367
+
368
+ ```ruby
369
+ # load the gem
370
+ require 'pulp_file_client'
371
+ # setup authorization
372
+ PulpFileClient.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 = PulpFileClient::RemotesFileApi.new
379
+ file_remote_href = 'file_remote_href_example' # String | URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/
380
+ data = PulpFileClient::FileRemote.new # FileRemote |
381
+
382
+ begin
383
+ #Update a file remote
384
+ result = api_instance.update(file_remote_href, data)
385
+ p result
386
+ rescue PulpFileClient::ApiError => e
387
+ puts "Exception when calling RemotesFileApi->update: #{e}"
388
+ end
389
+ ```
390
+
391
+ ### Parameters
392
+
393
+
394
+ Name | Type | Description | Notes
395
+ ------------- | ------------- | ------------- | -------------
396
+ **file_remote_href** | **String**| URI of File Remote. e.g.: /pulp/api/v3/remotes/file/file/1/ |
397
+ **data** | [**FileRemote**](FileRemote.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
+ # PulpFileClient::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 &#x60;&#x60;True&#x60;&#x60;, synchronization will remove all content that is not present in the remote repository. If &#x60;&#x60;False&#x60;&#x60;, sync will be additive only. | [optional] [default to false]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'PulpFileClient'
14
+
15
+ instance = PulpFileClient::RepositorySyncURL.new(repository: null,
16
+ mirror: null)
17
+ ```
18
+
19
+
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
+