pulp_rpm_client 3.0.0b3.dev.1560786621 → 3.0.0b4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +32 -32
  4. data/docs/ContentAdvisoriesApi.md +196 -0
  5. data/docs/ContentPackagesApi.md +208 -0
  6. data/docs/{DistributionsApi.md → DistributionsRpmApi.md} +37 -37
  7. data/docs/Package.md +2 -2
  8. data/docs/{PublicationsApi.md → PublicationsRpmApi.md} +25 -25
  9. data/docs/{RemotesApi.md → RemotesRpmApi.md} +43 -43
  10. data/docs/{RpmApi.md → RpmCopyApi.md} +4 -62
  11. data/docs/RpmRemote.md +3 -5
  12. data/docs/RpmUploadApi.md +66 -0
  13. data/lib/pulp_rpm_client.rb +7 -5
  14. data/lib/pulp_rpm_client/api/content_advisories_api.rb +243 -0
  15. data/lib/pulp_rpm_client/api/content_packages_api.rb +261 -0
  16. data/lib/pulp_rpm_client/api/{distributions_api.rb → distributions_rpm_api.rb} +38 -38
  17. data/lib/pulp_rpm_client/api/{publications_api.rb → publications_rpm_api.rb} +24 -24
  18. data/lib/pulp_rpm_client/api/{remotes_api.rb → remotes_rpm_api.rb} +45 -45
  19. data/lib/pulp_rpm_client/api/{rpm_api.rb → rpm_copy_api.rb} +4 -72
  20. data/lib/pulp_rpm_client/api/rpm_upload_api.rb +90 -0
  21. data/lib/pulp_rpm_client/models/package.rb +10 -10
  22. data/lib/pulp_rpm_client/models/rpm_remote.rb +4 -14
  23. data/lib/pulp_rpm_client/version.rb +1 -1
  24. data/spec/api/content_advisories_api_spec.rb +83 -0
  25. data/spec/api/{content_api_spec.rb → content_packages_api_spec.rb} +12 -60
  26. data/spec/api/{distributions_api_spec.rb → distributions_rpm_api_spec.rb} +18 -18
  27. data/spec/api/{publications_api_spec.rb → publications_rpm_api_spec.rb} +14 -14
  28. data/spec/api/{remotes_api_spec.rb → remotes_rpm_api_spec.rb} +20 -20
  29. data/spec/api/{rpm_api_spec.rb → rpm_copy_api_spec.rb} +6 -19
  30. data/spec/api/rpm_upload_api_spec.rb +48 -0
  31. data/spec/models/package_spec.rb +2 -2
  32. data/spec/models/rpm_remote_spec.rb +0 -6
  33. metadata +30 -22
  34. data/docs/ContentApi.md +0 -396
  35. data/lib/pulp_rpm_client/api/content_api.rb +0 -482
@@ -1,11 +1,10 @@
1
- # PulpRpmClient::RpmApi
1
+ # PulpRpmClient::RpmCopyApi
2
2
 
3
3
  All URIs are relative to *http://localhost:24817*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
- [**copy_content**](RpmApi.md#copy_content) | **POST** /rpm/copy/ | Copy content
8
- [**upload_rpm_package**](RpmApi.md#upload_rpm_package) | **POST** /rpm/upload/ | Upload a package
7
+ [**copy_content**](RpmCopyApi.md#copy_content) | **POST** /rpm/copy/ | Copy content
9
8
 
10
9
 
11
10
 
@@ -29,7 +28,7 @@ PulpRpmClient.configure do |config|
29
28
  config.password = 'YOUR PASSWORD'
30
29
  end
31
30
 
32
- api_instance = PulpRpmClient::RpmApi.new
31
+ api_instance = PulpRpmClient::RpmCopyApi.new
33
32
  dest_repo = 'dest_repo_example' # String | A URI of the repository.
34
33
  opts = {
35
34
  source_repo: 'source_repo_example', # String | A URI of the repository.
@@ -42,7 +41,7 @@ begin
42
41
  result = api_instance.copy_content(dest_repo, opts)
43
42
  p result
44
43
  rescue PulpRpmClient::ApiError => e
45
- puts "Exception when calling RpmApi->copy_content: #{e}"
44
+ puts "Exception when calling RpmCopyApi->copy_content: #{e}"
46
45
  end
47
46
  ```
48
47
 
@@ -69,60 +68,3 @@ Name | Type | Description | Notes
69
68
  - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
70
69
  - **Accept**: application/json
71
70
 
72
-
73
- ## upload_rpm_package
74
-
75
- > AsyncOperationResponse upload_rpm_package(file, opts)
76
-
77
- Upload a package
78
-
79
- Create an artifact and trigger an asynchronoustask to create RPM content from it, optionallycreate new repository version.
80
-
81
- ### Example
82
-
83
- ```ruby
84
- # load the gem
85
- require 'pulp_rpm_client'
86
- # setup authorization
87
- PulpRpmClient.configure do |config|
88
- # Configure HTTP basic authorization: Basic
89
- config.username = 'YOUR USERNAME'
90
- config.password = 'YOUR PASSWORD'
91
- end
92
-
93
- api_instance = PulpRpmClient::RpmApi.new
94
- file = File.new('/path/to/file') # File | The rpm file.
95
- opts = {
96
- repository: 'repository_example' # String | A URI of the repository.
97
- }
98
-
99
- begin
100
- #Upload a package
101
- result = api_instance.upload_rpm_package(file, opts)
102
- p result
103
- rescue PulpRpmClient::ApiError => e
104
- puts "Exception when calling RpmApi->upload_rpm_package: #{e}"
105
- end
106
- ```
107
-
108
- ### Parameters
109
-
110
-
111
- Name | Type | Description | Notes
112
- ------------- | ------------- | ------------- | -------------
113
- **file** | **File**| The rpm file. |
114
- **repository** | **String**| A URI of the repository. | [optional]
115
-
116
- ### Return type
117
-
118
- [**AsyncOperationResponse**](AsyncOperationResponse.md)
119
-
120
- ### Authorization
121
-
122
- [Basic](../README.md#Basic)
123
-
124
- ### HTTP request headers
125
-
126
- - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
127
- - **Accept**: application/json
128
-
data/docs/RpmRemote.md CHANGED
@@ -9,9 +9,8 @@ Name | Type | Description | Notes
9
9
  **_type** | **String** | | [optional]
10
10
  **name** | **String** | A unique name for this remote. |
11
11
  **url** | **String** | The URL of an external content source. |
12
- **validate** | **Boolean** | If True, the plugin will validate imported artifacts. | [optional]
13
- **ssl_ca_certificate** | **String** | A PEM encoded CA certificate used to validate the server certificate presented by the remote server. Returns SHA256 sum on GET. | [optional]
14
- **ssl_client_certificate** | **String** | A PEM encoded client certificate used for authentication. Returns SHA256 sum on GET. | [optional]
12
+ **ssl_ca_certificate** | **String** | A string containing the PEM encoded CA certificate used to validate the server certificate presented by the remote server. All new line characters must be escaped. Returns SHA256 sum on GET. | [optional]
13
+ **ssl_client_certificate** | **String** | A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped. Returns SHA256 sum on GET. | [optional]
15
14
  **ssl_client_key** | **String** | A PEM encoded private key used for authentication. Returns SHA256 sum on GET. | [optional]
16
15
  **ssl_validation** | **Boolean** | If True, SSL peer validation must be performed. | [optional]
17
16
  **proxy_url** | **String** | The proxy URL. Format: scheme://user:password@host:port | [optional]
@@ -19,7 +18,7 @@ Name | Type | Description | Notes
19
18
  **password** | **String** | The password to be used for authentication when syncing. | [optional]
20
19
  **_last_updated** | **DateTime** | Timestamp of the most recent update of the remote. | [optional]
21
20
  **download_concurrency** | **Integer** | Total number of simultaneous connections. | [optional]
22
- **policy** | **String** | The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'cache_only'. 'immediate' is the default. | [optional] [default to 'immediate']
21
+ **policy** | **String** | The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default. | [optional] [default to 'immediate']
23
22
 
24
23
  ## Code Sample
25
24
 
@@ -31,7 +30,6 @@ instance = PulpRpmClient::RpmRemote.new(_href: null,
31
30
  _type: null,
32
31
  name: null,
33
32
  url: null,
34
- validate: null,
35
33
  ssl_ca_certificate: null,
36
34
  ssl_client_certificate: null,
37
35
  ssl_client_key: null,
@@ -0,0 +1,66 @@
1
+ # PulpRpmClient::RpmUploadApi
2
+
3
+ All URIs are relative to *http://localhost:24817*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**upload_rpm_package**](RpmUploadApi.md#upload_rpm_package) | **POST** /rpm/upload/ | Upload a package
8
+
9
+
10
+
11
+ ## upload_rpm_package
12
+
13
+ > AsyncOperationResponse upload_rpm_package(file, opts)
14
+
15
+ Upload a package
16
+
17
+ Create an artifact and trigger an asynchronoustask to create RPM content from it, optionallycreate new repository version.
18
+
19
+ ### Example
20
+
21
+ ```ruby
22
+ # load the gem
23
+ require 'pulp_rpm_client'
24
+ # setup authorization
25
+ PulpRpmClient.configure do |config|
26
+ # Configure HTTP basic authorization: Basic
27
+ config.username = 'YOUR USERNAME'
28
+ config.password = 'YOUR PASSWORD'
29
+ end
30
+
31
+ api_instance = PulpRpmClient::RpmUploadApi.new
32
+ file = File.new('/path/to/file') # File | The rpm file.
33
+ opts = {
34
+ repository: 'repository_example' # String | A URI of the repository.
35
+ }
36
+
37
+ begin
38
+ #Upload a package
39
+ result = api_instance.upload_rpm_package(file, opts)
40
+ p result
41
+ rescue PulpRpmClient::ApiError => e
42
+ puts "Exception when calling RpmUploadApi->upload_rpm_package: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **file** | **File**| The rpm file. |
52
+ **repository** | **String**| A URI of the repository. | [optional]
53
+
54
+ ### Return type
55
+
56
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
57
+
58
+ ### Authorization
59
+
60
+ [Basic](../README.md#Basic)
61
+
62
+ ### HTTP request headers
63
+
64
+ - **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
65
+ - **Accept**: application/json
66
+
@@ -31,11 +31,13 @@ require 'pulp_rpm_client/models/rpm_remote'
31
31
  require 'pulp_rpm_client/models/update_record'
32
32
 
33
33
  # APIs
34
- require 'pulp_rpm_client/api/content_api'
35
- require 'pulp_rpm_client/api/distributions_api'
36
- require 'pulp_rpm_client/api/publications_api'
37
- require 'pulp_rpm_client/api/remotes_api'
38
- require 'pulp_rpm_client/api/rpm_api'
34
+ require 'pulp_rpm_client/api/content_advisories_api'
35
+ require 'pulp_rpm_client/api/content_packages_api'
36
+ require 'pulp_rpm_client/api/distributions_rpm_api'
37
+ require 'pulp_rpm_client/api/publications_rpm_api'
38
+ require 'pulp_rpm_client/api/remotes_rpm_api'
39
+ require 'pulp_rpm_client/api/rpm_copy_api'
40
+ require 'pulp_rpm_client/api/rpm_upload_api'
39
41
 
40
42
  module PulpRpmClient
41
43
  class << self
@@ -0,0 +1,243 @@
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 PulpRpmClient
16
+ class ContentAdvisoriesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create an update record
23
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
24
+ # @param data [UpdateRecord]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [UpdateRecord]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create an update record
33
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
34
+ # @param data [UpdateRecord]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(UpdateRecord, Integer, Hash)>] UpdateRecord 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: ContentAdvisoriesApi.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 ContentAdvisoriesApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/rpm/advisories/'
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] || 'UpdateRecord'
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: ContentAdvisoriesApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # List update records
87
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [String] :id Filter results where id matches value
90
+ # @option opts [String] :id__in Filter results where id is in a comma-separated list of values
91
+ # @option opts [String] :status Filter results where status matches value
92
+ # @option opts [String] :status__in Filter results where status is in a comma-separated list of values
93
+ # @option opts [String] :severity Filter results where severity matches value
94
+ # @option opts [String] :severity__in Filter results where severity is in a comma-separated list of values
95
+ # @option opts [String] :type Filter results where type matches value
96
+ # @option opts [String] :type__in Filter results where type is in a comma-separated list of values
97
+ # @option opts [String] :repository_version Repository Version referenced by HREF
98
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
99
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
100
+ # @option opts [Integer] :page A page number within the paginated result set.
101
+ # @option opts [Integer] :page_size Number of results to return per page.
102
+ # @return [InlineResponse200]
103
+ def list(opts = {})
104
+ data, _status_code, _headers = list_with_http_info(opts)
105
+ data
106
+ end
107
+
108
+ # List update records
109
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
110
+ # @param [Hash] opts the optional parameters
111
+ # @option opts [String] :id Filter results where id matches value
112
+ # @option opts [String] :id__in Filter results where id is in a comma-separated list of values
113
+ # @option opts [String] :status Filter results where status matches value
114
+ # @option opts [String] :status__in Filter results where status is in a comma-separated list of values
115
+ # @option opts [String] :severity Filter results where severity matches value
116
+ # @option opts [String] :severity__in Filter results where severity is in a comma-separated list of values
117
+ # @option opts [String] :type Filter results where type matches value
118
+ # @option opts [String] :type__in Filter results where type is in a comma-separated list of values
119
+ # @option opts [String] :repository_version Repository Version referenced by HREF
120
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
121
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
122
+ # @option opts [Integer] :page A page number within the paginated result set.
123
+ # @option opts [Integer] :page_size Number of results to return per page.
124
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
125
+ def list_with_http_info(opts = {})
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug 'Calling API: ContentAdvisoriesApi.list ...'
128
+ end
129
+ # resource path
130
+ local_var_path = '/pulp/api/v3/content/rpm/advisories/'
131
+
132
+ # query parameters
133
+ query_params = opts[:query_params] || {}
134
+ query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
135
+ query_params[:'id__in'] = opts[:'id__in'] if !opts[:'id__in'].nil?
136
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
137
+ query_params[:'status__in'] = opts[:'status__in'] if !opts[:'status__in'].nil?
138
+ query_params[:'severity'] = opts[:'severity'] if !opts[:'severity'].nil?
139
+ query_params[:'severity__in'] = opts[:'severity__in'] if !opts[:'severity__in'].nil?
140
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
141
+ query_params[:'type__in'] = opts[:'type__in'] if !opts[:'type__in'].nil?
142
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
143
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
144
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
145
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
146
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
147
+
148
+ # header parameters
149
+ header_params = opts[:header_params] || {}
150
+ # HTTP header 'Accept' (if needed)
151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:body]
158
+
159
+ # return_type
160
+ return_type = opts[:return_type] || 'InlineResponse200'
161
+
162
+ # auth_names
163
+ auth_names = opts[:auth_names] || ['Basic']
164
+
165
+ new_options = opts.merge(
166
+ :header_params => header_params,
167
+ :query_params => query_params,
168
+ :form_params => form_params,
169
+ :body => post_body,
170
+ :auth_names => auth_names,
171
+ :return_type => return_type
172
+ )
173
+
174
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug "API called: ContentAdvisoriesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
177
+ end
178
+ return data, status_code, headers
179
+ end
180
+
181
+ # Inspect an update record
182
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
183
+ # @param update_record_href [String] URI of Update Record. e.g.: /pulp/api/v3/content/rpm/advisories/1/
184
+ # @param [Hash] opts the optional parameters
185
+ # @return [UpdateRecord]
186
+ def read(update_record_href, opts = {})
187
+ data, _status_code, _headers = read_with_http_info(update_record_href, opts)
188
+ data
189
+ end
190
+
191
+ # Inspect an update record
192
+ # Define endpoint name which will appear in the API endpoint for this content type. For example:: http://pulp.example.com/pulp/api/v3/content/rpm/advisories/ Also specify queryset and serializer for UpdateRecord.
193
+ # @param update_record_href [String] URI of Update Record. e.g.: /pulp/api/v3/content/rpm/advisories/1/
194
+ # @param [Hash] opts the optional parameters
195
+ # @return [Array<(UpdateRecord, Integer, Hash)>] UpdateRecord data, response status code and response headers
196
+ def read_with_http_info(update_record_href, opts = {})
197
+ if @api_client.config.debugging
198
+ @api_client.config.logger.debug 'Calling API: ContentAdvisoriesApi.read ...'
199
+ end
200
+ # verify the required parameter 'update_record_href' is set
201
+ if @api_client.config.client_side_validation && update_record_href.nil?
202
+ fail ArgumentError, "Missing the required parameter 'update_record_href' when calling ContentAdvisoriesApi.read"
203
+ end
204
+ # resource path
205
+ local_var_path = '{update_record_href}'.sub('{' + 'update_record_href' + '}', update_record_href.to_s)
206
+
207
+ # query parameters
208
+ query_params = opts[:query_params] || {}
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ # HTTP header 'Accept' (if needed)
213
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
214
+
215
+ # form parameters
216
+ form_params = opts[:form_params] || {}
217
+
218
+ # http body (model)
219
+ post_body = opts[:body]
220
+
221
+ # return_type
222
+ return_type = opts[:return_type] || 'UpdateRecord'
223
+
224
+ # auth_names
225
+ auth_names = opts[:auth_names] || ['Basic']
226
+
227
+ new_options = opts.merge(
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => return_type
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: ContentAdvisoriesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+ end
243
+ end