pulpcore_client 3.20.0 → 3.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -84
- data/docs/ContentApi.md +1 -115
- data/docs/ContentguardsApi.md +1 -280
- data/docs/DistributionsApi.md +3 -281
- data/docs/PublicationsApi.md +0 -113
- data/docs/PulpImport.md +3 -1
- data/docs/RemotesApi.md +0 -280
- data/docs/RepositoriesApi.md +3 -281
- data/docs/UploadsApi.md +228 -0
- data/lib/pulpcore_client/api/content_api.rb +2 -134
- data/lib/pulpcore_client/api/contentguards_api.rb +2 -334
- data/lib/pulpcore_client/api/distributions_api.rb +5 -336
- data/lib/pulpcore_client/api/publications_api.rb +0 -128
- data/lib/pulpcore_client/api/remotes_api.rb +0 -334
- data/lib/pulpcore_client/api/repositories_api.rb +5 -336
- data/lib/pulpcore_client/api/repository_versions_api.rb +1 -1
- data/lib/pulpcore_client/api/uploads_api.rb +268 -0
- data/lib/pulpcore_client/api_client.rb +1 -1
- data/lib/pulpcore_client/models/pulp_import.rb +16 -4
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +0 -31
- data/pulpcore_client.gemspec +3 -3
- data/spec/api/content_api_spec.rb +1 -27
- data/spec/api/contentguards_api_spec.rb +1 -65
- data/spec/api/distributions_api_spec.rb +2 -65
- data/spec/api/publications_api_spec.rb +0 -26
- data/spec/api/remotes_api_spec.rb +0 -64
- data/spec/api/repositories_api_spec.rb +2 -65
- data/spec/api/uploads_api_spec.rb +50 -0
- data/spec/models/pulp_import_spec.rb +6 -0
- metadata +136 -261
- data/docs/AcsApi.md +0 -417
- data/docs/AlternateContentSource.md +0 -23
- data/docs/AlternateContentSourceResponse.md +0 -27
- data/docs/ContentGuard.md +0 -19
- data/docs/Distribution.md +0 -25
- data/docs/Export.md +0 -17
- data/docs/ExportResponse.md +0 -25
- data/docs/Exporter.md +0 -17
- data/docs/ExporterResponse.md +0 -21
- data/docs/ExportersApi.md +0 -362
- data/docs/ExportersExportsApi.md +0 -241
- data/docs/Import.md +0 -19
- data/docs/Importer.md +0 -17
- data/docs/ImporterResponse.md +0 -21
- data/docs/ImportersApi.md +0 -361
- data/docs/ImportersImportsApi.md +0 -241
- data/docs/MultipleArtifactContent.md +0 -17
- data/docs/PaginatedAlternateContentSourceResponseList.md +0 -23
- data/docs/PaginatedExportResponseList.md +0 -23
- data/docs/PaginatedExporterResponseList.md +0 -23
- data/docs/PaginatedImporterResponseList.md +0 -23
- data/docs/PatchedAlternateContentSource.md +0 -23
- data/docs/PatchedContentGuard.md +0 -19
- data/docs/PatchedDistribution.md +0 -25
- data/docs/PatchedExporter.md +0 -17
- data/docs/PatchedImporter.md +0 -17
- data/docs/PatchedRemote.md +0 -57
- data/docs/PatchedRepository.md +0 -25
- data/docs/Remote.md +0 -57
- data/docs/RepositoriesVersionsApi.md +0 -271
- data/docs/Repository.md +0 -25
- data/git_push.sh +0 -58
- data/lib/pulpcore_client/api/acs_api.rb +0 -514
- data/lib/pulpcore_client/api/exporters_api.rb +0 -446
- data/lib/pulpcore_client/api/exporters_exports_api.rb +0 -294
- data/lib/pulpcore_client/api/importers_api.rb +0 -444
- data/lib/pulpcore_client/api/importers_imports_api.rb +0 -294
- data/lib/pulpcore_client/api/repositories_versions_api.rb +0 -343
- data/lib/pulpcore_client/models/alternate_content_source.rb +0 -270
- data/lib/pulpcore_client/models/alternate_content_source_response.rb +0 -270
- data/lib/pulpcore_client/models/content_guard.rb +0 -258
- data/lib/pulpcore_client/models/distribution.rb +0 -297
- data/lib/pulpcore_client/models/export.rb +0 -209
- data/lib/pulpcore_client/models/export_response.rb +0 -250
- data/lib/pulpcore_client/models/exporter.rb +0 -232
- data/lib/pulpcore_client/models/exporter_response.rb +0 -232
- data/lib/pulpcore_client/models/import.rb +0 -228
- data/lib/pulpcore_client/models/importer.rb +0 -232
- data/lib/pulpcore_client/models/importer_response.rb +0 -232
- data/lib/pulpcore_client/models/multiple_artifact_content.rb +0 -213
- data/lib/pulpcore_client/models/paginated_alternate_content_source_response_list.rb +0 -237
- data/lib/pulpcore_client/models/paginated_export_response_list.rb +0 -237
- data/lib/pulpcore_client/models/paginated_exporter_response_list.rb +0 -237
- data/lib/pulpcore_client/models/paginated_importer_response_list.rb +0 -237
- data/lib/pulpcore_client/models/patched_alternate_content_source.rb +0 -256
- data/lib/pulpcore_client/models/patched_content_guard.rb +0 -249
- data/lib/pulpcore_client/models/patched_distribution.rb +0 -279
- data/lib/pulpcore_client/models/patched_exporter.rb +0 -223
- data/lib/pulpcore_client/models/patched_importer.rb +0 -223
- data/lib/pulpcore_client/models/patched_remote.rb +0 -649
- data/lib/pulpcore_client/models/patched_repository.rb +0 -295
- data/lib/pulpcore_client/models/remote.rb +0 -667
- data/lib/pulpcore_client/models/repository.rb +0 -304
- data/spec/api/acs_api_spec.rb +0 -132
- data/spec/api/exporters_api_spec.rb +0 -120
- data/spec/api/exporters_exports_api_spec.rb +0 -90
- data/spec/api/importers_api_spec.rb +0 -120
- data/spec/api/importers_imports_api_spec.rb +0 -90
- data/spec/api/repositories_versions_api_spec.rb +0 -104
- data/spec/models/alternate_content_source_response_spec.rb +0 -71
- data/spec/models/alternate_content_source_spec.rb +0 -59
- data/spec/models/content_guard_spec.rb +0 -47
- data/spec/models/distribution_spec.rb +0 -65
- data/spec/models/export_response_spec.rb +0 -65
- data/spec/models/export_spec.rb +0 -41
- data/spec/models/exporter_response_spec.rb +0 -53
- data/spec/models/exporter_spec.rb +0 -41
- data/spec/models/import_spec.rb +0 -47
- data/spec/models/importer_response_spec.rb +0 -53
- data/spec/models/importer_spec.rb +0 -41
- data/spec/models/multiple_artifact_content_spec.rb +0 -41
- data/spec/models/paginated_alternate_content_source_response_list_spec.rb +0 -59
- data/spec/models/paginated_export_response_list_spec.rb +0 -59
- data/spec/models/paginated_exporter_response_list_spec.rb +0 -59
- data/spec/models/paginated_importer_response_list_spec.rb +0 -59
- data/spec/models/patched_alternate_content_source_spec.rb +0 -59
- data/spec/models/patched_content_guard_spec.rb +0 -47
- data/spec/models/patched_distribution_spec.rb +0 -65
- data/spec/models/patched_exporter_spec.rb +0 -41
- data/spec/models/patched_importer_spec.rb +0 -41
- data/spec/models/patched_remote_spec.rb +0 -161
- data/spec/models/patched_repository_spec.rb +0 -65
- data/spec/models/remote_spec.rb +0 -161
- data/spec/models/repository_spec.rb +0 -65
|
@@ -19,134 +19,8 @@ module PulpcoreClient
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Create a distribution
|
|
23
|
-
# Trigger an asynchronous create task
|
|
24
|
-
# @param distribution [Distribution]
|
|
25
|
-
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [AsyncOperationResponse]
|
|
27
|
-
def create(distribution, opts = {})
|
|
28
|
-
data, _status_code, _headers = create_with_http_info(distribution, opts)
|
|
29
|
-
data
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Create a distribution
|
|
33
|
-
# Trigger an asynchronous create task
|
|
34
|
-
# @param distribution [Distribution]
|
|
35
|
-
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
37
|
-
def create_with_http_info(distribution, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: DistributionsApi.create ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'distribution' is set
|
|
42
|
-
if @api_client.config.client_side_validation && distribution.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'distribution' when calling DistributionsApi.create"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '/pulp/api/v3/distributions/'
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
|
|
51
|
-
# header parameters
|
|
52
|
-
header_params = opts[:header_params] || {}
|
|
53
|
-
# HTTP header 'Accept' (if needed)
|
|
54
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
55
|
-
# HTTP header 'Content-Type'
|
|
56
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
57
|
-
|
|
58
|
-
# form parameters
|
|
59
|
-
form_params = opts[:form_params] || {}
|
|
60
|
-
|
|
61
|
-
# http body (model)
|
|
62
|
-
post_body = opts[:body] || @api_client.object_to_http_body(distribution)
|
|
63
|
-
|
|
64
|
-
# return_type
|
|
65
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
66
|
-
|
|
67
|
-
# auth_names
|
|
68
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
69
|
-
|
|
70
|
-
new_options = opts.merge(
|
|
71
|
-
:header_params => header_params,
|
|
72
|
-
:query_params => query_params,
|
|
73
|
-
:form_params => form_params,
|
|
74
|
-
:body => post_body,
|
|
75
|
-
:auth_names => auth_names,
|
|
76
|
-
:return_type => return_type
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
80
|
-
if @api_client.config.debugging
|
|
81
|
-
@api_client.config.logger.debug "API called: DistributionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
-
end
|
|
83
|
-
return data, status_code, headers
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# Delete a distribution
|
|
87
|
-
# Trigger an asynchronous delete task
|
|
88
|
-
# @param distribution_href [String]
|
|
89
|
-
# @param [Hash] opts the optional parameters
|
|
90
|
-
# @return [AsyncOperationResponse]
|
|
91
|
-
def delete(distribution_href, opts = {})
|
|
92
|
-
data, _status_code, _headers = delete_with_http_info(distribution_href, opts)
|
|
93
|
-
data
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Delete a distribution
|
|
97
|
-
# Trigger an asynchronous delete task
|
|
98
|
-
# @param distribution_href [String]
|
|
99
|
-
# @param [Hash] opts the optional parameters
|
|
100
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
101
|
-
def delete_with_http_info(distribution_href, opts = {})
|
|
102
|
-
if @api_client.config.debugging
|
|
103
|
-
@api_client.config.logger.debug 'Calling API: DistributionsApi.delete ...'
|
|
104
|
-
end
|
|
105
|
-
# verify the required parameter 'distribution_href' is set
|
|
106
|
-
if @api_client.config.client_side_validation && distribution_href.nil?
|
|
107
|
-
fail ArgumentError, "Missing the required parameter 'distribution_href' when calling DistributionsApi.delete"
|
|
108
|
-
end
|
|
109
|
-
# resource path
|
|
110
|
-
local_var_path = '{distribution_href}'.sub('{' + 'distribution_href' + '}', CGI.escape(distribution_href.to_s).gsub('%2F', '/'))
|
|
111
|
-
|
|
112
|
-
# query parameters
|
|
113
|
-
query_params = opts[:query_params] || {}
|
|
114
|
-
|
|
115
|
-
# header parameters
|
|
116
|
-
header_params = opts[:header_params] || {}
|
|
117
|
-
# HTTP header 'Accept' (if needed)
|
|
118
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
119
|
-
|
|
120
|
-
# form parameters
|
|
121
|
-
form_params = opts[:form_params] || {}
|
|
122
|
-
|
|
123
|
-
# http body (model)
|
|
124
|
-
post_body = opts[:body]
|
|
125
|
-
|
|
126
|
-
# return_type
|
|
127
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
128
|
-
|
|
129
|
-
# auth_names
|
|
130
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
131
|
-
|
|
132
|
-
new_options = opts.merge(
|
|
133
|
-
:header_params => header_params,
|
|
134
|
-
:query_params => query_params,
|
|
135
|
-
:form_params => form_params,
|
|
136
|
-
:body => post_body,
|
|
137
|
-
:auth_names => auth_names,
|
|
138
|
-
:return_type => return_type
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
142
|
-
if @api_client.config.debugging
|
|
143
|
-
@api_client.config.logger.debug "API called: DistributionsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
144
|
-
end
|
|
145
|
-
return data, status_code, headers
|
|
146
|
-
end
|
|
147
|
-
|
|
148
22
|
# List distributions
|
|
149
|
-
#
|
|
23
|
+
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
150
24
|
# @param [Hash] opts the optional parameters
|
|
151
25
|
# @option opts [String] :base_path
|
|
152
26
|
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
@@ -161,6 +35,7 @@ module PulpcoreClient
|
|
|
161
35
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
162
36
|
# @option opts [Array<String>] :ordering Ordering
|
|
163
37
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
38
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
164
39
|
# @option opts [String] :fields A list of fields to include in the response.
|
|
165
40
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
166
41
|
# @return [PaginatedDistributionResponseList]
|
|
@@ -170,7 +45,7 @@ module PulpcoreClient
|
|
|
170
45
|
end
|
|
171
46
|
|
|
172
47
|
# List distributions
|
|
173
|
-
#
|
|
48
|
+
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
174
49
|
# @param [Hash] opts the optional parameters
|
|
175
50
|
# @option opts [String] :base_path
|
|
176
51
|
# @option opts [String] :base_path__contains Filter results where base_path contains value
|
|
@@ -185,6 +60,7 @@ module PulpcoreClient
|
|
|
185
60
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
186
61
|
# @option opts [Array<String>] :ordering Ordering
|
|
187
62
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
|
63
|
+
# @option opts [String] :with_content Filter distributions based on the content served by them
|
|
188
64
|
# @option opts [String] :fields A list of fields to include in the response.
|
|
189
65
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
190
66
|
# @return [Array<(PaginatedDistributionResponseList, Integer, Hash)>] PaginatedDistributionResponseList data, response status code and response headers
|
|
@@ -214,6 +90,7 @@ module PulpcoreClient
|
|
|
214
90
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
215
91
|
query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
|
|
216
92
|
query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
|
|
93
|
+
query_params[:'with_content'] = opts[:'with_content'] if !opts[:'with_content'].nil?
|
|
217
94
|
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
218
95
|
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
219
96
|
|
|
@@ -249,213 +126,5 @@ module PulpcoreClient
|
|
|
249
126
|
end
|
|
250
127
|
return data, status_code, headers
|
|
251
128
|
end
|
|
252
|
-
|
|
253
|
-
# Update a distribution
|
|
254
|
-
# Trigger an asynchronous partial update task
|
|
255
|
-
# @param distribution_href [String]
|
|
256
|
-
# @param patched_distribution [PatchedDistribution]
|
|
257
|
-
# @param [Hash] opts the optional parameters
|
|
258
|
-
# @return [AsyncOperationResponse]
|
|
259
|
-
def partial_update(distribution_href, patched_distribution, opts = {})
|
|
260
|
-
data, _status_code, _headers = partial_update_with_http_info(distribution_href, patched_distribution, opts)
|
|
261
|
-
data
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
# Update a distribution
|
|
265
|
-
# Trigger an asynchronous partial update task
|
|
266
|
-
# @param distribution_href [String]
|
|
267
|
-
# @param patched_distribution [PatchedDistribution]
|
|
268
|
-
# @param [Hash] opts the optional parameters
|
|
269
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
270
|
-
def partial_update_with_http_info(distribution_href, patched_distribution, opts = {})
|
|
271
|
-
if @api_client.config.debugging
|
|
272
|
-
@api_client.config.logger.debug 'Calling API: DistributionsApi.partial_update ...'
|
|
273
|
-
end
|
|
274
|
-
# verify the required parameter 'distribution_href' is set
|
|
275
|
-
if @api_client.config.client_side_validation && distribution_href.nil?
|
|
276
|
-
fail ArgumentError, "Missing the required parameter 'distribution_href' when calling DistributionsApi.partial_update"
|
|
277
|
-
end
|
|
278
|
-
# verify the required parameter 'patched_distribution' is set
|
|
279
|
-
if @api_client.config.client_side_validation && patched_distribution.nil?
|
|
280
|
-
fail ArgumentError, "Missing the required parameter 'patched_distribution' when calling DistributionsApi.partial_update"
|
|
281
|
-
end
|
|
282
|
-
# resource path
|
|
283
|
-
local_var_path = '{distribution_href}'.sub('{' + 'distribution_href' + '}', CGI.escape(distribution_href.to_s).gsub('%2F', '/'))
|
|
284
|
-
|
|
285
|
-
# query parameters
|
|
286
|
-
query_params = opts[:query_params] || {}
|
|
287
|
-
|
|
288
|
-
# header parameters
|
|
289
|
-
header_params = opts[:header_params] || {}
|
|
290
|
-
# HTTP header 'Accept' (if needed)
|
|
291
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
292
|
-
# HTTP header 'Content-Type'
|
|
293
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
294
|
-
|
|
295
|
-
# form parameters
|
|
296
|
-
form_params = opts[:form_params] || {}
|
|
297
|
-
|
|
298
|
-
# http body (model)
|
|
299
|
-
post_body = opts[:body] || @api_client.object_to_http_body(patched_distribution)
|
|
300
|
-
|
|
301
|
-
# return_type
|
|
302
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
303
|
-
|
|
304
|
-
# auth_names
|
|
305
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
306
|
-
|
|
307
|
-
new_options = opts.merge(
|
|
308
|
-
:header_params => header_params,
|
|
309
|
-
:query_params => query_params,
|
|
310
|
-
:form_params => form_params,
|
|
311
|
-
:body => post_body,
|
|
312
|
-
:auth_names => auth_names,
|
|
313
|
-
:return_type => return_type
|
|
314
|
-
)
|
|
315
|
-
|
|
316
|
-
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
317
|
-
if @api_client.config.debugging
|
|
318
|
-
@api_client.config.logger.debug "API called: DistributionsApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
319
|
-
end
|
|
320
|
-
return data, status_code, headers
|
|
321
|
-
end
|
|
322
|
-
|
|
323
|
-
# Inspect a distribution
|
|
324
|
-
# Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks with reservation that lock all Distributions preventing race conditions during base_path checking.
|
|
325
|
-
# @param distribution_href [String]
|
|
326
|
-
# @param [Hash] opts the optional parameters
|
|
327
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
328
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
329
|
-
# @return [DistributionResponse]
|
|
330
|
-
def read(distribution_href, opts = {})
|
|
331
|
-
data, _status_code, _headers = read_with_http_info(distribution_href, opts)
|
|
332
|
-
data
|
|
333
|
-
end
|
|
334
|
-
|
|
335
|
-
# Inspect a distribution
|
|
336
|
-
# Provides read and list methods and also provides asynchronous CUD methods to dispatch tasks with reservation that lock all Distributions preventing race conditions during base_path checking.
|
|
337
|
-
# @param distribution_href [String]
|
|
338
|
-
# @param [Hash] opts the optional parameters
|
|
339
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
340
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
341
|
-
# @return [Array<(DistributionResponse, Integer, Hash)>] DistributionResponse data, response status code and response headers
|
|
342
|
-
def read_with_http_info(distribution_href, opts = {})
|
|
343
|
-
if @api_client.config.debugging
|
|
344
|
-
@api_client.config.logger.debug 'Calling API: DistributionsApi.read ...'
|
|
345
|
-
end
|
|
346
|
-
# verify the required parameter 'distribution_href' is set
|
|
347
|
-
if @api_client.config.client_side_validation && distribution_href.nil?
|
|
348
|
-
fail ArgumentError, "Missing the required parameter 'distribution_href' when calling DistributionsApi.read"
|
|
349
|
-
end
|
|
350
|
-
# resource path
|
|
351
|
-
local_var_path = '{distribution_href}'.sub('{' + 'distribution_href' + '}', CGI.escape(distribution_href.to_s).gsub('%2F', '/'))
|
|
352
|
-
|
|
353
|
-
# query parameters
|
|
354
|
-
query_params = opts[:query_params] || {}
|
|
355
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
356
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
357
|
-
|
|
358
|
-
# header parameters
|
|
359
|
-
header_params = opts[:header_params] || {}
|
|
360
|
-
# HTTP header 'Accept' (if needed)
|
|
361
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
362
|
-
|
|
363
|
-
# form parameters
|
|
364
|
-
form_params = opts[:form_params] || {}
|
|
365
|
-
|
|
366
|
-
# http body (model)
|
|
367
|
-
post_body = opts[:body]
|
|
368
|
-
|
|
369
|
-
# return_type
|
|
370
|
-
return_type = opts[:return_type] || 'DistributionResponse'
|
|
371
|
-
|
|
372
|
-
# auth_names
|
|
373
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
374
|
-
|
|
375
|
-
new_options = opts.merge(
|
|
376
|
-
:header_params => header_params,
|
|
377
|
-
:query_params => query_params,
|
|
378
|
-
:form_params => form_params,
|
|
379
|
-
:body => post_body,
|
|
380
|
-
:auth_names => auth_names,
|
|
381
|
-
:return_type => return_type
|
|
382
|
-
)
|
|
383
|
-
|
|
384
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
385
|
-
if @api_client.config.debugging
|
|
386
|
-
@api_client.config.logger.debug "API called: DistributionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
387
|
-
end
|
|
388
|
-
return data, status_code, headers
|
|
389
|
-
end
|
|
390
|
-
|
|
391
|
-
# Update a distribution
|
|
392
|
-
# Trigger an asynchronous update task
|
|
393
|
-
# @param distribution_href [String]
|
|
394
|
-
# @param distribution [Distribution]
|
|
395
|
-
# @param [Hash] opts the optional parameters
|
|
396
|
-
# @return [AsyncOperationResponse]
|
|
397
|
-
def update(distribution_href, distribution, opts = {})
|
|
398
|
-
data, _status_code, _headers = update_with_http_info(distribution_href, distribution, opts)
|
|
399
|
-
data
|
|
400
|
-
end
|
|
401
|
-
|
|
402
|
-
# Update a distribution
|
|
403
|
-
# Trigger an asynchronous update task
|
|
404
|
-
# @param distribution_href [String]
|
|
405
|
-
# @param distribution [Distribution]
|
|
406
|
-
# @param [Hash] opts the optional parameters
|
|
407
|
-
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
408
|
-
def update_with_http_info(distribution_href, distribution, opts = {})
|
|
409
|
-
if @api_client.config.debugging
|
|
410
|
-
@api_client.config.logger.debug 'Calling API: DistributionsApi.update ...'
|
|
411
|
-
end
|
|
412
|
-
# verify the required parameter 'distribution_href' is set
|
|
413
|
-
if @api_client.config.client_side_validation && distribution_href.nil?
|
|
414
|
-
fail ArgumentError, "Missing the required parameter 'distribution_href' when calling DistributionsApi.update"
|
|
415
|
-
end
|
|
416
|
-
# verify the required parameter 'distribution' is set
|
|
417
|
-
if @api_client.config.client_side_validation && distribution.nil?
|
|
418
|
-
fail ArgumentError, "Missing the required parameter 'distribution' when calling DistributionsApi.update"
|
|
419
|
-
end
|
|
420
|
-
# resource path
|
|
421
|
-
local_var_path = '{distribution_href}'.sub('{' + 'distribution_href' + '}', CGI.escape(distribution_href.to_s).gsub('%2F', '/'))
|
|
422
|
-
|
|
423
|
-
# query parameters
|
|
424
|
-
query_params = opts[:query_params] || {}
|
|
425
|
-
|
|
426
|
-
# header parameters
|
|
427
|
-
header_params = opts[:header_params] || {}
|
|
428
|
-
# HTTP header 'Accept' (if needed)
|
|
429
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
430
|
-
# HTTP header 'Content-Type'
|
|
431
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
|
432
|
-
|
|
433
|
-
# form parameters
|
|
434
|
-
form_params = opts[:form_params] || {}
|
|
435
|
-
|
|
436
|
-
# http body (model)
|
|
437
|
-
post_body = opts[:body] || @api_client.object_to_http_body(distribution)
|
|
438
|
-
|
|
439
|
-
# return_type
|
|
440
|
-
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
|
441
|
-
|
|
442
|
-
# auth_names
|
|
443
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
444
|
-
|
|
445
|
-
new_options = opts.merge(
|
|
446
|
-
:header_params => header_params,
|
|
447
|
-
:query_params => query_params,
|
|
448
|
-
:form_params => form_params,
|
|
449
|
-
:body => post_body,
|
|
450
|
-
:auth_names => auth_names,
|
|
451
|
-
:return_type => return_type
|
|
452
|
-
)
|
|
453
|
-
|
|
454
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
455
|
-
if @api_client.config.debugging
|
|
456
|
-
@api_client.config.logger.debug "API called: DistributionsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
457
|
-
end
|
|
458
|
-
return data, status_code, headers
|
|
459
|
-
end
|
|
460
129
|
end
|
|
461
130
|
end
|
|
@@ -19,66 +19,6 @@ module PulpcoreClient
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Delete a publication
|
|
23
|
-
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
24
|
-
# @param publication_href [String]
|
|
25
|
-
# @param [Hash] opts the optional parameters
|
|
26
|
-
# @return [nil]
|
|
27
|
-
def delete(publication_href, opts = {})
|
|
28
|
-
delete_with_http_info(publication_href, opts)
|
|
29
|
-
nil
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Delete a publication
|
|
33
|
-
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
34
|
-
# @param publication_href [String]
|
|
35
|
-
# @param [Hash] opts the optional parameters
|
|
36
|
-
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
37
|
-
def delete_with_http_info(publication_href, opts = {})
|
|
38
|
-
if @api_client.config.debugging
|
|
39
|
-
@api_client.config.logger.debug 'Calling API: PublicationsApi.delete ...'
|
|
40
|
-
end
|
|
41
|
-
# verify the required parameter 'publication_href' is set
|
|
42
|
-
if @api_client.config.client_side_validation && publication_href.nil?
|
|
43
|
-
fail ArgumentError, "Missing the required parameter 'publication_href' when calling PublicationsApi.delete"
|
|
44
|
-
end
|
|
45
|
-
# resource path
|
|
46
|
-
local_var_path = '{publication_href}'.sub('{' + 'publication_href' + '}', CGI.escape(publication_href.to_s).gsub('%2F', '/'))
|
|
47
|
-
|
|
48
|
-
# query parameters
|
|
49
|
-
query_params = opts[:query_params] || {}
|
|
50
|
-
|
|
51
|
-
# header parameters
|
|
52
|
-
header_params = opts[:header_params] || {}
|
|
53
|
-
|
|
54
|
-
# form parameters
|
|
55
|
-
form_params = opts[:form_params] || {}
|
|
56
|
-
|
|
57
|
-
# http body (model)
|
|
58
|
-
post_body = opts[:body]
|
|
59
|
-
|
|
60
|
-
# return_type
|
|
61
|
-
return_type = opts[:return_type]
|
|
62
|
-
|
|
63
|
-
# auth_names
|
|
64
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
65
|
-
|
|
66
|
-
new_options = opts.merge(
|
|
67
|
-
:header_params => header_params,
|
|
68
|
-
:query_params => query_params,
|
|
69
|
-
:form_params => form_params,
|
|
70
|
-
:body => post_body,
|
|
71
|
-
:auth_names => auth_names,
|
|
72
|
-
:return_type => return_type
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
76
|
-
if @api_client.config.debugging
|
|
77
|
-
@api_client.config.logger.debug "API called: PublicationsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
78
|
-
end
|
|
79
|
-
return data, status_code, headers
|
|
80
|
-
end
|
|
81
|
-
|
|
82
22
|
# List publications
|
|
83
23
|
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
84
24
|
# @param [Hash] opts the optional parameters
|
|
@@ -183,73 +123,5 @@ module PulpcoreClient
|
|
|
183
123
|
end
|
|
184
124
|
return data, status_code, headers
|
|
185
125
|
end
|
|
186
|
-
|
|
187
|
-
# Inspect a publication
|
|
188
|
-
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
189
|
-
# @param publication_href [String]
|
|
190
|
-
# @param [Hash] opts the optional parameters
|
|
191
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
192
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
193
|
-
# @return [PublicationResponse]
|
|
194
|
-
def read(publication_href, opts = {})
|
|
195
|
-
data, _status_code, _headers = read_with_http_info(publication_href, opts)
|
|
196
|
-
data
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# Inspect a publication
|
|
200
|
-
# A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
|
|
201
|
-
# @param publication_href [String]
|
|
202
|
-
# @param [Hash] opts the optional parameters
|
|
203
|
-
# @option opts [String] :fields A list of fields to include in the response.
|
|
204
|
-
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
205
|
-
# @return [Array<(PublicationResponse, Integer, Hash)>] PublicationResponse data, response status code and response headers
|
|
206
|
-
def read_with_http_info(publication_href, opts = {})
|
|
207
|
-
if @api_client.config.debugging
|
|
208
|
-
@api_client.config.logger.debug 'Calling API: PublicationsApi.read ...'
|
|
209
|
-
end
|
|
210
|
-
# verify the required parameter 'publication_href' is set
|
|
211
|
-
if @api_client.config.client_side_validation && publication_href.nil?
|
|
212
|
-
fail ArgumentError, "Missing the required parameter 'publication_href' when calling PublicationsApi.read"
|
|
213
|
-
end
|
|
214
|
-
# resource path
|
|
215
|
-
local_var_path = '{publication_href}'.sub('{' + 'publication_href' + '}', CGI.escape(publication_href.to_s).gsub('%2F', '/'))
|
|
216
|
-
|
|
217
|
-
# query parameters
|
|
218
|
-
query_params = opts[:query_params] || {}
|
|
219
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
220
|
-
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
|
221
|
-
|
|
222
|
-
# header parameters
|
|
223
|
-
header_params = opts[:header_params] || {}
|
|
224
|
-
# HTTP header 'Accept' (if needed)
|
|
225
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
226
|
-
|
|
227
|
-
# form parameters
|
|
228
|
-
form_params = opts[:form_params] || {}
|
|
229
|
-
|
|
230
|
-
# http body (model)
|
|
231
|
-
post_body = opts[:body]
|
|
232
|
-
|
|
233
|
-
# return_type
|
|
234
|
-
return_type = opts[:return_type] || 'PublicationResponse'
|
|
235
|
-
|
|
236
|
-
# auth_names
|
|
237
|
-
auth_names = opts[:auth_names] || ['basicAuth']
|
|
238
|
-
|
|
239
|
-
new_options = opts.merge(
|
|
240
|
-
:header_params => header_params,
|
|
241
|
-
:query_params => query_params,
|
|
242
|
-
:form_params => form_params,
|
|
243
|
-
:body => post_body,
|
|
244
|
-
:auth_names => auth_names,
|
|
245
|
-
:return_type => return_type
|
|
246
|
-
)
|
|
247
|
-
|
|
248
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
249
|
-
if @api_client.config.debugging
|
|
250
|
-
@api_client.config.logger.debug "API called: PublicationsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
251
|
-
end
|
|
252
|
-
return data, status_code, headers
|
|
253
|
-
end
|
|
254
126
|
end
|
|
255
127
|
end
|