pulp_ansible_client 0.2.0b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +150 -0
- data/Rakefile +10 -0
- data/docs/AnsibleCollectionsApi.md +66 -0
- data/docs/AnsibleDistribution.md +31 -0
- data/docs/AnsibleRemote.md +45 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/Collection.md +41 -0
- data/docs/CollectionRemote.md +47 -0
- data/docs/ContentCollectionsApi.md +134 -0
- data/docs/ContentRolesApi.md +186 -0
- data/docs/DistributionsAnsibleApi.md +352 -0
- data/docs/GalaxyCollection.md +25 -0
- data/docs/GalaxyRole.md +21 -0
- data/docs/GalaxyRoleVersion.md +19 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/InlineResponse2006.md +23 -0
- data/docs/InlineResponse2007.md +23 -0
- data/docs/PulpAnsibleApiApi.md +60 -0
- data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +113 -0
- data/docs/PulpAnsibleGalaxyApiRolesApi.md +67 -0
- data/docs/PulpAnsibleGalaxyApiV1VersionsApi.md +69 -0
- data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +67 -0
- data/docs/RemotesAnsibleApi.md +411 -0
- data/docs/RemotesCollectionApi.md +411 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/Role.md +29 -0
- data/git_push.sh +55 -0
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +94 -0
- data/lib/pulp_ansible_client/api/content_collections_api.rb +169 -0
- data/lib/pulp_ansible_client/api/content_roles_api.rb +228 -0
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +430 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +80 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +140 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +88 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +94 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +88 -0
- data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +504 -0
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +504 -0
- data/lib/pulp_ansible_client/api_client.rb +387 -0
- data/lib/pulp_ansible_client/api_error.rb +57 -0
- data/lib/pulp_ansible_client/configuration.rb +251 -0
- data/lib/pulp_ansible_client/models/ansible_distribution.rb +347 -0
- data/lib/pulp_ansible_client/models/ansible_remote.rb +539 -0
- data/lib/pulp_ansible_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_ansible_client/models/collection.rb +494 -0
- data/lib/pulp_ansible_client/models/collection_remote.rb +572 -0
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +304 -0
- data/lib/pulp_ansible_client/models/galaxy_role.rb +262 -0
- data/lib/pulp_ansible_client/models/galaxy_role_version.rb +229 -0
- data/lib/pulp_ansible_client/models/inline_response200.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2005.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2006.rb +235 -0
- data/lib/pulp_ansible_client/models/inline_response2007.rb +235 -0
- data/lib/pulp_ansible_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_ansible_client/models/role.rb +344 -0
- data/lib/pulp_ansible_client/version.rb +15 -0
- data/lib/pulp_ansible_client.rb +68 -0
- data/pulp_ansible_client.gemspec +45 -0
- data/spec/api/ansible_collections_api_spec.rb +48 -0
- data/spec/api/content_collections_api_spec.rb +67 -0
- data/spec/api/content_roles_api_spec.rb +78 -0
- data/spec/api/distributions_ansible_api_spec.rb +116 -0
- data/spec/api/pulp_ansible_api_api_spec.rb +46 -0
- data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +57 -0
- data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +48 -0
- data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +49 -0
- data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +48 -0
- data/spec/api/remotes_ansible_api_spec.rb +130 -0
- data/spec/api/remotes_collection_api_spec.rb +130 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/ansible_distribution_spec.rb +83 -0
- data/spec/models/ansible_remote_spec.rb +129 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/collection_remote_spec.rb +135 -0
- data/spec/models/collection_spec.rb +113 -0
- data/spec/models/galaxy_collection_spec.rb +65 -0
- data/spec/models/galaxy_role_spec.rb +53 -0
- data/spec/models/galaxy_role_version_spec.rb +47 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response2006_spec.rb +59 -0
- data/spec/models/inline_response2007_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/role_spec.rb +77 -0
- data/spec/spec_helper.rb +111 -0
- metadata +357 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module PulpAnsibleClient
|
|
16
|
+
class ContentCollectionsApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a collection
|
|
23
|
+
# ViewSet for Ansible Collection.
|
|
24
|
+
# @param data [Collection]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Collection]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a collection
|
|
33
|
+
# ViewSet for Ansible Collection.
|
|
34
|
+
# @param data [Collection]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Collection, Integer, Hash)>] Collection data, response status code and response headers
|
|
37
|
+
def create_with_http_info(data, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ContentCollectionsApi.create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'data' is set
|
|
42
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling ContentCollectionsApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/content/ansible/collections/'
|
|
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'])
|
|
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(data)
|
|
63
|
+
|
|
64
|
+
# return_type
|
|
65
|
+
return_type = opts[:return_type] || 'Collection'
|
|
66
|
+
|
|
67
|
+
# auth_names
|
|
68
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
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: ContentCollectionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List collections
|
|
87
|
+
# ViewSet for Ansible Collection.
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :name Filter results where name matches value
|
|
90
|
+
# @option opts [String] :namespace Filter results where namespace matches value
|
|
91
|
+
# @option opts [String] :version Filter results where version matches value
|
|
92
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
93
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
94
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
95
|
+
# @option opts [String] :latest
|
|
96
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
97
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
98
|
+
# @return [InlineResponse200]
|
|
99
|
+
def list(opts = {})
|
|
100
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
101
|
+
data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# List collections
|
|
105
|
+
# ViewSet for Ansible Collection.
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @option opts [String] :name Filter results where name matches value
|
|
108
|
+
# @option opts [String] :namespace Filter results where namespace matches value
|
|
109
|
+
# @option opts [String] :version Filter results where version matches value
|
|
110
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
111
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
112
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
113
|
+
# @option opts [String] :latest
|
|
114
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
115
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
116
|
+
# @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
|
|
117
|
+
def list_with_http_info(opts = {})
|
|
118
|
+
if @api_client.config.debugging
|
|
119
|
+
@api_client.config.logger.debug 'Calling API: ContentCollectionsApi.list ...'
|
|
120
|
+
end
|
|
121
|
+
# resource path
|
|
122
|
+
local_var_path = '/pulp/api/v3/content/ansible/collections/'
|
|
123
|
+
|
|
124
|
+
# query parameters
|
|
125
|
+
query_params = opts[:query_params] || {}
|
|
126
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
127
|
+
query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil?
|
|
128
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
129
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
130
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
131
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
132
|
+
query_params[:'latest'] = opts[:'latest'] if !opts[:'latest'].nil?
|
|
133
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
134
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
135
|
+
|
|
136
|
+
# header parameters
|
|
137
|
+
header_params = opts[:header_params] || {}
|
|
138
|
+
# HTTP header 'Accept' (if needed)
|
|
139
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:body]
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:return_type] || 'InlineResponse200'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:header_params => header_params,
|
|
155
|
+
:query_params => query_params,
|
|
156
|
+
:form_params => form_params,
|
|
157
|
+
:body => post_body,
|
|
158
|
+
:auth_names => auth_names,
|
|
159
|
+
:return_type => return_type
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
163
|
+
if @api_client.config.debugging
|
|
164
|
+
@api_client.config.logger.debug "API called: ContentCollectionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
165
|
+
end
|
|
166
|
+
return data, status_code, headers
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
end
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pulp 3 API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 4.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module PulpAnsibleClient
|
|
16
|
+
class ContentRolesApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Create a role
|
|
23
|
+
# ViewSet for Role.
|
|
24
|
+
# @param data [Role]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [Role]
|
|
27
|
+
def create(data, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_with_http_info(data, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create a role
|
|
33
|
+
# ViewSet for Role.
|
|
34
|
+
# @param data [Role]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(Role, Integer, Hash)>] Role data, response status code and response headers
|
|
37
|
+
def create_with_http_info(data, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ContentRolesApi.create ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'data' is set
|
|
42
|
+
if @api_client.config.client_side_validation && data.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling ContentRolesApi.create"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/pulp/api/v3/content/ansible/roles/'
|
|
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'])
|
|
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(data)
|
|
63
|
+
|
|
64
|
+
# return_type
|
|
65
|
+
return_type = opts[:return_type] || 'Role'
|
|
66
|
+
|
|
67
|
+
# auth_names
|
|
68
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
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: ContentRolesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
82
|
+
end
|
|
83
|
+
return data, status_code, headers
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# List roles
|
|
87
|
+
# ViewSet for Role.
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @option opts [String] :name Filter results where name matches value
|
|
90
|
+
# @option opts [String] :namespace Filter results where namespace matches value
|
|
91
|
+
# @option opts [String] :version Filter results where version matches value
|
|
92
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
93
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
94
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
95
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
96
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
97
|
+
# @return [InlineResponse2001]
|
|
98
|
+
def list(opts = {})
|
|
99
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
|
100
|
+
data
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# List roles
|
|
104
|
+
# ViewSet for Role.
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @option opts [String] :name Filter results where name matches value
|
|
107
|
+
# @option opts [String] :namespace Filter results where namespace matches value
|
|
108
|
+
# @option opts [String] :version Filter results where version matches value
|
|
109
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
110
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
111
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
112
|
+
# @option opts [Integer] :page A page number within the paginated result set.
|
|
113
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
|
114
|
+
# @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
|
|
115
|
+
def list_with_http_info(opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: ContentRolesApi.list ...'
|
|
118
|
+
end
|
|
119
|
+
# resource path
|
|
120
|
+
local_var_path = '/pulp/api/v3/content/ansible/roles/'
|
|
121
|
+
|
|
122
|
+
# query parameters
|
|
123
|
+
query_params = opts[:query_params] || {}
|
|
124
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
125
|
+
query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil?
|
|
126
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
127
|
+
query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
|
|
128
|
+
query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
|
|
129
|
+
query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
|
|
130
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
131
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
132
|
+
|
|
133
|
+
# header parameters
|
|
134
|
+
header_params = opts[:header_params] || {}
|
|
135
|
+
# HTTP header 'Accept' (if needed)
|
|
136
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
137
|
+
|
|
138
|
+
# form parameters
|
|
139
|
+
form_params = opts[:form_params] || {}
|
|
140
|
+
|
|
141
|
+
# http body (model)
|
|
142
|
+
post_body = opts[:body]
|
|
143
|
+
|
|
144
|
+
# return_type
|
|
145
|
+
return_type = opts[:return_type] || 'InlineResponse2001'
|
|
146
|
+
|
|
147
|
+
# auth_names
|
|
148
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
149
|
+
|
|
150
|
+
new_options = opts.merge(
|
|
151
|
+
:header_params => header_params,
|
|
152
|
+
:query_params => query_params,
|
|
153
|
+
:form_params => form_params,
|
|
154
|
+
:body => post_body,
|
|
155
|
+
:auth_names => auth_names,
|
|
156
|
+
:return_type => return_type
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug "API called: ContentRolesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
162
|
+
end
|
|
163
|
+
return data, status_code, headers
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Inspect a role
|
|
167
|
+
# ViewSet for Role.
|
|
168
|
+
# @param role_href [String] URI of Role. e.g.: /pulp/api/v3/content/ansible/roles/1/
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Role]
|
|
171
|
+
def read(role_href, opts = {})
|
|
172
|
+
data, _status_code, _headers = read_with_http_info(role_href, opts)
|
|
173
|
+
data
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Inspect a role
|
|
177
|
+
# ViewSet for Role.
|
|
178
|
+
# @param role_href [String] URI of Role. e.g.: /pulp/api/v3/content/ansible/roles/1/
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [Array<(Role, Integer, Hash)>] Role data, response status code and response headers
|
|
181
|
+
def read_with_http_info(role_href, opts = {})
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: ContentRolesApi.read ...'
|
|
184
|
+
end
|
|
185
|
+
# verify the required parameter 'role_href' is set
|
|
186
|
+
if @api_client.config.client_side_validation && role_href.nil?
|
|
187
|
+
fail ArgumentError, "Missing the required parameter 'role_href' when calling ContentRolesApi.read"
|
|
188
|
+
end
|
|
189
|
+
# resource path
|
|
190
|
+
local_var_path = '{role_href}'.sub('{' + 'role_href' + '}', role_href.to_s)
|
|
191
|
+
|
|
192
|
+
# query parameters
|
|
193
|
+
query_params = opts[:query_params] || {}
|
|
194
|
+
|
|
195
|
+
# header parameters
|
|
196
|
+
header_params = opts[:header_params] || {}
|
|
197
|
+
# HTTP header 'Accept' (if needed)
|
|
198
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
199
|
+
|
|
200
|
+
# form parameters
|
|
201
|
+
form_params = opts[:form_params] || {}
|
|
202
|
+
|
|
203
|
+
# http body (model)
|
|
204
|
+
post_body = opts[:body]
|
|
205
|
+
|
|
206
|
+
# return_type
|
|
207
|
+
return_type = opts[:return_type] || 'Role'
|
|
208
|
+
|
|
209
|
+
# auth_names
|
|
210
|
+
auth_names = opts[:auth_names] || ['Basic']
|
|
211
|
+
|
|
212
|
+
new_options = opts.merge(
|
|
213
|
+
:header_params => header_params,
|
|
214
|
+
:query_params => query_params,
|
|
215
|
+
:form_params => form_params,
|
|
216
|
+
:body => post_body,
|
|
217
|
+
:auth_names => auth_names,
|
|
218
|
+
:return_type => return_type
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
222
|
+
if @api_client.config.debugging
|
|
223
|
+
@api_client.config.logger.debug "API called: ContentRolesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
224
|
+
end
|
|
225
|
+
return data, status_code, headers
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
end
|