pulp_ansible_client 0.12.1 → 0.13.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 +52 -5
- data/docs/AnsibleAnsibleRepository.md +3 -1
- data/docs/AnsibleAnsibleRepositoryResponse.md +3 -1
- data/docs/AnsibleCollectionVersionResponse.md +4 -4
- data/docs/AnsibleCollectionVersionSignature.md +21 -0
- data/docs/AnsibleCollectionVersionSignatureResponse.md +2 -2
- data/docs/AnsibleGitRemote.md +27 -27
- data/docs/AnsibleGitRemoteResponse.md +23 -23
- data/docs/AnsibleRoleResponse.md +4 -4
- data/docs/CollectionVersionListResponse.md +25 -0
- data/docs/ContentCollectionSignaturesApi.md +64 -4
- data/docs/KeyringEnum.md +16 -0
- data/docs/{PaginatedCollectionVersionResponseList.md → PaginatedCollectionVersionListResponseList.md} +3 -3
- data/docs/PatchedansibleAnsibleRepository.md +3 -1
- data/docs/PatchedansibleGitRemote.md +27 -27
- data/docs/PulpAnsibleApiV3Api.md +8 -2
- data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +68 -0
- data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +8 -2
- data/docs/PulpAnsibleApiV3CollectionsAllApi.md +8 -2
- data/docs/PulpAnsibleApiV3CollectionsApi.md +81 -6
- data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +77 -6
- data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +8 -2
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +75 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +69 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +69 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +70 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +264 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +223 -0
- data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +75 -0
- data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +205 -1
- data/docs/PulpAnsibleDefaultApiApi.md +50 -0
- data/docs/PulpAnsibleDefaultApiV3Api.md +57 -0
- data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +68 -0
- data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +57 -0
- data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +71 -0
- data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +248 -0
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +211 -0
- data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +71 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +73 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +67 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +67 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +68 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +256 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +217 -0
- data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +73 -0
- data/lib/pulp_ansible_client/api/content_collection_signatures_api.rb +79 -4
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_artifacts_collections_api.rb +92 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collection_versions_all_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_all_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_api.rb +81 -9
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_versions_api.rb +87 -9
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_versions_docs_blob_api.rb +3 -3
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api.rb +103 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions_api.rb +94 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_api.rb +94 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts_api.rb +98 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api.rb +357 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api.rb +313 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob_api.rb +112 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_artifacts_collections_v3_api.rb +298 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_api.rb +74 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_api.rb +76 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_artifacts_collections_api.rb +92 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collection_versions_all_api.rb +76 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_all_api.rb +91 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_api.rb +309 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_versions_api.rb +277 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_versions_docs_blob_api.rb +100 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api.rb +97 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions_api.rb +88 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_api.rb +88 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts_api.rb +92 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api.rb +333 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api.rb +295 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob_api.rb +106 -0
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +15 -5
- data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +15 -5
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +14 -14
- data/lib/pulp_ansible_client/models/ansible_collection_version_signature.rb +238 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_signature_response.rb +0 -5
- data/lib/pulp_ansible_client/models/ansible_git_remote.rb +225 -225
- data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +130 -130
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +14 -14
- data/lib/pulp_ansible_client/models/collection_version_list_response.rb +269 -0
- data/lib/pulp_ansible_client/models/keyring_enum.rb +40 -0
- data/lib/pulp_ansible_client/models/{paginated_collection_version_response_list.rb → paginated_collection_version_list_response_list.rb} +4 -4
- data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +15 -5
- data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +220 -220
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +27 -1
- data/spec/api/content_collection_signatures_api_spec.rb +16 -2
- data/spec/api/pulp_ansible_api_v3_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_artifacts_collections_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_api_v3_collection_versions_all_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_collections_all_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_collections_api_spec.rb +16 -3
- data/spec/api/pulp_ansible_api_v3_collections_versions_api_spec.rb +17 -3
- data/spec/api/pulp_ansible_api_v3_collections_versions_docs_blob_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +52 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_versions_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_artifacts_api_spec.rb +50 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api_spec.rb +99 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +94 -0
- data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_versions_docs_blob_api_spec.rb +52 -0
- data/spec/api/pulp_ansible_artifacts_collections_v3_api_spec.rb +51 -0
- data/spec/api/pulp_ansible_default_api_api_spec.rb +45 -0
- data/spec/api/pulp_ansible_default_api_v3_api_spec.rb +45 -0
- data/spec/api/pulp_ansible_default_api_v3_artifacts_collections_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_default_api_v3_collection_versions_all_api_spec.rb +45 -0
- data/spec/api/pulp_ansible_default_api_v3_collections_all_api_spec.rb +50 -0
- data/spec/api/pulp_ansible_default_api_v3_collections_api_spec.rb +91 -0
- data/spec/api/pulp_ansible_default_api_v3_collections_versions_api_spec.rb +88 -0
- data/spec/api/pulp_ansible_default_api_v3_collections_versions_docs_blob_api_spec.rb +50 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +51 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_versions_api_spec.rb +48 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_api_spec.rb +48 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_artifacts_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api_spec.rb +95 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_api_spec.rb +91 -0
- data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_versions_docs_blob_api_spec.rb +51 -0
- data/spec/models/ansible_ansible_repository_response_spec.rb +6 -0
- data/spec/models/ansible_ansible_repository_spec.rb +6 -0
- data/spec/models/ansible_collection_version_response_spec.rb +2 -2
- data/spec/models/ansible_collection_version_signature_spec.rb +53 -0
- data/spec/models/ansible_git_remote_response_spec.rb +18 -18
- data/spec/models/ansible_git_remote_spec.rb +19 -19
- data/spec/models/ansible_role_response_spec.rb +2 -2
- data/spec/models/collection_version_list_response_spec.rb +65 -0
- data/spec/models/keyring_enum_spec.rb +35 -0
- data/spec/models/{paginated_collection_version_response_list_spec.rb → paginated_collection_version_list_response_list_spec.rb} +6 -6
- data/spec/models/patchedansible_ansible_repository_spec.rb +6 -0
- data/spec/models/patchedansible_git_remote_spec.rb +19 -19
- metadata +109 -5
@@ -0,0 +1,92 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpAnsibleClient
|
16
|
+
class PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Collection download endpoint.
|
23
|
+
# @param distro_base_path [String]
|
24
|
+
# @param filename [String]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
27
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
28
|
+
# @return [nil]
|
29
|
+
def download(distro_base_path, filename, opts = {})
|
30
|
+
download_with_http_info(distro_base_path, filename, opts)
|
31
|
+
nil
|
32
|
+
end
|
33
|
+
|
34
|
+
# Collection download endpoint.
|
35
|
+
# @param distro_base_path [String]
|
36
|
+
# @param filename [String]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
39
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def download_with_http_info(distro_base_path, filename, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.download ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'distro_base_path' is set
|
46
|
+
if @api_client.config.client_side_validation && distro_base_path.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'distro_base_path' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.download"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'filename' is set
|
50
|
+
if @api_client.config.client_side_validation && filename.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'filename' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.download"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/artifacts/{filename}'.sub('{' + 'distro_base_path' + '}', CGI.escape(distro_base_path.to_s).gsub('%2F', '/')).sub('{' + 'filename' + '}', CGI.escape(filename.to_s).gsub('%2F', '/'))
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
59
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:body]
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type]
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
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(:GET, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi#download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,333 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpAnsibleClient
|
16
|
+
class PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Trigger an asynchronous delete task
|
23
|
+
# @param distro_base_path [String]
|
24
|
+
# @param name [String]
|
25
|
+
# @param namespace [String]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [AsyncOperationResponse]
|
28
|
+
def delete(distro_base_path, name, namespace, opts = {})
|
29
|
+
data, _status_code, _headers = delete_with_http_info(distro_base_path, name, namespace, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Trigger an asynchronous delete task
|
34
|
+
# @param distro_base_path [String]
|
35
|
+
# @param name [String]
|
36
|
+
# @param namespace [String]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
39
|
+
def delete_with_http_info(distro_base_path, name, namespace, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.delete ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'distro_base_path' is set
|
44
|
+
if @api_client.config.client_side_validation && distro_base_path.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'distro_base_path' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.delete"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'name' is set
|
48
|
+
if @api_client.config.client_side_validation && name.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.delete"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'namespace' is set
|
52
|
+
if @api_client.config.client_side_validation && namespace.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.delete"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/'.sub('{' + 'distro_base_path' + '}', CGI.escape(distro_base_path.to_s).gsub('%2F', '/')).sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/'))
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = opts[:query_params] || {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = opts[:body]
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
74
|
+
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
77
|
+
|
78
|
+
new_options = opts.merge(
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => return_type
|
85
|
+
)
|
86
|
+
|
87
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
88
|
+
if @api_client.config.debugging
|
89
|
+
@api_client.config.logger.debug "API called: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
90
|
+
end
|
91
|
+
return data, status_code, headers
|
92
|
+
end
|
93
|
+
|
94
|
+
# ViewSet for Collections.
|
95
|
+
# @param distro_base_path [String]
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [Boolean] :deprecated
|
98
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
99
|
+
# @option opts [String] :name
|
100
|
+
# @option opts [String] :namespace
|
101
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
102
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
103
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
104
|
+
# @return [PaginatedCollectionResponseList]
|
105
|
+
def list(distro_base_path, opts = {})
|
106
|
+
data, _status_code, _headers = list_with_http_info(distro_base_path, opts)
|
107
|
+
data
|
108
|
+
end
|
109
|
+
|
110
|
+
# ViewSet for Collections.
|
111
|
+
# @param distro_base_path [String]
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @option opts [Boolean] :deprecated
|
114
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
115
|
+
# @option opts [String] :name
|
116
|
+
# @option opts [String] :namespace
|
117
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
118
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
119
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
120
|
+
# @return [Array<(PaginatedCollectionResponseList, Integer, Hash)>] PaginatedCollectionResponseList data, response status code and response headers
|
121
|
+
def list_with_http_info(distro_base_path, opts = {})
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.list ...'
|
124
|
+
end
|
125
|
+
# verify the required parameter 'distro_base_path' is set
|
126
|
+
if @api_client.config.client_side_validation && distro_base_path.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'distro_base_path' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.list"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/'.sub('{' + 'distro_base_path' + '}', CGI.escape(distro_base_path.to_s).gsub('%2F', '/'))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
query_params[:'deprecated'] = opts[:'deprecated'] if !opts[:'deprecated'].nil?
|
135
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
136
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
137
|
+
query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil?
|
138
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
139
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
140
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
141
|
+
|
142
|
+
# header parameters
|
143
|
+
header_params = opts[:header_params] || {}
|
144
|
+
# HTTP header 'Accept' (if needed)
|
145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
146
|
+
|
147
|
+
# form parameters
|
148
|
+
form_params = opts[:form_params] || {}
|
149
|
+
|
150
|
+
# http body (model)
|
151
|
+
post_body = opts[:body]
|
152
|
+
|
153
|
+
# return_type
|
154
|
+
return_type = opts[:return_type] || 'PaginatedCollectionResponseList'
|
155
|
+
|
156
|
+
# auth_names
|
157
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
158
|
+
|
159
|
+
new_options = opts.merge(
|
160
|
+
:header_params => header_params,
|
161
|
+
:query_params => query_params,
|
162
|
+
:form_params => form_params,
|
163
|
+
:body => post_body,
|
164
|
+
:auth_names => auth_names,
|
165
|
+
:return_type => return_type
|
166
|
+
)
|
167
|
+
|
168
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug "API called: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
171
|
+
end
|
172
|
+
return data, status_code, headers
|
173
|
+
end
|
174
|
+
|
175
|
+
# ViewSet for Collections.
|
176
|
+
# @param distro_base_path [String]
|
177
|
+
# @param name [String]
|
178
|
+
# @param namespace [String]
|
179
|
+
# @param [Hash] opts the optional parameters
|
180
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
181
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
182
|
+
# @return [CollectionResponse]
|
183
|
+
def read(distro_base_path, name, namespace, opts = {})
|
184
|
+
data, _status_code, _headers = read_with_http_info(distro_base_path, name, namespace, opts)
|
185
|
+
data
|
186
|
+
end
|
187
|
+
|
188
|
+
# ViewSet for Collections.
|
189
|
+
# @param distro_base_path [String]
|
190
|
+
# @param name [String]
|
191
|
+
# @param namespace [String]
|
192
|
+
# @param [Hash] opts the optional parameters
|
193
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
194
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
195
|
+
# @return [Array<(CollectionResponse, Integer, Hash)>] CollectionResponse data, response status code and response headers
|
196
|
+
def read_with_http_info(distro_base_path, name, namespace, opts = {})
|
197
|
+
if @api_client.config.debugging
|
198
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.read ...'
|
199
|
+
end
|
200
|
+
# verify the required parameter 'distro_base_path' is set
|
201
|
+
if @api_client.config.client_side_validation && distro_base_path.nil?
|
202
|
+
fail ArgumentError, "Missing the required parameter 'distro_base_path' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.read"
|
203
|
+
end
|
204
|
+
# verify the required parameter 'name' is set
|
205
|
+
if @api_client.config.client_side_validation && name.nil?
|
206
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.read"
|
207
|
+
end
|
208
|
+
# verify the required parameter 'namespace' is set
|
209
|
+
if @api_client.config.client_side_validation && namespace.nil?
|
210
|
+
fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.read"
|
211
|
+
end
|
212
|
+
# resource path
|
213
|
+
local_var_path = '/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/'.sub('{' + 'distro_base_path' + '}', CGI.escape(distro_base_path.to_s).gsub('%2F', '/')).sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/'))
|
214
|
+
|
215
|
+
# query parameters
|
216
|
+
query_params = opts[:query_params] || {}
|
217
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
218
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
219
|
+
|
220
|
+
# header parameters
|
221
|
+
header_params = opts[:header_params] || {}
|
222
|
+
# HTTP header 'Accept' (if needed)
|
223
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
224
|
+
|
225
|
+
# form parameters
|
226
|
+
form_params = opts[:form_params] || {}
|
227
|
+
|
228
|
+
# http body (model)
|
229
|
+
post_body = opts[:body]
|
230
|
+
|
231
|
+
# return_type
|
232
|
+
return_type = opts[:return_type] || 'CollectionResponse'
|
233
|
+
|
234
|
+
# auth_names
|
235
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
236
|
+
|
237
|
+
new_options = opts.merge(
|
238
|
+
:header_params => header_params,
|
239
|
+
:query_params => query_params,
|
240
|
+
:form_params => form_params,
|
241
|
+
:body => post_body,
|
242
|
+
:auth_names => auth_names,
|
243
|
+
:return_type => return_type
|
244
|
+
)
|
245
|
+
|
246
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
247
|
+
if @api_client.config.debugging
|
248
|
+
@api_client.config.logger.debug "API called: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
249
|
+
end
|
250
|
+
return data, status_code, headers
|
251
|
+
end
|
252
|
+
|
253
|
+
# Trigger an asynchronous update task
|
254
|
+
# @param distro_base_path [String]
|
255
|
+
# @param name [String]
|
256
|
+
# @param namespace [String]
|
257
|
+
# @param body [Object]
|
258
|
+
# @param [Hash] opts the optional parameters
|
259
|
+
# @return [AsyncOperationResponse]
|
260
|
+
def update(distro_base_path, name, namespace, body, opts = {})
|
261
|
+
data, _status_code, _headers = update_with_http_info(distro_base_path, name, namespace, body, opts)
|
262
|
+
data
|
263
|
+
end
|
264
|
+
|
265
|
+
# Trigger an asynchronous update task
|
266
|
+
# @param distro_base_path [String]
|
267
|
+
# @param name [String]
|
268
|
+
# @param namespace [String]
|
269
|
+
# @param body [Object]
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
272
|
+
def update_with_http_info(distro_base_path, name, namespace, body, opts = {})
|
273
|
+
if @api_client.config.debugging
|
274
|
+
@api_client.config.logger.debug 'Calling API: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.update ...'
|
275
|
+
end
|
276
|
+
# verify the required parameter 'distro_base_path' is set
|
277
|
+
if @api_client.config.client_side_validation && distro_base_path.nil?
|
278
|
+
fail ArgumentError, "Missing the required parameter 'distro_base_path' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.update"
|
279
|
+
end
|
280
|
+
# verify the required parameter 'name' is set
|
281
|
+
if @api_client.config.client_side_validation && name.nil?
|
282
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.update"
|
283
|
+
end
|
284
|
+
# verify the required parameter 'namespace' is set
|
285
|
+
if @api_client.config.client_side_validation && namespace.nil?
|
286
|
+
fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.update"
|
287
|
+
end
|
288
|
+
# verify the required parameter 'body' is set
|
289
|
+
if @api_client.config.client_side_validation && body.nil?
|
290
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.update"
|
291
|
+
end
|
292
|
+
# resource path
|
293
|
+
local_var_path = '/pulp_ansible/galaxy/default/api/v3/plugin/ansible/content/{distro_base_path}/collections/index/{namespace}/{name}/'.sub('{' + 'distro_base_path' + '}', CGI.escape(distro_base_path.to_s).gsub('%2F', '/')).sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/'))
|
294
|
+
|
295
|
+
# query parameters
|
296
|
+
query_params = opts[:query_params] || {}
|
297
|
+
|
298
|
+
# header parameters
|
299
|
+
header_params = opts[:header_params] || {}
|
300
|
+
# HTTP header 'Accept' (if needed)
|
301
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
302
|
+
# HTTP header 'Content-Type'
|
303
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
304
|
+
|
305
|
+
# form parameters
|
306
|
+
form_params = opts[:form_params] || {}
|
307
|
+
|
308
|
+
# http body (model)
|
309
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
310
|
+
|
311
|
+
# return_type
|
312
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
313
|
+
|
314
|
+
# auth_names
|
315
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
316
|
+
|
317
|
+
new_options = opts.merge(
|
318
|
+
:header_params => header_params,
|
319
|
+
:query_params => query_params,
|
320
|
+
:form_params => form_params,
|
321
|
+
:body => post_body,
|
322
|
+
:auth_names => auth_names,
|
323
|
+
:return_type => return_type
|
324
|
+
)
|
325
|
+
|
326
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug "API called: PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
329
|
+
end
|
330
|
+
return data, status_code, headers
|
331
|
+
end
|
332
|
+
end
|
333
|
+
end
|