pulp_ansible_client 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -21
  3. data/docs/AnsibleCollectionVersionResponse.md +3 -3
  4. data/docs/AnsibleCollectionsApi.md +43 -43
  5. data/docs/AnsibleRoleResponse.md +3 -3
  6. data/docs/CollectionVersionDocsResponse.md +17 -0
  7. data/docs/GalaxyCollectionListApi.md +7 -9
  8. data/docs/GalaxyDetailApi.md +5 -5
  9. data/docs/PulpAnsibleApiApi.md +5 -5
  10. data/docs/PulpAnsibleGalaxyApiV2VersionsApi.md +5 -5
  11. data/docs/PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.md +67 -0
  12. data/docs/RoleListApi.md +5 -5
  13. data/docs/V1RolesApi.md +5 -5
  14. data/docs/V2CollectionsApi.md +26 -26
  15. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +70 -70
  16. data/lib/pulp_ansible_client/api/galaxy_collection_list_api.rb +9 -12
  17. data/lib/pulp_ansible_client/api/galaxy_detail_api.rb +6 -6
  18. data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +6 -6
  19. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +9 -9
  20. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api.rb +106 -0
  21. data/lib/pulp_ansible_client/api/role_list_api.rb +6 -6
  22. data/lib/pulp_ansible_client/api/v1_roles_api.rb +6 -6
  23. data/lib/pulp_ansible_client/api/v2_collections_api.rb +43 -43
  24. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +0 -44
  25. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +10 -54
  26. data/lib/pulp_ansible_client/models/ansible_role_response.rb +10 -10
  27. data/lib/pulp_ansible_client/models/collection_metadata_response.rb +0 -68
  28. data/lib/pulp_ansible_client/models/collection_version_docs_response.rb +212 -0
  29. data/lib/pulp_ansible_client/version.rb +1 -1
  30. data/lib/pulp_ansible_client.rb +2 -0
  31. data/spec/api/ansible_collections_api_spec.rb +16 -16
  32. data/spec/api/galaxy_collection_list_api_spec.rb +3 -4
  33. data/spec/api/galaxy_detail_api_spec.rb +2 -2
  34. data/spec/api/pulp_ansible_api_api_spec.rb +2 -2
  35. data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +2 -2
  36. data/spec/api/pulp_ansible_galaxy_api_v3_collections_docs_blob_api_spec.rb +51 -0
  37. data/spec/api/role_list_api_spec.rb +2 -2
  38. data/spec/api/v1_roles_api_spec.rb +2 -2
  39. data/spec/api/v2_collections_api_spec.rb +12 -12
  40. data/spec/models/ansible_collection_version_response_spec.rb +3 -3
  41. data/spec/models/ansible_role_response_spec.rb +3 -3
  42. data/spec/models/collection_version_docs_response_spec.rb +41 -0
  43. metadata +10 -2
@@ -4,18 +4,18 @@ All URIs are relative to *http://pulp*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**create**](V2CollectionsApi.md#create) | **POST** {ansible_collection_href}api/v2/collections/ |
8
- [**list**](V2CollectionsApi.md#list) | **GET** {ansible_collection_href}api/v2/collections/ |
7
+ [**get**](V2CollectionsApi.md#get) | **GET** {ansible_collection_href}api/v2/collections/ |
8
+ [**post**](V2CollectionsApi.md#post) | **POST** {ansible_collection_href}api/v2/collections/ |
9
9
 
10
10
 
11
11
 
12
- ## create
12
+ ## get
13
13
 
14
- > GalaxyCollectionResponse create(ansible_collection_href, galaxy_collection)
14
+ > InlineResponse20011 get(ansible_collection_href, opts)
15
15
 
16
16
 
17
17
 
18
- Queues a task that creates a new Collection from an uploaded artifact.
18
+ View for Collection models.
19
19
 
20
20
  ### Example
21
21
 
@@ -25,13 +25,17 @@ require 'pulp_ansible_client'
25
25
 
26
26
  api_instance = PulpAnsibleClient::V2CollectionsApi.new
27
27
  ansible_collection_href = 'ansible_collection_href_example' # String |
28
- galaxy_collection = PulpAnsibleClient::GalaxyCollection.new # GalaxyCollection |
28
+ opts = {
29
+ page: 56, # Integer | A page number within the paginated result set.
30
+ fields: 'fields_example', # String | A list of fields to include in the response.
31
+ exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
32
+ }
29
33
 
30
34
  begin
31
- result = api_instance.create(ansible_collection_href, galaxy_collection)
35
+ result = api_instance.get(ansible_collection_href, opts)
32
36
  p result
33
37
  rescue PulpAnsibleClient::ApiError => e
34
- puts "Exception when calling V2CollectionsApi->create: #{e}"
38
+ puts "Exception when calling V2CollectionsApi->get: #{e}"
35
39
  end
36
40
  ```
37
41
 
@@ -41,11 +45,13 @@ end
41
45
  Name | Type | Description | Notes
42
46
  ------------- | ------------- | ------------- | -------------
43
47
  **ansible_collection_href** | **String**| |
44
- **galaxy_collection** | [**GalaxyCollection**](GalaxyCollection.md)| |
48
+ **page** | **Integer**| A page number within the paginated result set. | [optional]
49
+ **fields** | **String**| A list of fields to include in the response. | [optional]
50
+ **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
45
51
 
46
52
  ### Return type
47
53
 
48
- [**GalaxyCollectionResponse**](GalaxyCollectionResponse.md)
54
+ [**InlineResponse20011**](InlineResponse20011.md)
49
55
 
50
56
  ### Authorization
51
57
 
@@ -53,17 +59,17 @@ No authorization required
53
59
 
54
60
  ### HTTP request headers
55
61
 
56
- - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
62
+ - **Content-Type**: Not defined
57
63
  - **Accept**: application/json
58
64
 
59
65
 
60
- ## list
66
+ ## post
61
67
 
62
- > InlineResponse20011 list(ansible_collection_href, opts)
68
+ > GalaxyCollectionResponse post(ansible_collection_href, galaxy_collection)
63
69
 
64
70
 
65
71
 
66
- View for Collection models.
72
+ Queues a task that creates a new Collection from an uploaded artifact.
67
73
 
68
74
  ### Example
69
75
 
@@ -73,17 +79,13 @@ require 'pulp_ansible_client'
73
79
 
74
80
  api_instance = PulpAnsibleClient::V2CollectionsApi.new
75
81
  ansible_collection_href = 'ansible_collection_href_example' # String |
76
- opts = {
77
- page: 56, # Integer | A page number within the paginated result set.
78
- fields: 'fields_example', # String | A list of fields to include in the response.
79
- exclude_fields: 'exclude_fields_example' # String | A list of fields to exclude from the response.
80
- }
82
+ galaxy_collection = PulpAnsibleClient::GalaxyCollection.new # GalaxyCollection |
81
83
 
82
84
  begin
83
- result = api_instance.list(ansible_collection_href, opts)
85
+ result = api_instance.post(ansible_collection_href, galaxy_collection)
84
86
  p result
85
87
  rescue PulpAnsibleClient::ApiError => e
86
- puts "Exception when calling V2CollectionsApi->list: #{e}"
88
+ puts "Exception when calling V2CollectionsApi->post: #{e}"
87
89
  end
88
90
  ```
89
91
 
@@ -93,13 +95,11 @@ end
93
95
  Name | Type | Description | Notes
94
96
  ------------- | ------------- | ------------- | -------------
95
97
  **ansible_collection_href** | **String**| |
96
- **page** | **Integer**| A page number within the paginated result set. | [optional]
97
- **fields** | **String**| A list of fields to include in the response. | [optional]
98
- **exclude_fields** | **String**| A list of fields to exclude from the response. | [optional]
98
+ **galaxy_collection** | [**GalaxyCollection**](GalaxyCollection.md)| |
99
99
 
100
100
  ### Return type
101
101
 
102
- [**InlineResponse20011**](InlineResponse20011.md)
102
+ [**GalaxyCollectionResponse**](GalaxyCollectionResponse.md)
103
103
 
104
104
  ### Authorization
105
105
 
@@ -107,6 +107,6 @@ No authorization required
107
107
 
108
108
  ### HTTP request headers
109
109
 
110
- - **Content-Type**: Not defined
110
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
111
111
  - **Accept**: application/json
112
112
 
@@ -19,63 +19,63 @@ module PulpAnsibleClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Upload a collection
23
- # Create an artifact and trigger an asynchronous task to create Collection content from it.
24
- # @param file [File] The Collection tarball.
22
+ # List collections
23
+ # Viewset for Ansible Collections.
25
24
  # @param [Hash] opts the optional parameters
26
- # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
27
- # @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
28
- # @option opts [String] :expected_name The expected 'name' of the Collection to be verified against the metadata during import.
29
- # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
30
- # @return [AsyncOperationResponse]
31
- def create(file, opts = {})
32
- data, _status_code, _headers = create_with_http_info(file, opts)
25
+ # @option opts [Integer] :limit Number of results to return per page.
26
+ # @option opts [String] :name name
27
+ # @option opts [String] :namespace namespace
28
+ # @option opts [Integer] :offset The initial index from which to return the results.
29
+ # @option opts [String] :ordering Which field to use when ordering the results.
30
+ # @option opts [String] :fields A list of fields to include in the response.
31
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
32
+ # @return [InlineResponse200]
33
+ def list(opts = {})
34
+ data, _status_code, _headers = list_with_http_info(opts)
33
35
  data
34
36
  end
35
37
 
36
- # Upload a collection
37
- # Create an artifact and trigger an asynchronous task to create Collection content from it.
38
- # @param file [File] The Collection tarball.
38
+ # List collections
39
+ # Viewset for Ansible Collections.
39
40
  # @param [Hash] opts the optional parameters
40
- # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
41
- # @option opts [String] :expected_namespace The expected 'namespace' of the Collection to be verified against the metadata during import.
42
- # @option opts [String] :expected_name The expected 'name' of the Collection to be verified against the metadata during import.
43
- # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
44
- # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
45
- def create_with_http_info(file, opts = {})
41
+ # @option opts [Integer] :limit Number of results to return per page.
42
+ # @option opts [String] :name name
43
+ # @option opts [String] :namespace namespace
44
+ # @option opts [Integer] :offset The initial index from which to return the results.
45
+ # @option opts [String] :ordering Which field to use when ordering the results.
46
+ # @option opts [String] :fields A list of fields to include in the response.
47
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
48
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
49
+ def list_with_http_info(opts = {})
46
50
  if @api_client.config.debugging
47
- @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.create ...'
48
- end
49
- # verify the required parameter 'file' is set
50
- if @api_client.config.client_side_validation && file.nil?
51
- fail ArgumentError, "Missing the required parameter 'file' when calling AnsibleCollectionsApi.create"
51
+ @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.list ...'
52
52
  end
53
53
  # resource path
54
- local_var_path = '/ansible/collections/'
54
+ local_var_path = '/pulp/api/v3/ansible/collections/'
55
55
 
56
56
  # query parameters
57
57
  query_params = opts[:query_params] || {}
58
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
59
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
60
+ query_params[:'namespace'] = opts[:'namespace'] if !opts[:'namespace'].nil?
61
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
62
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
63
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
64
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
58
65
 
59
66
  # header parameters
60
67
  header_params = opts[:header_params] || {}
61
68
  # HTTP header 'Accept' (if needed)
62
69
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
- # HTTP header 'Content-Type'
64
- header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
65
70
 
66
71
  # form parameters
67
72
  form_params = opts[:form_params] || {}
68
- form_params['file'] = file
69
- form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
70
- form_params['expected_namespace'] = opts[:'expected_namespace'] if !opts[:'expected_namespace'].nil?
71
- form_params['expected_name'] = opts[:'expected_name'] if !opts[:'expected_name'].nil?
72
- form_params['expected_version'] = opts[:'expected_version'] if !opts[:'expected_version'].nil?
73
73
 
74
74
  # http body (model)
75
75
  post_body = opts[:body]
76
76
 
77
77
  # return_type
78
- return_type = opts[:return_type] || 'AsyncOperationResponse'
78
+ return_type = opts[:return_type] || 'InlineResponse200'
79
79
 
80
80
  # auth_names
81
81
  auth_names = opts[:auth_names] || ['basicAuth']
@@ -89,70 +89,70 @@ module PulpAnsibleClient
89
89
  :return_type => return_type
90
90
  )
91
91
 
92
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
92
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
93
93
  if @api_client.config.debugging
94
- @api_client.config.logger.debug "API called: AnsibleCollectionsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ @api_client.config.logger.debug "API called: AnsibleCollectionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
95
  end
96
96
  return data, status_code, headers
97
97
  end
98
98
 
99
- # List collections
100
- # Viewset for Ansible Collections.
99
+ # Upload a collection
100
+ # Create an artifact and trigger an asynchronous task to create Collection content from it.
101
+ # @param file [File] The Collection tarball.
101
102
  # @param [Hash] opts the optional parameters
102
- # @option opts [Integer] :limit Number of results to return per page.
103
- # @option opts [String] :name name
104
- # @option opts [String] :namespace namespace
105
- # @option opts [Integer] :offset The initial index from which to return the results.
106
- # @option opts [String] :ordering Which field to use when ordering the results.
107
- # @option opts [String] :fields A list of fields to include in the response.
108
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
109
- # @return [InlineResponse200]
110
- def list(opts = {})
111
- data, _status_code, _headers = list_with_http_info(opts)
103
+ # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
104
+ # @option opts [String] :expected_namespace The expected &#39;namespace&#39; of the Collection to be verified against the metadata during import.
105
+ # @option opts [String] :expected_name The expected &#39;name&#39; of the Collection to be verified against the metadata during import.
106
+ # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
107
+ # @return [AsyncOperationResponse]
108
+ def upload_collection(file, opts = {})
109
+ data, _status_code, _headers = upload_collection_with_http_info(file, opts)
112
110
  data
113
111
  end
114
112
 
115
- # List collections
116
- # Viewset for Ansible Collections.
113
+ # Upload a collection
114
+ # Create an artifact and trigger an asynchronous task to create Collection content from it.
115
+ # @param file [File] The Collection tarball.
117
116
  # @param [Hash] opts the optional parameters
118
- # @option opts [Integer] :limit Number of results to return per page.
119
- # @option opts [String] :name name
120
- # @option opts [String] :namespace namespace
121
- # @option opts [Integer] :offset The initial index from which to return the results.
122
- # @option opts [String] :ordering Which field to use when ordering the results.
123
- # @option opts [String] :fields A list of fields to include in the response.
124
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
125
- # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
126
- def list_with_http_info(opts = {})
117
+ # @option opts [String] :sha256 An optional sha256 checksum of the uploaded file.
118
+ # @option opts [String] :expected_namespace The expected &#39;namespace&#39; of the Collection to be verified against the metadata during import.
119
+ # @option opts [String] :expected_name The expected &#39;name&#39; of the Collection to be verified against the metadata during import.
120
+ # @option opts [String] :expected_version The expected version of the Collection to be verified against the metadata during import.
121
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
122
+ def upload_collection_with_http_info(file, opts = {})
127
123
  if @api_client.config.debugging
128
- @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.list ...'
124
+ @api_client.config.logger.debug 'Calling API: AnsibleCollectionsApi.upload_collection ...'
125
+ end
126
+ # verify the required parameter 'file' is set
127
+ if @api_client.config.client_side_validation && file.nil?
128
+ fail ArgumentError, "Missing the required parameter 'file' when calling AnsibleCollectionsApi.upload_collection"
129
129
  end
130
130
  # resource path
131
- local_var_path = '/pulp/api/v3/ansible/collections/'
131
+ local_var_path = '/ansible/collections/'
132
132
 
133
133
  # query parameters
134
134
  query_params = opts[:query_params] || {}
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[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
140
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
141
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
142
135
 
143
136
  # header parameters
144
137
  header_params = opts[:header_params] || {}
145
138
  # HTTP header 'Accept' (if needed)
146
139
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
140
+ # HTTP header 'Content-Type'
141
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
147
142
 
148
143
  # form parameters
149
144
  form_params = opts[:form_params] || {}
145
+ form_params['file'] = file
146
+ form_params['sha256'] = opts[:'sha256'] if !opts[:'sha256'].nil?
147
+ form_params['expected_namespace'] = opts[:'expected_namespace'] if !opts[:'expected_namespace'].nil?
148
+ form_params['expected_name'] = opts[:'expected_name'] if !opts[:'expected_name'].nil?
149
+ form_params['expected_version'] = opts[:'expected_version'] if !opts[:'expected_version'].nil?
150
150
 
151
151
  # http body (model)
152
152
  post_body = opts[:body]
153
153
 
154
154
  # return_type
155
- return_type = opts[:return_type] || 'InlineResponse200'
155
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
156
156
 
157
157
  # auth_names
158
158
  auth_names = opts[:auth_names] || ['basicAuth']
@@ -166,9 +166,9 @@ module PulpAnsibleClient
166
166
  :return_type => return_type
167
167
  )
168
168
 
169
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
169
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
170
170
  if @api_client.config.debugging
171
- @api_client.config.logger.debug "API called: AnsibleCollectionsApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
+ @api_client.config.logger.debug "API called: AnsibleCollectionsApi#upload_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
172
172
  end
173
173
  return data, status_code, headers
174
174
  end
@@ -22,39 +22,36 @@ module PulpAnsibleClient
22
22
  # APIView for Collections by namespace/name.
23
23
  # @param ansible_collection_version_href [String]
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [Integer] :limit Number of results to return per page.
26
- # @option opts [Integer] :offset The initial index from which to return the results.
25
+ # @option opts [Integer] :page A page number within the paginated result set.
27
26
  # @option opts [String] :fields A list of fields to include in the response.
28
27
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
29
28
  # @return [InlineResponse20012]
30
- def list(ansible_collection_version_href, opts = {})
31
- data, _status_code, _headers = list_with_http_info(ansible_collection_version_href, opts)
29
+ def get(ansible_collection_version_href, opts = {})
30
+ data, _status_code, _headers = get_with_http_info(ansible_collection_version_href, opts)
32
31
  data
33
32
  end
34
33
 
35
34
  # APIView for Collections by namespace/name.
36
35
  # @param ansible_collection_version_href [String]
37
36
  # @param [Hash] opts the optional parameters
38
- # @option opts [Integer] :limit Number of results to return per page.
39
- # @option opts [Integer] :offset The initial index from which to return the results.
37
+ # @option opts [Integer] :page A page number within the paginated result set.
40
38
  # @option opts [String] :fields A list of fields to include in the response.
41
39
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
42
40
  # @return [Array<(InlineResponse20012, Integer, Hash)>] InlineResponse20012 data, response status code and response headers
43
- def list_with_http_info(ansible_collection_version_href, opts = {})
41
+ def get_with_http_info(ansible_collection_version_href, opts = {})
44
42
  if @api_client.config.debugging
45
- @api_client.config.logger.debug 'Calling API: GalaxyCollectionListApi.list ...'
43
+ @api_client.config.logger.debug 'Calling API: GalaxyCollectionListApi.get ...'
46
44
  end
47
45
  # verify the required parameter 'ansible_collection_version_href' is set
48
46
  if @api_client.config.client_side_validation && ansible_collection_version_href.nil?
49
- fail ArgumentError, "Missing the required parameter 'ansible_collection_version_href' when calling GalaxyCollectionListApi.list"
47
+ fail ArgumentError, "Missing the required parameter 'ansible_collection_version_href' when calling GalaxyCollectionListApi.get"
50
48
  end
51
49
  # resource path
52
50
  local_var_path = '{ansible_collection_version_href}versions/'.sub('{' + 'ansible_collection_version_href' + '}', CGI.escape(ansible_collection_version_href.to_s).gsub('%2F', '/'))
53
51
 
54
52
  # query parameters
55
53
  query_params = opts[:query_params] || {}
56
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
57
- query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
54
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
58
55
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
59
56
  query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
60
57
 
@@ -86,7 +83,7 @@ module PulpAnsibleClient
86
83
 
87
84
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
88
85
  if @api_client.config.debugging
89
- @api_client.config.logger.debug "API called: GalaxyCollectionListApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ @api_client.config.logger.debug "API called: GalaxyCollectionListApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
87
  end
91
88
  return data, status_code, headers
92
89
  end
@@ -25,8 +25,8 @@ module PulpAnsibleClient
25
25
  # @option opts [String] :fields A list of fields to include in the response.
26
26
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
27
27
  # @return [GalaxyCollectionResponse]
28
- def read(ansible_collection_href, opts = {})
29
- data, _status_code, _headers = read_with_http_info(ansible_collection_href, opts)
28
+ def get(ansible_collection_href, opts = {})
29
+ data, _status_code, _headers = get_with_http_info(ansible_collection_href, opts)
30
30
  data
31
31
  end
32
32
 
@@ -36,13 +36,13 @@ module PulpAnsibleClient
36
36
  # @option opts [String] :fields A list of fields to include in the response.
37
37
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
38
38
  # @return [Array<(GalaxyCollectionResponse, Integer, Hash)>] GalaxyCollectionResponse data, response status code and response headers
39
- def read_with_http_info(ansible_collection_href, opts = {})
39
+ def get_with_http_info(ansible_collection_href, opts = {})
40
40
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: GalaxyDetailApi.read ...'
41
+ @api_client.config.logger.debug 'Calling API: GalaxyDetailApi.get ...'
42
42
  end
43
43
  # verify the required parameter 'ansible_collection_href' is set
44
44
  if @api_client.config.client_side_validation && ansible_collection_href.nil?
45
- fail ArgumentError, "Missing the required parameter 'ansible_collection_href' when calling GalaxyDetailApi.read"
45
+ fail ArgumentError, "Missing the required parameter 'ansible_collection_href' when calling GalaxyDetailApi.get"
46
46
  end
47
47
  # resource path
48
48
  local_var_path = '{ansible_collection_href}'.sub('{' + 'ansible_collection_href' + '}', CGI.escape(ansible_collection_href.to_s).gsub('%2F', '/'))
@@ -80,7 +80,7 @@ module PulpAnsibleClient
80
80
 
81
81
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
82
  if @api_client.config.debugging
83
- @api_client.config.logger.debug "API called: GalaxyDetailApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
83
+ @api_client.config.logger.debug "API called: GalaxyDetailApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
84
  end
85
85
  return data, status_code, headers
86
86
  end
@@ -25,8 +25,8 @@ module PulpAnsibleClient
25
25
  # @option opts [String] :fields A list of fields to include in the response.
26
26
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
27
27
  # @return [nil]
28
- def read(path, opts = {})
29
- read_with_http_info(path, opts)
28
+ def get(path, opts = {})
29
+ get_with_http_info(path, opts)
30
30
  nil
31
31
  end
32
32
 
@@ -36,13 +36,13 @@ module PulpAnsibleClient
36
36
  # @option opts [String] :fields A list of fields to include in the response.
37
37
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
38
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
- def read_with_http_info(path, opts = {})
39
+ def get_with_http_info(path, opts = {})
40
40
  if @api_client.config.debugging
41
- @api_client.config.logger.debug 'Calling API: PulpAnsibleApiApi.read ...'
41
+ @api_client.config.logger.debug 'Calling API: PulpAnsibleApiApi.get ...'
42
42
  end
43
43
  # verify the required parameter 'path' is set
44
44
  if @api_client.config.client_side_validation && path.nil?
45
- fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleApiApi.read"
45
+ fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleApiApi.get"
46
46
  end
47
47
  # resource path
48
48
  local_var_path = '/pulp_ansible/galaxy/{path}/api/'.sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/'))
@@ -78,7 +78,7 @@ module PulpAnsibleClient
78
78
 
79
79
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
80
80
  if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: PulpAnsibleApiApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ @api_client.config.logger.debug "API called: PulpAnsibleApiApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
82
  end
83
83
  return data, status_code, headers
84
84
  end
@@ -28,8 +28,8 @@ module PulpAnsibleClient
28
28
  # @option opts [String] :fields A list of fields to include in the response.
29
29
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
30
30
  # @return [nil]
31
- def read(name, namespace, path, version, opts = {})
32
- read_with_http_info(name, namespace, path, version, opts)
31
+ def get(name, namespace, path, version, opts = {})
32
+ get_with_http_info(name, namespace, path, version, opts)
33
33
  nil
34
34
  end
35
35
 
@@ -42,25 +42,25 @@ module PulpAnsibleClient
42
42
  # @option opts [String] :fields A list of fields to include in the response.
43
43
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
44
44
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
45
- def read_with_http_info(name, namespace, path, version, opts = {})
45
+ def get_with_http_info(name, namespace, path, version, opts = {})
46
46
  if @api_client.config.debugging
47
- @api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiV2VersionsApi.read ...'
47
+ @api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiV2VersionsApi.get ...'
48
48
  end
49
49
  # verify the required parameter 'name' is set
50
50
  if @api_client.config.client_side_validation && name.nil?
51
- fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleGalaxyApiV2VersionsApi.read"
51
+ fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleGalaxyApiV2VersionsApi.get"
52
52
  end
53
53
  # verify the required parameter 'namespace' is set
54
54
  if @api_client.config.client_side_validation && namespace.nil?
55
- fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleGalaxyApiV2VersionsApi.read"
55
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleGalaxyApiV2VersionsApi.get"
56
56
  end
57
57
  # verify the required parameter 'path' is set
58
58
  if @api_client.config.client_side_validation && path.nil?
59
- fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleGalaxyApiV2VersionsApi.read"
59
+ fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleGalaxyApiV2VersionsApi.get"
60
60
  end
61
61
  # verify the required parameter 'version' is set
62
62
  if @api_client.config.client_side_validation && version.nil?
63
- fail ArgumentError, "Missing the required parameter 'version' when calling PulpAnsibleGalaxyApiV2VersionsApi.read"
63
+ fail ArgumentError, "Missing the required parameter 'version' when calling PulpAnsibleGalaxyApiV2VersionsApi.get"
64
64
  end
65
65
  # resource path
66
66
  local_var_path = '/pulp_ansible/galaxy/{path}/api/v2/collections/{namespace}/{name}/versions/{version}/'.sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/')).sub('{' + 'version' + '}', CGI.escape(version.to_s).gsub('%2F', '/'))
@@ -96,7 +96,7 @@ module PulpAnsibleClient
96
96
 
97
97
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
98
98
  if @api_client.config.debugging
99
- @api_client.config.logger.debug "API called: PulpAnsibleGalaxyApiV2VersionsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
99
+ @api_client.config.logger.debug "API called: PulpAnsibleGalaxyApiV2VersionsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
100
  end
101
101
  return data, status_code, headers
102
102
  end
@@ -0,0 +1,106 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpAnsibleClient
16
+ class PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Returns a CollectionVersion object.
23
+ # @param name [String]
24
+ # @param namespace [String]
25
+ # @param path [String]
26
+ # @param version [String]
27
+ # @param [Hash] opts the optional parameters
28
+ # @option opts [String] :fields A list of fields to include in the response.
29
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
30
+ # @return [CollectionVersionDocsResponse]
31
+ def read(name, namespace, path, version, opts = {})
32
+ data, _status_code, _headers = read_with_http_info(name, namespace, path, version, opts)
33
+ data
34
+ end
35
+
36
+ # Returns a CollectionVersion object.
37
+ # @param name [String]
38
+ # @param namespace [String]
39
+ # @param path [String]
40
+ # @param version [String]
41
+ # @param [Hash] opts the optional parameters
42
+ # @option opts [String] :fields A list of fields to include in the response.
43
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
44
+ # @return [Array<(CollectionVersionDocsResponse, Integer, Hash)>] CollectionVersionDocsResponse data, response status code and response headers
45
+ def read_with_http_info(name, namespace, path, version, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.read ...'
48
+ end
49
+ # verify the required parameter 'name' is set
50
+ if @api_client.config.client_side_validation && name.nil?
51
+ fail ArgumentError, "Missing the required parameter 'name' when calling PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.read"
52
+ end
53
+ # verify the required parameter 'namespace' is set
54
+ if @api_client.config.client_side_validation && namespace.nil?
55
+ fail ArgumentError, "Missing the required parameter 'namespace' when calling PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.read"
56
+ end
57
+ # verify the required parameter 'path' is set
58
+ if @api_client.config.client_side_validation && path.nil?
59
+ fail ArgumentError, "Missing the required parameter 'path' when calling PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.read"
60
+ end
61
+ # verify the required parameter 'version' is set
62
+ if @api_client.config.client_side_validation && version.nil?
63
+ fail ArgumentError, "Missing the required parameter 'version' when calling PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi.read"
64
+ end
65
+ # resource path
66
+ local_var_path = '/pulp_ansible/galaxy/{path}/api/v3/collections/{namespace}/{name}/versions/{version}/docs-blob/'.sub('{' + 'name' + '}', CGI.escape(name.to_s).gsub('%2F', '/')).sub('{' + 'namespace' + '}', CGI.escape(namespace.to_s).gsub('%2F', '/')).sub('{' + 'path' + '}', CGI.escape(path.to_s).gsub('%2F', '/')).sub('{' + 'version' + '}', CGI.escape(version.to_s).gsub('%2F', '/'))
67
+
68
+ # query parameters
69
+ query_params = opts[:query_params] || {}
70
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
71
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
72
+
73
+ # header parameters
74
+ header_params = opts[:header_params] || {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
77
+
78
+ # form parameters
79
+ form_params = opts[:form_params] || {}
80
+
81
+ # http body (model)
82
+ post_body = opts[:body]
83
+
84
+ # return_type
85
+ return_type = opts[:return_type] || 'CollectionVersionDocsResponse'
86
+
87
+ # auth_names
88
+ auth_names = opts[:auth_names] || []
89
+
90
+ new_options = opts.merge(
91
+ :header_params => header_params,
92
+ :query_params => query_params,
93
+ :form_params => form_params,
94
+ :body => post_body,
95
+ :auth_names => auth_names,
96
+ :return_type => return_type
97
+ )
98
+
99
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug "API called: PulpAnsibleGalaxyApiV3CollectionsDocsBlobApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
102
+ end
103
+ return data, status_code, headers
104
+ end
105
+ end
106
+ end