pulp_python_client 3.20.1 → 3.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -5
- data/docs/ContentPackagesApi.md +8 -4
- data/docs/ContentProvenanceApi.md +428 -0
- data/docs/FiletypeEnum.md +15 -0
- data/docs/MetadataVersionEnum.md +15 -0
- data/docs/PaginatedpythonPackageProvenanceResponseList.md +24 -0
- data/docs/PatchedpythonPythonDistribution.md +2 -0
- data/docs/PatchedpythonPythonRemote.md +3 -1
- data/docs/ProtocolVersionEnum.md +15 -0
- data/docs/PypiLegacyApi.md +9 -1
- data/docs/PypiProvenanceApi.md +91 -0
- data/docs/PypiSimpleApi.md +9 -1
- data/docs/PythonPackageProvenanceResponse.md +34 -0
- data/docs/PythonPythonDistribution.md +2 -0
- data/docs/PythonPythonDistributionResponse.md +2 -0
- data/docs/PythonPythonPackageContentResponse.md +5 -1
- data/docs/PythonPythonRemote.md +3 -1
- data/docs/PythonPythonRemoteResponse.md +3 -1
- data/docs/RepositoriesPythonVersionsApi.md +75 -0
- data/lib/pulp_python_client/api/content_packages_api.rb +9 -3
- data/lib/pulp_python_client/api/content_provenance_api.rb +448 -0
- data/lib/pulp_python_client/api/pypi_legacy_api.rb +12 -0
- data/lib/pulp_python_client/api/pypi_provenance_api.rb +110 -0
- data/lib/pulp_python_client/api/pypi_simple_api.rb +12 -0
- data/lib/pulp_python_client/api/repositories_python_versions_api.rb +66 -0
- data/lib/pulp_python_client/models/filetype_enum.rb +40 -0
- data/lib/pulp_python_client/models/metadata_version_enum.rb +46 -0
- data/lib/pulp_python_client/models/paginatedpython_package_provenance_response_list.rb +257 -0
- data/lib/pulp_python_client/models/patchedpython_python_distribution.rb +12 -1
- data/lib/pulp_python_client/models/patchedpython_python_remote.rb +16 -4
- data/lib/pulp_python_client/models/protocol_version_enum.rb +39 -0
- data/lib/pulp_python_client/models/python_package_provenance_response.rb +302 -0
- data/lib/pulp_python_client/models/python_python_distribution.rb +12 -1
- data/lib/pulp_python_client/models/python_python_distribution_response.rb +12 -1
- data/lib/pulp_python_client/models/python_python_package_content_response.rb +25 -5
- data/lib/pulp_python_client/models/python_python_remote.rb +16 -4
- data/lib/pulp_python_client/models/python_python_remote_response.rb +16 -4
- data/lib/pulp_python_client/version.rb +1 -1
- data/lib/pulp_python_client.rb +7 -0
- data/spec/api/content_packages_api_spec.rb +3 -1
- data/spec/api/content_provenance_api_spec.rb +123 -0
- data/spec/api/pypi_legacy_api_spec.rb +4 -0
- data/spec/api/pypi_provenance_api_spec.rb +53 -0
- data/spec/api/pypi_simple_api_spec.rb +4 -0
- data/spec/api/repositories_python_versions_api_spec.rb +13 -0
- data/spec/models/filetype_enum_spec.rb +30 -0
- data/spec/models/metadata_version_enum_spec.rb +30 -0
- data/spec/models/paginatedpython_package_provenance_response_list_spec.rb +54 -0
- data/spec/models/patchedpython_python_distribution_spec.rb +6 -0
- data/spec/models/patchedpython_python_remote_spec.rb +6 -0
- data/spec/models/protocol_version_enum_spec.rb +30 -0
- data/spec/models/python_package_provenance_response_spec.rb +84 -0
- data/spec/models/python_python_distribution_response_spec.rb +6 -0
- data/spec/models/python_python_distribution_spec.rb +6 -0
- data/spec/models/python_python_package_content_response_spec.rb +12 -0
- data/spec/models/python_python_remote_response_spec.rb +6 -0
- data/spec/models/python_python_remote_spec.rb +6 -0
- metadata +30 -2
|
@@ -370,5 +370,71 @@ module PulpPythonClient
|
|
|
370
370
|
end
|
|
371
371
|
return data, status_code, headers
|
|
372
372
|
end
|
|
373
|
+
|
|
374
|
+
# Generate vulnerability report
|
|
375
|
+
# Scan a repository version for vulnerabilities.
|
|
376
|
+
# @param python_python_repository_version_href [String]
|
|
377
|
+
# @param [Hash] opts the optional parameters
|
|
378
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
379
|
+
# @return [AsyncOperationResponse]
|
|
380
|
+
def scan(python_python_repository_version_href, opts = {})
|
|
381
|
+
data, _status_code, _headers = scan_with_http_info(python_python_repository_version_href, opts)
|
|
382
|
+
data
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Generate vulnerability report
|
|
386
|
+
# Scan a repository version for vulnerabilities.
|
|
387
|
+
# @param python_python_repository_version_href [String]
|
|
388
|
+
# @param [Hash] opts the optional parameters
|
|
389
|
+
# @option opts [Array<String>] :x_task_diagnostics List of profilers to use on tasks.
|
|
390
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
|
391
|
+
def scan_with_http_info(python_python_repository_version_href, opts = {})
|
|
392
|
+
if @api_client.config.debugging
|
|
393
|
+
@api_client.config.logger.debug 'Calling API: RepositoriesPythonVersionsApi.scan ...'
|
|
394
|
+
end
|
|
395
|
+
# verify the required parameter 'python_python_repository_version_href' is set
|
|
396
|
+
if @api_client.config.client_side_validation && python_python_repository_version_href.nil?
|
|
397
|
+
fail ArgumentError, "Missing the required parameter 'python_python_repository_version_href' when calling RepositoriesPythonVersionsApi.scan"
|
|
398
|
+
end
|
|
399
|
+
# resource path
|
|
400
|
+
local_var_path = '{python_python_repository_version_href}scan/'.sub('{' + 'python_python_repository_version_href' + '}', CGI.escape(python_python_repository_version_href.to_s).gsub('%2F', '/'))
|
|
401
|
+
|
|
402
|
+
# query parameters
|
|
403
|
+
query_params = opts[:query_params] || {}
|
|
404
|
+
|
|
405
|
+
# header parameters
|
|
406
|
+
header_params = opts[:header_params] || {}
|
|
407
|
+
# HTTP header 'Accept' (if needed)
|
|
408
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
409
|
+
header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?
|
|
410
|
+
|
|
411
|
+
# form parameters
|
|
412
|
+
form_params = opts[:form_params] || {}
|
|
413
|
+
|
|
414
|
+
# http body (model)
|
|
415
|
+
post_body = opts[:debug_body]
|
|
416
|
+
|
|
417
|
+
# return_type
|
|
418
|
+
return_type = opts[:debug_return_type] || 'AsyncOperationResponse'
|
|
419
|
+
|
|
420
|
+
# auth_names
|
|
421
|
+
auth_names = opts[:debug_auth_names] || ['basicAuth']
|
|
422
|
+
|
|
423
|
+
new_options = opts.merge(
|
|
424
|
+
:operation => :"RepositoriesPythonVersionsApi.scan",
|
|
425
|
+
:header_params => header_params,
|
|
426
|
+
:query_params => query_params,
|
|
427
|
+
:form_params => form_params,
|
|
428
|
+
:body => post_body,
|
|
429
|
+
:auth_names => auth_names,
|
|
430
|
+
:return_type => return_type
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
434
|
+
if @api_client.config.debugging
|
|
435
|
+
@api_client.config.logger.debug "API called: RepositoriesPythonVersionsApi#scan\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
436
|
+
end
|
|
437
|
+
return data, status_code, headers
|
|
438
|
+
end
|
|
373
439
|
end
|
|
374
440
|
end
|
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpPythonClient
|
|
17
|
+
class FiletypeEnum
|
|
18
|
+
BDIST_WHEEL = "bdist_wheel".freeze
|
|
19
|
+
SDIST = "sdist".freeze
|
|
20
|
+
|
|
21
|
+
def self.all_vars
|
|
22
|
+
@all_vars ||= [BDIST_WHEEL, SDIST].freeze
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Builds the enum from string
|
|
26
|
+
# @param [String] The enum value in the form of the string
|
|
27
|
+
# @return [String] The enum value
|
|
28
|
+
def self.build_from_hash(value)
|
|
29
|
+
new.build_from_hash(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Builds the enum from string
|
|
33
|
+
# @param [String] The enum value in the form of the string
|
|
34
|
+
# @return [String] The enum value
|
|
35
|
+
def build_from_hash(value)
|
|
36
|
+
return value if FiletypeEnum.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #FiletypeEnum"
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpPythonClient
|
|
17
|
+
class MetadataVersionEnum
|
|
18
|
+
N1_0 = "1.0".freeze
|
|
19
|
+
N1_1 = "1.1".freeze
|
|
20
|
+
N1_2 = "1.2".freeze
|
|
21
|
+
N2_0 = "2.0".freeze
|
|
22
|
+
N2_1 = "2.1".freeze
|
|
23
|
+
N2_2 = "2.2".freeze
|
|
24
|
+
N2_3 = "2.3".freeze
|
|
25
|
+
N2_4 = "2.4".freeze
|
|
26
|
+
|
|
27
|
+
def self.all_vars
|
|
28
|
+
@all_vars ||= [N1_0, N1_1, N1_2, N2_0, N2_1, N2_2, N2_3, N2_4].freeze
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Builds the enum from string
|
|
32
|
+
# @param [String] The enum value in the form of the string
|
|
33
|
+
# @return [String] The enum value
|
|
34
|
+
def self.build_from_hash(value)
|
|
35
|
+
new.build_from_hash(value)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Builds the enum from string
|
|
39
|
+
# @param [String] The enum value in the form of the string
|
|
40
|
+
# @return [String] The enum value
|
|
41
|
+
def build_from_hash(value)
|
|
42
|
+
return value if MetadataVersionEnum.all_vars.include?(value)
|
|
43
|
+
raise "Invalid ENUM value #{value} for class #MetadataVersionEnum"
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,257 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpPythonClient
|
|
17
|
+
class PaginatedpythonPackageProvenanceResponseList
|
|
18
|
+
attr_accessor :count
|
|
19
|
+
|
|
20
|
+
attr_accessor :_next
|
|
21
|
+
|
|
22
|
+
attr_accessor :previous
|
|
23
|
+
|
|
24
|
+
attr_accessor :results
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'count' => :'count',
|
|
30
|
+
:'_next' => :'next',
|
|
31
|
+
:'previous' => :'previous',
|
|
32
|
+
:'results' => :'results'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'count' => :'Integer',
|
|
45
|
+
:'_next' => :'String',
|
|
46
|
+
:'previous' => :'String',
|
|
47
|
+
:'results' => :'Array<PythonPackageProvenanceResponse>'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpPythonClient::PaginatedpythonPackageProvenanceResponseList` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpPythonClient::PaginatedpythonPackageProvenanceResponseList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'count')
|
|
73
|
+
self.count = attributes[:'count']
|
|
74
|
+
else
|
|
75
|
+
self.count = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'_next')
|
|
79
|
+
self._next = attributes[:'_next']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'previous')
|
|
83
|
+
self.previous = attributes[:'previous']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'results')
|
|
87
|
+
if (value = attributes[:'results']).is_a?(Array)
|
|
88
|
+
self.results = value
|
|
89
|
+
end
|
|
90
|
+
else
|
|
91
|
+
self.results = nil
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
99
|
+
invalid_properties = Array.new
|
|
100
|
+
if @count.nil?
|
|
101
|
+
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if @results.nil?
|
|
105
|
+
invalid_properties.push('invalid value for "results", results cannot be nil.')
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
115
|
+
return false if @count.nil?
|
|
116
|
+
return false if @results.nil?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Checks equality by comparing each attribute.
|
|
121
|
+
# @param [Object] Object to be compared
|
|
122
|
+
def ==(o)
|
|
123
|
+
return true if self.equal?(o)
|
|
124
|
+
self.class == o.class &&
|
|
125
|
+
count == o.count &&
|
|
126
|
+
_next == o._next &&
|
|
127
|
+
previous == o.previous &&
|
|
128
|
+
results == o.results
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[count, _next, previous, results].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
new(transformed_hash)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Deserializes the data based on type
|
|
167
|
+
# @param string type Data type
|
|
168
|
+
# @param string value Value to be deserialized
|
|
169
|
+
# @return [Object] Deserialized data
|
|
170
|
+
def self._deserialize(type, value)
|
|
171
|
+
case type.to_sym
|
|
172
|
+
when :Time
|
|
173
|
+
Time.parse(value)
|
|
174
|
+
when :Date
|
|
175
|
+
Date.parse(value)
|
|
176
|
+
when :String
|
|
177
|
+
value.to_s
|
|
178
|
+
when :Integer
|
|
179
|
+
value.to_i
|
|
180
|
+
when :Float
|
|
181
|
+
value.to_f
|
|
182
|
+
when :Boolean
|
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
+
true
|
|
185
|
+
else
|
|
186
|
+
false
|
|
187
|
+
end
|
|
188
|
+
when :Object
|
|
189
|
+
# generic object (usually a Hash), return directly
|
|
190
|
+
value
|
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each do |k, v|
|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
else # model
|
|
203
|
+
# models (e.g. Pet) or oneOf
|
|
204
|
+
klass = PulpPythonClient.const_get(type)
|
|
205
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the string representation of the object
|
|
210
|
+
# @return [String] String presentation of the object
|
|
211
|
+
def to_s
|
|
212
|
+
to_hash.to_s
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_body
|
|
218
|
+
to_hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_hash
|
|
224
|
+
hash = {}
|
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Outputs non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
# @param [Object] value Any valid value
|
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
|
241
|
+
def _to_hash(value)
|
|
242
|
+
if value.is_a?(Array)
|
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
|
244
|
+
elsif value.is_a?(Hash)
|
|
245
|
+
{}.tap do |hash|
|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
+
end
|
|
248
|
+
elsif value.respond_to? :to_hash
|
|
249
|
+
value.to_hash
|
|
250
|
+
else
|
|
251
|
+
value
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
@@ -36,6 +36,9 @@ module PulpPythonClient
|
|
|
36
36
|
# Publication to be served
|
|
37
37
|
attr_accessor :publication
|
|
38
38
|
|
|
39
|
+
# RepositoryVersion to be served.
|
|
40
|
+
attr_accessor :repository_version
|
|
41
|
+
|
|
39
42
|
# Allow packages to be uploaded to this index.
|
|
40
43
|
attr_accessor :allow_uploads
|
|
41
44
|
|
|
@@ -52,6 +55,7 @@ module PulpPythonClient
|
|
|
52
55
|
:'name' => :'name',
|
|
53
56
|
:'repository' => :'repository',
|
|
54
57
|
:'publication' => :'publication',
|
|
58
|
+
:'repository_version' => :'repository_version',
|
|
55
59
|
:'allow_uploads' => :'allow_uploads',
|
|
56
60
|
:'remote' => :'remote'
|
|
57
61
|
}
|
|
@@ -72,6 +76,7 @@ module PulpPythonClient
|
|
|
72
76
|
:'name' => :'String',
|
|
73
77
|
:'repository' => :'String',
|
|
74
78
|
:'publication' => :'String',
|
|
79
|
+
:'repository_version' => :'String',
|
|
75
80
|
:'allow_uploads' => :'Boolean',
|
|
76
81
|
:'remote' => :'String'
|
|
77
82
|
}
|
|
@@ -83,6 +88,7 @@ module PulpPythonClient
|
|
|
83
88
|
:'content_guard',
|
|
84
89
|
:'repository',
|
|
85
90
|
:'publication',
|
|
91
|
+
:'repository_version',
|
|
86
92
|
:'remote'
|
|
87
93
|
])
|
|
88
94
|
end
|
|
@@ -134,6 +140,10 @@ module PulpPythonClient
|
|
|
134
140
|
self.publication = attributes[:'publication']
|
|
135
141
|
end
|
|
136
142
|
|
|
143
|
+
if attributes.key?(:'repository_version')
|
|
144
|
+
self.repository_version = attributes[:'repository_version']
|
|
145
|
+
end
|
|
146
|
+
|
|
137
147
|
if attributes.key?(:'allow_uploads')
|
|
138
148
|
self.allow_uploads = attributes[:'allow_uploads']
|
|
139
149
|
else
|
|
@@ -210,6 +220,7 @@ module PulpPythonClient
|
|
|
210
220
|
name == o.name &&
|
|
211
221
|
repository == o.repository &&
|
|
212
222
|
publication == o.publication &&
|
|
223
|
+
repository_version == o.repository_version &&
|
|
213
224
|
allow_uploads == o.allow_uploads &&
|
|
214
225
|
remote == o.remote
|
|
215
226
|
end
|
|
@@ -223,7 +234,7 @@ module PulpPythonClient
|
|
|
223
234
|
# Calculates hash code according to all attributes.
|
|
224
235
|
# @return [Integer] Hash code
|
|
225
236
|
def hash
|
|
226
|
-
[base_path, content_guard, hidden, pulp_labels, name, repository, publication, allow_uploads, remote].hash
|
|
237
|
+
[base_path, content_guard, hidden, pulp_labels, name, repository, publication, repository_version, allow_uploads, remote].hash
|
|
227
238
|
end
|
|
228
239
|
|
|
229
240
|
# Builds the object from hash
|
|
@@ -96,6 +96,9 @@ module PulpPythonClient
|
|
|
96
96
|
# List of platforms to exclude syncing Python packages for. Possible valuesinclude: windows, macos, freebsd, and linux.
|
|
97
97
|
attr_accessor :exclude_platforms
|
|
98
98
|
|
|
99
|
+
# Whether to sync available provenances for Python packages.
|
|
100
|
+
attr_accessor :provenance
|
|
101
|
+
|
|
99
102
|
class EnumAttributeValidator
|
|
100
103
|
attr_reader :datatype
|
|
101
104
|
attr_reader :allowable_values
|
|
@@ -147,7 +150,8 @@ module PulpPythonClient
|
|
|
147
150
|
:'prereleases' => :'prereleases',
|
|
148
151
|
:'package_types' => :'package_types',
|
|
149
152
|
:'keep_latest_packages' => :'keep_latest_packages',
|
|
150
|
-
:'exclude_platforms' => :'exclude_platforms'
|
|
153
|
+
:'exclude_platforms' => :'exclude_platforms',
|
|
154
|
+
:'provenance' => :'provenance'
|
|
151
155
|
}
|
|
152
156
|
end
|
|
153
157
|
|
|
@@ -185,7 +189,8 @@ module PulpPythonClient
|
|
|
185
189
|
:'prereleases' => :'Boolean',
|
|
186
190
|
:'package_types' => :'Array<PackageTypesEnum>',
|
|
187
191
|
:'keep_latest_packages' => :'Integer',
|
|
188
|
-
:'exclude_platforms' => :'Array<ExcludePlatformsEnum>'
|
|
192
|
+
:'exclude_platforms' => :'Array<ExcludePlatformsEnum>',
|
|
193
|
+
:'provenance' => :'Boolean'
|
|
189
194
|
}
|
|
190
195
|
end
|
|
191
196
|
|
|
@@ -346,6 +351,12 @@ module PulpPythonClient
|
|
|
346
351
|
self.exclude_platforms = value
|
|
347
352
|
end
|
|
348
353
|
end
|
|
354
|
+
|
|
355
|
+
if attributes.key?(:'provenance')
|
|
356
|
+
self.provenance = attributes[:'provenance']
|
|
357
|
+
else
|
|
358
|
+
self.provenance = false
|
|
359
|
+
end
|
|
349
360
|
end
|
|
350
361
|
|
|
351
362
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -612,7 +623,8 @@ module PulpPythonClient
|
|
|
612
623
|
prereleases == o.prereleases &&
|
|
613
624
|
package_types == o.package_types &&
|
|
614
625
|
keep_latest_packages == o.keep_latest_packages &&
|
|
615
|
-
exclude_platforms == o.exclude_platforms
|
|
626
|
+
exclude_platforms == o.exclude_platforms &&
|
|
627
|
+
provenance == o.provenance
|
|
616
628
|
end
|
|
617
629
|
|
|
618
630
|
# @see the `==` method
|
|
@@ -624,7 +636,7 @@ module PulpPythonClient
|
|
|
624
636
|
# Calculates hash code according to all attributes.
|
|
625
637
|
# @return [Integer] Hash code
|
|
626
638
|
def hash
|
|
627
|
-
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, includes, excludes, prereleases, package_types, keep_latest_packages, exclude_platforms].hash
|
|
639
|
+
[name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, proxy_username, proxy_password, username, password, pulp_labels, download_concurrency, max_retries, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, headers, rate_limit, includes, excludes, prereleases, package_types, keep_latest_packages, exclude_platforms, provenance].hash
|
|
628
640
|
end
|
|
629
641
|
|
|
630
642
|
# Builds the object from hash
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
Generator version: 7.10.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module PulpPythonClient
|
|
17
|
+
class ProtocolVersionEnum
|
|
18
|
+
N1 = 1.freeze
|
|
19
|
+
|
|
20
|
+
def self.all_vars
|
|
21
|
+
@all_vars ||= [N1].freeze
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Builds the enum from string
|
|
25
|
+
# @param [String] The enum value in the form of the string
|
|
26
|
+
# @return [String] The enum value
|
|
27
|
+
def self.build_from_hash(value)
|
|
28
|
+
new.build_from_hash(value)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Builds the enum from string
|
|
32
|
+
# @param [String] The enum value in the form of the string
|
|
33
|
+
# @return [String] The enum value
|
|
34
|
+
def build_from_hash(value)
|
|
35
|
+
return value if ProtocolVersionEnum.all_vars.include?(value)
|
|
36
|
+
raise "Invalid ENUM value #{value} for class #ProtocolVersionEnum"
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|