pulp_docker_client 4.0.0b5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +131 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/Blob.md +29 -0
- data/docs/ContentBlobsApi.md +182 -0
- data/docs/ContentManifestTagsApi.md +182 -0
- data/docs/ContentManifestsApi.md +180 -0
- data/docs/DistributionsDockerApi.md +352 -0
- data/docs/DockerDistribution.md +31 -0
- data/docs/DockerRemote.md +49 -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/Manifest.md +37 -0
- data/docs/ManifestTag.md +29 -0
- data/docs/RemotesDockerApi.md +411 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/git_push.sh +55 -0
- data/lib/pulp_docker_client/api/content_blobs_api.rb +222 -0
- data/lib/pulp_docker_client/api/content_manifest_tags_api.rb +222 -0
- data/lib/pulp_docker_client/api/content_manifests_api.rb +219 -0
- data/lib/pulp_docker_client/api/distributions_docker_api.rb +430 -0
- data/lib/pulp_docker_client/api/remotes_docker_api.rb +504 -0
- data/lib/pulp_docker_client/api_client.rb +387 -0
- data/lib/pulp_docker_client/api_error.rb +57 -0
- data/lib/pulp_docker_client/configuration.rb +251 -0
- data/lib/pulp_docker_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_docker_client/models/blob.rb +347 -0
- data/lib/pulp_docker_client/models/docker_distribution.rb +347 -0
- data/lib/pulp_docker_client/models/docker_remote.rb +598 -0
- data/lib/pulp_docker_client/models/inline_response200.rb +235 -0
- data/lib/pulp_docker_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_docker_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_docker_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_docker_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_docker_client/models/manifest.rb +411 -0
- data/lib/pulp_docker_client/models/manifest_tag.rb +328 -0
- data/lib/pulp_docker_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_docker_client/version.rb +15 -0
- data/lib/pulp_docker_client.rb +56 -0
- data/pulp_docker_client.gemspec +45 -0
- data/spec/api/content_blobs_api_spec.rb +76 -0
- data/spec/api/content_manifest_tags_api_spec.rb +76 -0
- data/spec/api/content_manifests_api_spec.rb +75 -0
- data/spec/api/distributions_docker_api_spec.rb +116 -0
- data/spec/api/remotes_docker_api_spec.rb +130 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/blob_spec.rb +77 -0
- data/spec/models/docker_distribution_spec.rb +83 -0
- data/spec/models/docker_remote_spec.rb +141 -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_response200_spec.rb +59 -0
- data/spec/models/manifest_spec.rb +101 -0
- data/spec/models/manifest_tag_spec.rb +77 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- metadata +309 -0
@@ -0,0 +1,328 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module PulpDockerClient
|
16
|
+
class ManifestTag
|
17
|
+
attr_accessor :_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :_created
|
21
|
+
|
22
|
+
attr_accessor :_type
|
23
|
+
|
24
|
+
# Artifact file representing the physical content
|
25
|
+
attr_accessor :_artifact
|
26
|
+
|
27
|
+
# Path where the artifact is located relative to distributions base_path
|
28
|
+
attr_accessor :_relative_path
|
29
|
+
|
30
|
+
# Tag name
|
31
|
+
attr_accessor :name
|
32
|
+
|
33
|
+
# Manifest that is tagged
|
34
|
+
attr_accessor :tagged_manifest
|
35
|
+
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
37
|
+
def self.attribute_map
|
38
|
+
{
|
39
|
+
:'_href' => :'_href',
|
40
|
+
:'_created' => :'_created',
|
41
|
+
:'_type' => :'_type',
|
42
|
+
:'_artifact' => :'_artifact',
|
43
|
+
:'_relative_path' => :'_relative_path',
|
44
|
+
:'name' => :'name',
|
45
|
+
:'tagged_manifest' => :'tagged_manifest'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'_href' => :'String',
|
53
|
+
:'_created' => :'DateTime',
|
54
|
+
:'_type' => :'String',
|
55
|
+
:'_artifact' => :'String',
|
56
|
+
:'_relative_path' => :'String',
|
57
|
+
:'name' => :'String',
|
58
|
+
:'tagged_manifest' => :'String'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDockerClient::ManifestTag` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDockerClient::ManifestTag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'_href')
|
78
|
+
self._href = attributes[:'_href']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'_created')
|
82
|
+
self._created = attributes[:'_created']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'_type')
|
86
|
+
self._type = attributes[:'_type']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'_artifact')
|
90
|
+
self._artifact = attributes[:'_artifact']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'_relative_path')
|
94
|
+
self._relative_path = attributes[:'_relative_path']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.key?(:'name')
|
98
|
+
self.name = attributes[:'name']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.key?(:'tagged_manifest')
|
102
|
+
self.tagged_manifest = attributes[:'tagged_manifest']
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
107
|
+
# @return Array for valid properties with the reasons
|
108
|
+
def list_invalid_properties
|
109
|
+
invalid_properties = Array.new
|
110
|
+
if !@_type.nil? && @_type.to_s.length < 1
|
111
|
+
invalid_properties.push('invalid value for "_type", the character length must be great than or equal to 1.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if @_artifact.nil?
|
115
|
+
invalid_properties.push('invalid value for "_artifact", _artifact cannot be nil.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if @_relative_path.nil?
|
119
|
+
invalid_properties.push('invalid value for "_relative_path", _relative_path cannot be nil.')
|
120
|
+
end
|
121
|
+
|
122
|
+
if @_relative_path.to_s.length < 1
|
123
|
+
invalid_properties.push('invalid value for "_relative_path", the character length must be great than or equal to 1.')
|
124
|
+
end
|
125
|
+
|
126
|
+
if @name.nil?
|
127
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
128
|
+
end
|
129
|
+
|
130
|
+
if @name.to_s.length < 1
|
131
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
132
|
+
end
|
133
|
+
|
134
|
+
if @tagged_manifest.nil?
|
135
|
+
invalid_properties.push('invalid value for "tagged_manifest", tagged_manifest cannot be nil.')
|
136
|
+
end
|
137
|
+
|
138
|
+
invalid_properties
|
139
|
+
end
|
140
|
+
|
141
|
+
# Check to see if the all the properties in the model are valid
|
142
|
+
# @return true if the model is valid
|
143
|
+
def valid?
|
144
|
+
return false if !@_type.nil? && @_type.to_s.length < 1
|
145
|
+
return false if @_artifact.nil?
|
146
|
+
return false if @_relative_path.nil?
|
147
|
+
return false if @_relative_path.to_s.length < 1
|
148
|
+
return false if @name.nil?
|
149
|
+
return false if @name.to_s.length < 1
|
150
|
+
return false if @tagged_manifest.nil?
|
151
|
+
true
|
152
|
+
end
|
153
|
+
|
154
|
+
# Custom attribute writer method with validation
|
155
|
+
# @param [Object] _type Value to be assigned
|
156
|
+
def _type=(_type)
|
157
|
+
if !_type.nil? && _type.to_s.length < 1
|
158
|
+
fail ArgumentError, 'invalid value for "_type", the character length must be great than or equal to 1.'
|
159
|
+
end
|
160
|
+
|
161
|
+
@_type = _type
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] _relative_path Value to be assigned
|
166
|
+
def _relative_path=(_relative_path)
|
167
|
+
if _relative_path.nil?
|
168
|
+
fail ArgumentError, '_relative_path cannot be nil'
|
169
|
+
end
|
170
|
+
|
171
|
+
if _relative_path.to_s.length < 1
|
172
|
+
fail ArgumentError, 'invalid value for "_relative_path", the character length must be great than or equal to 1.'
|
173
|
+
end
|
174
|
+
|
175
|
+
@_relative_path = _relative_path
|
176
|
+
end
|
177
|
+
|
178
|
+
# Custom attribute writer method with validation
|
179
|
+
# @param [Object] name Value to be assigned
|
180
|
+
def name=(name)
|
181
|
+
if name.nil?
|
182
|
+
fail ArgumentError, 'name cannot be nil'
|
183
|
+
end
|
184
|
+
|
185
|
+
if name.to_s.length < 1
|
186
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
187
|
+
end
|
188
|
+
|
189
|
+
@name = name
|
190
|
+
end
|
191
|
+
|
192
|
+
# Checks equality by comparing each attribute.
|
193
|
+
# @param [Object] Object to be compared
|
194
|
+
def ==(o)
|
195
|
+
return true if self.equal?(o)
|
196
|
+
self.class == o.class &&
|
197
|
+
_href == o._href &&
|
198
|
+
_created == o._created &&
|
199
|
+
_type == o._type &&
|
200
|
+
_artifact == o._artifact &&
|
201
|
+
_relative_path == o._relative_path &&
|
202
|
+
name == o.name &&
|
203
|
+
tagged_manifest == o.tagged_manifest
|
204
|
+
end
|
205
|
+
|
206
|
+
# @see the `==` method
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def eql?(o)
|
209
|
+
self == o
|
210
|
+
end
|
211
|
+
|
212
|
+
# Calculates hash code according to all attributes.
|
213
|
+
# @return [Integer] Hash code
|
214
|
+
def hash
|
215
|
+
[_href, _created, _type, _artifact, _relative_path, name, tagged_manifest].hash
|
216
|
+
end
|
217
|
+
|
218
|
+
# Builds the object from hash
|
219
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
220
|
+
# @return [Object] Returns the model itself
|
221
|
+
def self.build_from_hash(attributes)
|
222
|
+
new.build_from_hash(attributes)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Builds the object from hash
|
226
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
227
|
+
# @return [Object] Returns the model itself
|
228
|
+
def build_from_hash(attributes)
|
229
|
+
return nil unless attributes.is_a?(Hash)
|
230
|
+
self.class.openapi_types.each_pair do |key, type|
|
231
|
+
if type =~ /\AArray<(.*)>/i
|
232
|
+
# check to ensure the input is an array given that the attribute
|
233
|
+
# is documented as an array but the input is not
|
234
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
235
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
236
|
+
end
|
237
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
238
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
239
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
240
|
+
end
|
241
|
+
|
242
|
+
self
|
243
|
+
end
|
244
|
+
|
245
|
+
# Deserializes the data based on type
|
246
|
+
# @param string type Data type
|
247
|
+
# @param string value Value to be deserialized
|
248
|
+
# @return [Object] Deserialized data
|
249
|
+
def _deserialize(type, value)
|
250
|
+
case type.to_sym
|
251
|
+
when :DateTime
|
252
|
+
DateTime.parse(value)
|
253
|
+
when :Date
|
254
|
+
Date.parse(value)
|
255
|
+
when :String
|
256
|
+
value.to_s
|
257
|
+
when :Integer
|
258
|
+
value.to_i
|
259
|
+
when :Float
|
260
|
+
value.to_f
|
261
|
+
when :Boolean
|
262
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
263
|
+
true
|
264
|
+
else
|
265
|
+
false
|
266
|
+
end
|
267
|
+
when :Object
|
268
|
+
# generic object (usually a Hash), return directly
|
269
|
+
value
|
270
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
271
|
+
inner_type = Regexp.last_match[:inner_type]
|
272
|
+
value.map { |v| _deserialize(inner_type, v) }
|
273
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
274
|
+
k_type = Regexp.last_match[:k_type]
|
275
|
+
v_type = Regexp.last_match[:v_type]
|
276
|
+
{}.tap do |hash|
|
277
|
+
value.each do |k, v|
|
278
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
279
|
+
end
|
280
|
+
end
|
281
|
+
else # model
|
282
|
+
PulpDockerClient.const_get(type).build_from_hash(value)
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
# Returns the string representation of the object
|
287
|
+
# @return [String] String presentation of the object
|
288
|
+
def to_s
|
289
|
+
to_hash.to_s
|
290
|
+
end
|
291
|
+
|
292
|
+
# to_body is an alias to to_hash (backward compatibility)
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
294
|
+
def to_body
|
295
|
+
to_hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Returns the object in the form of hash
|
299
|
+
# @return [Hash] Returns the object in the form of hash
|
300
|
+
def to_hash
|
301
|
+
hash = {}
|
302
|
+
self.class.attribute_map.each_pair do |attr, param|
|
303
|
+
value = self.send(attr)
|
304
|
+
next if value.nil?
|
305
|
+
hash[param] = _to_hash(value)
|
306
|
+
end
|
307
|
+
hash
|
308
|
+
end
|
309
|
+
|
310
|
+
# Outputs non-array value in the form of hash
|
311
|
+
# For object, use to_hash. Otherwise, just return the value
|
312
|
+
# @param [Object] value Any valid value
|
313
|
+
# @return [Hash] Returns the value in the form of hash
|
314
|
+
def _to_hash(value)
|
315
|
+
if value.is_a?(Array)
|
316
|
+
value.compact.map { |v| _to_hash(v) }
|
317
|
+
elsif value.is_a?(Hash)
|
318
|
+
{}.tap do |hash|
|
319
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
+
end
|
321
|
+
elsif value.respond_to? :to_hash
|
322
|
+
value.to_hash
|
323
|
+
else
|
324
|
+
value
|
325
|
+
end
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
@@ -0,0 +1,214 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module PulpDockerClient
|
16
|
+
class RepositorySyncURL
|
17
|
+
# A URI of the repository to be synchronized.
|
18
|
+
attr_accessor :repository
|
19
|
+
|
20
|
+
# If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only.
|
21
|
+
attr_accessor :mirror
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'repository' => :'repository',
|
27
|
+
:'mirror' => :'mirror'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'repository' => :'String',
|
35
|
+
:'mirror' => :'Boolean'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDockerClient::RepositorySyncURL` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDockerClient::RepositorySyncURL`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'repository')
|
55
|
+
self.repository = attributes[:'repository']
|
56
|
+
end
|
57
|
+
|
58
|
+
if attributes.key?(:'mirror')
|
59
|
+
self.mirror = attributes[:'mirror']
|
60
|
+
else
|
61
|
+
self.mirror = false
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if @repository.nil?
|
70
|
+
invalid_properties.push('invalid value for "repository", repository cannot be nil.')
|
71
|
+
end
|
72
|
+
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return false if @repository.nil?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
repository == o.repository &&
|
89
|
+
mirror == o.mirror
|
90
|
+
end
|
91
|
+
|
92
|
+
# @see the `==` method
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def eql?(o)
|
95
|
+
self == o
|
96
|
+
end
|
97
|
+
|
98
|
+
# Calculates hash code according to all attributes.
|
99
|
+
# @return [Integer] Hash code
|
100
|
+
def hash
|
101
|
+
[repository, mirror].hash
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def self.build_from_hash(attributes)
|
108
|
+
new.build_from_hash(attributes)
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
self.class.openapi_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :Boolean
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
PulpDockerClient.const_get(type).build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map { |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|
@@ -0,0 +1,15 @@
|
|
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
|
+
module PulpDockerClient
|
14
|
+
VERSION = '4.0.0b5'
|
15
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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
|
+
# Common files
|
14
|
+
require 'pulp_docker_client/api_client'
|
15
|
+
require 'pulp_docker_client/api_error'
|
16
|
+
require 'pulp_docker_client/version'
|
17
|
+
require 'pulp_docker_client/configuration'
|
18
|
+
|
19
|
+
# Models
|
20
|
+
require 'pulp_docker_client/models/async_operation_response'
|
21
|
+
require 'pulp_docker_client/models/blob'
|
22
|
+
require 'pulp_docker_client/models/docker_distribution'
|
23
|
+
require 'pulp_docker_client/models/docker_remote'
|
24
|
+
require 'pulp_docker_client/models/inline_response200'
|
25
|
+
require 'pulp_docker_client/models/inline_response2001'
|
26
|
+
require 'pulp_docker_client/models/inline_response2002'
|
27
|
+
require 'pulp_docker_client/models/inline_response2003'
|
28
|
+
require 'pulp_docker_client/models/inline_response2004'
|
29
|
+
require 'pulp_docker_client/models/manifest'
|
30
|
+
require 'pulp_docker_client/models/manifest_tag'
|
31
|
+
require 'pulp_docker_client/models/repository_sync_url'
|
32
|
+
|
33
|
+
# APIs
|
34
|
+
require 'pulp_docker_client/api/content_blobs_api'
|
35
|
+
require 'pulp_docker_client/api/content_manifest_tags_api'
|
36
|
+
require 'pulp_docker_client/api/content_manifests_api'
|
37
|
+
require 'pulp_docker_client/api/distributions_docker_api'
|
38
|
+
require 'pulp_docker_client/api/remotes_docker_api'
|
39
|
+
|
40
|
+
module PulpDockerClient
|
41
|
+
class << self
|
42
|
+
# Customize default settings for the SDK using block.
|
43
|
+
# PulpDockerClient.configure do |config|
|
44
|
+
# config.username = "xxx"
|
45
|
+
# config.password = "xxx"
|
46
|
+
# end
|
47
|
+
# If no block given, return the default Configuration object.
|
48
|
+
def configure
|
49
|
+
if block_given?
|
50
|
+
yield(Configuration.default)
|
51
|
+
else
|
52
|
+
Configuration.default
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#Pulp 3 API
|
5
|
+
|
6
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
7
|
+
|
8
|
+
The version of the OpenAPI document: v3
|
9
|
+
|
10
|
+
Generated by: https://openapi-generator.tech
|
11
|
+
OpenAPI Generator version: 4.0.0
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "pulp_docker_client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "pulp_docker_client"
|
20
|
+
s.version = PulpDockerClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["OpenAPI-Generator"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://openapi-generator.tech"
|
25
|
+
s.summary = "Pulp 3 API Ruby Gem"
|
26
|
+
s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
|
27
|
+
s.license = 'GPLv2'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|