pulp_file_client 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -11
- data/docs/ContentFilesApi.md +2 -0
- data/docs/DistributionsFileApi.md +2 -0
- data/docs/Export.md +25 -0
- data/docs/ExportersFileExportsApi.md +243 -0
- data/docs/{FileExportersFileApi.md → ExportersFilesystemApi.md} +29 -82
- data/docs/FileFileFileSystemExporter.md +3 -3
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +23 -0
- data/docs/PublicationsFileApi.md +2 -2
- data/docs/RemotesFileApi.md +4 -2
- data/docs/RepositoriesFileApi.md +4 -2
- data/docs/RepositoriesFileVersionsApi.md +57 -2
- data/lib/pulp_file_client/api/content_files_api.rb +4 -1
- data/lib/pulp_file_client/api/distributions_file_api.rb +4 -1
- data/lib/pulp_file_client/api/exporters_file_exports_api.rb +297 -0
- data/lib/pulp_file_client/api/{file_exporters_file_api.rb → exporters_filesystem_api.rb} +34 -99
- data/lib/pulp_file_client/api/publications_file_api.rb +4 -4
- data/lib/pulp_file_client/api/remotes_file_api.rb +7 -4
- data/lib/pulp_file_client/api/repositories_file_api.rb +7 -4
- data/lib/pulp_file_client/api/repositories_file_versions_api.rb +72 -4
- data/lib/pulp_file_client/api_client.rb +1 -1
- data/lib/pulp_file_client/api_error.rb +1 -1
- data/lib/pulp_file_client/configuration.rb +1 -1
- data/lib/pulp_file_client/models/async_operation_response.rb +1 -1
- data/lib/pulp_file_client/models/content_summary.rb +1 -1
- data/lib/pulp_file_client/models/export.rb +258 -0
- data/lib/pulp_file_client/models/file_file_content.rb +1 -1
- data/lib/pulp_file_client/models/file_file_distribution.rb +1 -1
- data/lib/pulp_file_client/models/file_file_file_system_exporter.rb +39 -39
- data/lib/pulp_file_client/models/file_file_publication.rb +1 -1
- data/lib/pulp_file_client/models/file_file_remote.rb +1 -1
- data/lib/pulp_file_client/models/file_file_repository.rb +1 -1
- data/lib/pulp_file_client/models/inline_response200.rb +1 -1
- data/lib/pulp_file_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_file_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_file_client/models/inline_response2003.rb +2 -2
- data/lib/pulp_file_client/models/inline_response2004.rb +2 -2
- data/lib/pulp_file_client/models/inline_response2005.rb +2 -2
- data/lib/pulp_file_client/models/inline_response2006.rb +2 -2
- data/lib/pulp_file_client/models/inline_response2007.rb +247 -0
- data/lib/pulp_file_client/models/publication_export.rb +1 -1
- data/lib/pulp_file_client/models/repository_add_remove_content.rb +1 -1
- data/lib/pulp_file_client/models/repository_sync_url.rb +1 -1
- data/lib/pulp_file_client/models/repository_version.rb +1 -1
- data/lib/pulp_file_client/version.rb +2 -2
- data/lib/pulp_file_client.rb +5 -2
- data/pulp_file_client.gemspec +1 -1
- data/spec/api/content_files_api_spec.rb +2 -1
- data/spec/api/distributions_file_api_spec.rb +2 -1
- data/spec/api/exporters_file_exports_api_spec.rb +91 -0
- data/spec/api/{file_exporters_file_api_spec.rb → exporters_filesystem_api_spec.rb} +12 -23
- data/spec/api/publications_file_api_spec.rb +2 -2
- data/spec/api/remotes_file_api_spec.rb +3 -2
- data/spec/api/repositories_file_api_spec.rb +3 -2
- data/spec/api/repositories_file_versions_api_spec.rb +14 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/content_summary_spec.rb +1 -1
- data/spec/models/export_spec.rb +65 -0
- data/spec/models/file_file_content_spec.rb +1 -1
- data/spec/models/file_file_distribution_spec.rb +1 -1
- data/spec/models/file_file_file_system_exporter_spec.rb +3 -3
- data/spec/models/file_file_publication_spec.rb +1 -1
- data/spec/models/file_file_remote_spec.rb +1 -1
- data/spec/models/file_file_repository_spec.rb +1 -1
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2007_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/publication_export_spec.rb +1 -1
- data/spec/models/repository_add_remove_content_spec.rb +1 -1
- data/spec/models/repository_sync_url_spec.rb +1 -1
- data/spec/models/repository_version_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +18 -6
data/docs/InlineResponse2004.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<FileFilePublication>**](FileFilePublication.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/InlineResponse2005.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<FileFileRemote>**](FileFileRemote.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
data/docs/InlineResponse2006.md
CHANGED
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**count** | **Integer** | |
|
8
8
|
**_next** | **String** | | [optional]
|
9
9
|
**previous** | **String** | | [optional]
|
10
|
-
**results** | [**Array<
|
10
|
+
**results** | [**Array<FileFileRepository>**](FileFileRepository.md) | |
|
11
11
|
|
12
12
|
## Code Sample
|
13
13
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# PulpFileClient::InlineResponse2007
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**count** | **Integer** | |
|
8
|
+
**_next** | **String** | | [optional]
|
9
|
+
**previous** | **String** | | [optional]
|
10
|
+
**results** | [**Array<RepositoryVersion>**](RepositoryVersion.md) | |
|
11
|
+
|
12
|
+
## Code Sample
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'PulpFileClient'
|
16
|
+
|
17
|
+
instance = PulpFileClient::InlineResponse2007.new(count: null,
|
18
|
+
_next: null,
|
19
|
+
previous: null,
|
20
|
+
results: null)
|
21
|
+
```
|
22
|
+
|
23
|
+
|
data/docs/PublicationsFileApi.md
CHANGED
@@ -118,7 +118,7 @@ nil (empty response body)
|
|
118
118
|
|
119
119
|
## list
|
120
120
|
|
121
|
-
>
|
121
|
+
> InlineResponse2004 list(opts)
|
122
122
|
|
123
123
|
List file publications
|
124
124
|
|
@@ -181,7 +181,7 @@ Name | Type | Description | Notes
|
|
181
181
|
|
182
182
|
### Return type
|
183
183
|
|
184
|
-
[**
|
184
|
+
[**InlineResponse2004**](InlineResponse2004.md)
|
185
185
|
|
186
186
|
### Authorization
|
187
187
|
|
data/docs/RemotesFileApi.md
CHANGED
@@ -121,7 +121,7 @@ Name | Type | Description | Notes
|
|
121
121
|
|
122
122
|
## list
|
123
123
|
|
124
|
-
>
|
124
|
+
> InlineResponse2005 list(opts)
|
125
125
|
|
126
126
|
List file remotes
|
127
127
|
|
@@ -141,6 +141,7 @@ end
|
|
141
141
|
|
142
142
|
api_instance = PulpFileClient::RemotesFileApi.new
|
143
143
|
opts = {
|
144
|
+
ordering: 'ordering_example', # String | Which field to use when ordering the results.
|
144
145
|
name: 'name_example', # String |
|
145
146
|
name__in: 'name__in_example', # String | Filter results where name is in a comma-separated list of values
|
146
147
|
pulp_last_updated__lt: 'pulp_last_updated__lt_example', # String | Filter results where pulp_last_updated is less than value
|
@@ -169,6 +170,7 @@ end
|
|
169
170
|
|
170
171
|
Name | Type | Description | Notes
|
171
172
|
------------- | ------------- | ------------- | -------------
|
173
|
+
**ordering** | **String**| Which field to use when ordering the results. | [optional]
|
172
174
|
**name** | **String**| | [optional]
|
173
175
|
**name__in** | **String**| Filter results where name is in a comma-separated list of values | [optional]
|
174
176
|
**pulp_last_updated__lt** | **String**| Filter results where pulp_last_updated is less than value | [optional]
|
@@ -184,7 +186,7 @@ Name | Type | Description | Notes
|
|
184
186
|
|
185
187
|
### Return type
|
186
188
|
|
187
|
-
[**
|
189
|
+
[**InlineResponse2005**](InlineResponse2005.md)
|
188
190
|
|
189
191
|
### Authorization
|
190
192
|
|
data/docs/RepositoriesFileApi.md
CHANGED
@@ -123,7 +123,7 @@ Name | Type | Description | Notes
|
|
123
123
|
|
124
124
|
## list
|
125
125
|
|
126
|
-
>
|
126
|
+
> InlineResponse2006 list(opts)
|
127
127
|
|
128
128
|
List file repositorys
|
129
129
|
|
@@ -143,6 +143,7 @@ end
|
|
143
143
|
|
144
144
|
api_instance = PulpFileClient::RepositoriesFileApi.new
|
145
145
|
opts = {
|
146
|
+
ordering: 'ordering_example', # String | Which field to use when ordering the results.
|
146
147
|
name: 'name_example', # String |
|
147
148
|
name__in: 'name__in_example', # String | Filter results where name is in a comma-separated list of values
|
148
149
|
limit: 56, # Integer | Number of results to return per page.
|
@@ -165,6 +166,7 @@ end
|
|
165
166
|
|
166
167
|
Name | Type | Description | Notes
|
167
168
|
------------- | ------------- | ------------- | -------------
|
169
|
+
**ordering** | **String**| Which field to use when ordering the results. | [optional]
|
168
170
|
**name** | **String**| | [optional]
|
169
171
|
**name__in** | **String**| Filter results where name is in a comma-separated list of values | [optional]
|
170
172
|
**limit** | **Integer**| Number of results to return per page. | [optional]
|
@@ -174,7 +176,7 @@ Name | Type | Description | Notes
|
|
174
176
|
|
175
177
|
### Return type
|
176
178
|
|
177
|
-
[**
|
179
|
+
[**InlineResponse2006**](InlineResponse2006.md)
|
178
180
|
|
179
181
|
### Authorization
|
180
182
|
|
@@ -7,6 +7,7 @@ Method | HTTP request | Description
|
|
7
7
|
[**delete**](RepositoriesFileVersionsApi.md#delete) | **DELETE** {file_repository_version_href} | Delete a repository version
|
8
8
|
[**list**](RepositoriesFileVersionsApi.md#list) | **GET** {file_repository_href}versions/ | List repository versions
|
9
9
|
[**read**](RepositoriesFileVersionsApi.md#read) | **GET** {file_repository_version_href} | Inspect a repository version
|
10
|
+
[**repair**](RepositoriesFileVersionsApi.md#repair) | **POST** {file_repository_version_href}repair/ |
|
10
11
|
|
11
12
|
|
12
13
|
|
@@ -65,7 +66,7 @@ Name | Type | Description | Notes
|
|
65
66
|
|
66
67
|
## list
|
67
68
|
|
68
|
-
>
|
69
|
+
> InlineResponse2007 list(file_repository_href, opts)
|
69
70
|
|
70
71
|
List repository versions
|
71
72
|
|
@@ -142,7 +143,7 @@ Name | Type | Description | Notes
|
|
142
143
|
|
143
144
|
### Return type
|
144
145
|
|
145
|
-
[**
|
146
|
+
[**InlineResponse2007**](InlineResponse2007.md)
|
146
147
|
|
147
148
|
### Authorization
|
148
149
|
|
@@ -212,3 +213,57 @@ Name | Type | Description | Notes
|
|
212
213
|
- **Content-Type**: Not defined
|
213
214
|
- **Accept**: application/json
|
214
215
|
|
216
|
+
|
217
|
+
## repair
|
218
|
+
|
219
|
+
> AsyncOperationResponse repair(file_repository_version_href, data)
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
Trigger an asynchronous task to repair a repositroy version.
|
224
|
+
|
225
|
+
### Example
|
226
|
+
|
227
|
+
```ruby
|
228
|
+
# load the gem
|
229
|
+
require 'pulp_file_client'
|
230
|
+
# setup authorization
|
231
|
+
PulpFileClient.configure do |config|
|
232
|
+
# Configure HTTP basic authorization: Basic
|
233
|
+
config.username = 'YOUR USERNAME'
|
234
|
+
config.password = 'YOUR PASSWORD'
|
235
|
+
end
|
236
|
+
|
237
|
+
api_instance = PulpFileClient::RepositoriesFileVersionsApi.new
|
238
|
+
file_repository_version_href = 'file_repository_version_href_example' # String | URI of Repository Version. e.g.: /pulp/api/v3/repositories/file/file/1/versions/1/
|
239
|
+
data = PulpFileClient::RepositoryVersion.new # RepositoryVersion |
|
240
|
+
|
241
|
+
begin
|
242
|
+
result = api_instance.repair(file_repository_version_href, data)
|
243
|
+
p result
|
244
|
+
rescue PulpFileClient::ApiError => e
|
245
|
+
puts "Exception when calling RepositoriesFileVersionsApi->repair: #{e}"
|
246
|
+
end
|
247
|
+
```
|
248
|
+
|
249
|
+
### Parameters
|
250
|
+
|
251
|
+
|
252
|
+
Name | Type | Description | Notes
|
253
|
+
------------- | ------------- | ------------- | -------------
|
254
|
+
**file_repository_version_href** | **String**| URI of Repository Version. e.g.: /pulp/api/v3/repositories/file/file/1/versions/1/ |
|
255
|
+
**data** | [**RepositoryVersion**](RepositoryVersion.md)| |
|
256
|
+
|
257
|
+
### Return type
|
258
|
+
|
259
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
260
|
+
|
261
|
+
### Authorization
|
262
|
+
|
263
|
+
[Basic](../README.md#Basic)
|
264
|
+
|
265
|
+
### HTTP request headers
|
266
|
+
|
267
|
+
- **Content-Type**: application/json
|
268
|
+
- **Accept**: application/json
|
269
|
+
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -100,6 +100,7 @@ module PulpFileClient
|
|
100
100
|
# List file contents
|
101
101
|
# FileContent represents a single file and its metadata, which can be added and removed from repositories.
|
102
102
|
# @param [Hash] opts the optional parameters
|
103
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
103
104
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
104
105
|
# @option opts [String] :sha256
|
105
106
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
@@ -118,6 +119,7 @@ module PulpFileClient
|
|
118
119
|
# List file contents
|
119
120
|
# FileContent represents a single file and its metadata, which can be added and removed from repositories.
|
120
121
|
# @param [Hash] opts the optional parameters
|
122
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
121
123
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
122
124
|
# @option opts [String] :sha256
|
123
125
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
@@ -137,6 +139,7 @@ module PulpFileClient
|
|
137
139
|
|
138
140
|
# query parameters
|
139
141
|
query_params = opts[:query_params] || {}
|
142
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
140
143
|
query_params[:'relative_path'] = opts[:'relative_path'] if !opts[:'relative_path'].nil?
|
141
144
|
query_params[:'sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
|
142
145
|
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -148,6 +148,7 @@ module PulpFileClient
|
|
148
148
|
# List file distributions
|
149
149
|
# FileDistributions host File Publications which makes the metadata and the referenced File Content available to HTTP clients. Additionally, a FileDistribution with an associated FilePublication can be the target url of a File Remote , allowing another instance of Pulp to sync the content.
|
150
150
|
# @param [Hash] opts the optional parameters
|
151
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
151
152
|
# @option opts [String] :name
|
152
153
|
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
153
154
|
# @option opts [String] :base_path
|
@@ -167,6 +168,7 @@ module PulpFileClient
|
|
167
168
|
# List file distributions
|
168
169
|
# FileDistributions host File Publications which makes the metadata and the referenced File Content available to HTTP clients. Additionally, a FileDistribution with an associated FilePublication can be the target url of a File Remote , allowing another instance of Pulp to sync the content.
|
169
170
|
# @param [Hash] opts the optional parameters
|
171
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
170
172
|
# @option opts [String] :name
|
171
173
|
# @option opts [String] :name__in Filter results where name is in a comma-separated list of values
|
172
174
|
# @option opts [String] :base_path
|
@@ -187,6 +189,7 @@ module PulpFileClient
|
|
187
189
|
|
188
190
|
# query parameters
|
189
191
|
query_params = opts[:query_params] || {}
|
192
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
190
193
|
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
191
194
|
query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
|
192
195
|
query_params[:'base_path'] = opts[:'base_path'] if !opts[:'base_path'].nil?
|
@@ -0,0 +1,297 @@
|
|
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.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpFileClient
|
16
|
+
class ExportersFileExportsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an export
|
23
|
+
# Trigger an asynchronous task to export a file publication.
|
24
|
+
# @param exporter_pk [String]
|
25
|
+
# @param data [PublicationExport]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [AsyncOperationResponse]
|
28
|
+
def create(exporter_pk, data, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(exporter_pk, data, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an export
|
34
|
+
# Trigger an asynchronous task to export a file publication.
|
35
|
+
# @param exporter_pk [String]
|
36
|
+
# @param data [PublicationExport]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(exporter_pk, data, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: ExportersFileExportsApi.create ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'exporter_pk' is set
|
44
|
+
if @api_client.config.client_side_validation && exporter_pk.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'exporter_pk' when calling ExportersFileExportsApi.create"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'data' is set
|
48
|
+
if @api_client.config.client_side_validation && data.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling ExportersFileExportsApi.create"
|
50
|
+
end
|
51
|
+
# resource path
|
52
|
+
local_var_path = '/pulp/api/v3/exporters/file/filesystem/{exporter_pk}/exports/'.sub('{' + 'exporter_pk' + '}', CGI.escape(exporter_pk.to_s).gsub('%2F', '/'))
|
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(['application/json'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:auth_names] || ['Basic']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: ExportersFileExportsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Delete an export
|
93
|
+
# FileSystemExports provide a history of previous exports.
|
94
|
+
# @param export_href [String] URI of Export. e.g.: /pulp/api/v3/exporters/file/filesystem/1/exports/1/
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [nil]
|
97
|
+
def delete(export_href, opts = {})
|
98
|
+
delete_with_http_info(export_href, opts)
|
99
|
+
nil
|
100
|
+
end
|
101
|
+
|
102
|
+
# Delete an export
|
103
|
+
# FileSystemExports provide a history of previous exports.
|
104
|
+
# @param export_href [String] URI of Export. e.g.: /pulp/api/v3/exporters/file/filesystem/1/exports/1/
|
105
|
+
# @param [Hash] opts the optional parameters
|
106
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
107
|
+
def delete_with_http_info(export_href, opts = {})
|
108
|
+
if @api_client.config.debugging
|
109
|
+
@api_client.config.logger.debug 'Calling API: ExportersFileExportsApi.delete ...'
|
110
|
+
end
|
111
|
+
# verify the required parameter 'export_href' is set
|
112
|
+
if @api_client.config.client_side_validation && export_href.nil?
|
113
|
+
fail ArgumentError, "Missing the required parameter 'export_href' when calling ExportersFileExportsApi.delete"
|
114
|
+
end
|
115
|
+
# resource path
|
116
|
+
local_var_path = '{export_href}'.sub('{' + 'export_href' + '}', CGI.escape(export_href.to_s).gsub('%2F', '/'))
|
117
|
+
|
118
|
+
# query parameters
|
119
|
+
query_params = opts[:query_params] || {}
|
120
|
+
|
121
|
+
# header parameters
|
122
|
+
header_params = opts[:header_params] || {}
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:body]
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:return_type]
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:auth_names] || ['Basic']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: ExportersFileExportsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
|
152
|
+
# List exports
|
153
|
+
# FileSystemExports provide a history of previous exports.
|
154
|
+
# @param exporter_pk [String]
|
155
|
+
# @param [Hash] opts the optional parameters
|
156
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
157
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
158
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
159
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
160
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
161
|
+
# @return [InlineResponse2003]
|
162
|
+
def list(exporter_pk, opts = {})
|
163
|
+
data, _status_code, _headers = list_with_http_info(exporter_pk, opts)
|
164
|
+
data
|
165
|
+
end
|
166
|
+
|
167
|
+
# List exports
|
168
|
+
# FileSystemExports provide a history of previous exports.
|
169
|
+
# @param exporter_pk [String]
|
170
|
+
# @param [Hash] opts the optional parameters
|
171
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
172
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
173
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
174
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
175
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
176
|
+
# @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
|
177
|
+
def list_with_http_info(exporter_pk, opts = {})
|
178
|
+
if @api_client.config.debugging
|
179
|
+
@api_client.config.logger.debug 'Calling API: ExportersFileExportsApi.list ...'
|
180
|
+
end
|
181
|
+
# verify the required parameter 'exporter_pk' is set
|
182
|
+
if @api_client.config.client_side_validation && exporter_pk.nil?
|
183
|
+
fail ArgumentError, "Missing the required parameter 'exporter_pk' when calling ExportersFileExportsApi.list"
|
184
|
+
end
|
185
|
+
# resource path
|
186
|
+
local_var_path = '/pulp/api/v3/exporters/file/filesystem/{exporter_pk}/exports/'.sub('{' + 'exporter_pk' + '}', CGI.escape(exporter_pk.to_s).gsub('%2F', '/'))
|
187
|
+
|
188
|
+
# query parameters
|
189
|
+
query_params = opts[:query_params] || {}
|
190
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
191
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
192
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
193
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
194
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
195
|
+
|
196
|
+
# header parameters
|
197
|
+
header_params = opts[:header_params] || {}
|
198
|
+
# HTTP header 'Accept' (if needed)
|
199
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
200
|
+
|
201
|
+
# form parameters
|
202
|
+
form_params = opts[:form_params] || {}
|
203
|
+
|
204
|
+
# http body (model)
|
205
|
+
post_body = opts[:body]
|
206
|
+
|
207
|
+
# return_type
|
208
|
+
return_type = opts[:return_type] || 'InlineResponse2003'
|
209
|
+
|
210
|
+
# auth_names
|
211
|
+
auth_names = opts[:auth_names] || ['Basic']
|
212
|
+
|
213
|
+
new_options = opts.merge(
|
214
|
+
:header_params => header_params,
|
215
|
+
:query_params => query_params,
|
216
|
+
:form_params => form_params,
|
217
|
+
:body => post_body,
|
218
|
+
:auth_names => auth_names,
|
219
|
+
:return_type => return_type
|
220
|
+
)
|
221
|
+
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug "API called: ExportersFileExportsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
225
|
+
end
|
226
|
+
return data, status_code, headers
|
227
|
+
end
|
228
|
+
|
229
|
+
# Inspect an export
|
230
|
+
# FileSystemExports provide a history of previous exports.
|
231
|
+
# @param export_href [String] URI of Export. e.g.: /pulp/api/v3/exporters/file/filesystem/1/exports/1/
|
232
|
+
# @param [Hash] opts the optional parameters
|
233
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
234
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
235
|
+
# @return [Export]
|
236
|
+
def read(export_href, opts = {})
|
237
|
+
data, _status_code, _headers = read_with_http_info(export_href, opts)
|
238
|
+
data
|
239
|
+
end
|
240
|
+
|
241
|
+
# Inspect an export
|
242
|
+
# FileSystemExports provide a history of previous exports.
|
243
|
+
# @param export_href [String] URI of Export. e.g.: /pulp/api/v3/exporters/file/filesystem/1/exports/1/
|
244
|
+
# @param [Hash] opts the optional parameters
|
245
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
246
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
247
|
+
# @return [Array<(Export, Integer, Hash)>] Export data, response status code and response headers
|
248
|
+
def read_with_http_info(export_href, opts = {})
|
249
|
+
if @api_client.config.debugging
|
250
|
+
@api_client.config.logger.debug 'Calling API: ExportersFileExportsApi.read ...'
|
251
|
+
end
|
252
|
+
# verify the required parameter 'export_href' is set
|
253
|
+
if @api_client.config.client_side_validation && export_href.nil?
|
254
|
+
fail ArgumentError, "Missing the required parameter 'export_href' when calling ExportersFileExportsApi.read"
|
255
|
+
end
|
256
|
+
# resource path
|
257
|
+
local_var_path = '{export_href}'.sub('{' + 'export_href' + '}', CGI.escape(export_href.to_s).gsub('%2F', '/'))
|
258
|
+
|
259
|
+
# query parameters
|
260
|
+
query_params = opts[:query_params] || {}
|
261
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
262
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
263
|
+
|
264
|
+
# header parameters
|
265
|
+
header_params = opts[:header_params] || {}
|
266
|
+
# HTTP header 'Accept' (if needed)
|
267
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
268
|
+
|
269
|
+
# form parameters
|
270
|
+
form_params = opts[:form_params] || {}
|
271
|
+
|
272
|
+
# http body (model)
|
273
|
+
post_body = opts[:body]
|
274
|
+
|
275
|
+
# return_type
|
276
|
+
return_type = opts[:return_type] || 'Export'
|
277
|
+
|
278
|
+
# auth_names
|
279
|
+
auth_names = opts[:auth_names] || ['Basic']
|
280
|
+
|
281
|
+
new_options = opts.merge(
|
282
|
+
:header_params => header_params,
|
283
|
+
:query_params => query_params,
|
284
|
+
:form_params => form_params,
|
285
|
+
:body => post_body,
|
286
|
+
:auth_names => auth_names,
|
287
|
+
:return_type => return_type
|
288
|
+
)
|
289
|
+
|
290
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
291
|
+
if @api_client.config.debugging
|
292
|
+
@api_client.config.logger.debug "API called: ExportersFileExportsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
293
|
+
end
|
294
|
+
return data, status_code, headers
|
295
|
+
end
|
296
|
+
end
|
297
|
+
end
|