pulp_container_client 1.0.0rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +164 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContainerBlob.md +25 -0
- data/docs/ContainerContainerDistribution.md +31 -0
- data/docs/ContainerContainerRemote.md +43 -0
- data/docs/ContainerContainerRepository.md +27 -0
- data/docs/ContainerManifest.md +33 -0
- data/docs/ContainerTag.md +25 -0
- data/docs/ContentBlobsApi.md +142 -0
- data/docs/ContentManifestsApi.md +142 -0
- data/docs/ContentSummary.md +21 -0
- data/docs/ContentTagsApi.md +144 -0
- data/docs/DistributionsContainerApi.md +362 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/InlineResponse2005.md +23 -0
- data/docs/InlineResponse2006.md +23 -0
- data/docs/ManifestCopy.md +23 -0
- data/docs/RecursiveManage.md +17 -0
- data/docs/RemotesContainerApi.md +366 -0
- data/docs/RepositoriesContainerApi.md +739 -0
- data/docs/RepositoriesContainerVersionsApi.md +214 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RepositoryVersion.md +25 -0
- data/docs/TagCopy.md +21 -0
- data/docs/TagImage.md +19 -0
- data/docs/UnTagImage.md +17 -0
- data/git_push.sh +58 -0
- data/lib/pulp_container_client/api/content_blobs_api.rb +176 -0
- data/lib/pulp_container_client/api/content_manifests_api.rb +176 -0
- data/lib/pulp_container_client/api/content_tags_api.rb +179 -0
- data/lib/pulp_container_client/api/distributions_container_api.rb +442 -0
- data/lib/pulp_container_client/api/remotes_container_api.rb +448 -0
- data/lib/pulp_container_client/api/repositories_container_api.rb +906 -0
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +268 -0
- data/lib/pulp_container_client/api_client.rb +402 -0
- data/lib/pulp_container_client/api_error.rb +57 -0
- data/lib/pulp_container_client/configuration.rb +243 -0
- data/lib/pulp_container_client/models/async_operation_response.rb +212 -0
- data/lib/pulp_container_client/models/container_blob.rb +299 -0
- data/lib/pulp_container_client/models/container_container_distribution.rb +342 -0
- data/lib/pulp_container_client/models/container_container_remote.rb +526 -0
- data/lib/pulp_container_client/models/container_container_repository.rb +294 -0
- data/lib/pulp_container_client/models/container_manifest.rb +363 -0
- data/lib/pulp_container_client/models/container_tag.rb +280 -0
- data/lib/pulp_container_client/models/content_summary.rb +246 -0
- data/lib/pulp_container_client/models/inline_response200.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2001.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2002.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2003.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2004.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2005.rb +247 -0
- data/lib/pulp_container_client/models/inline_response2006.rb +247 -0
- data/lib/pulp_container_client/models/manifest_copy.rb +263 -0
- data/lib/pulp_container_client/models/recursive_manage.rb +209 -0
- data/lib/pulp_container_client/models/repository_sync_url.rb +224 -0
- data/lib/pulp_container_client/models/repository_version.rb +244 -0
- data/lib/pulp_container_client/models/tag_copy.rb +229 -0
- data/lib/pulp_container_client/models/tag_image.rb +265 -0
- data/lib/pulp_container_client/models/un_tag_image.rb +231 -0
- data/lib/pulp_container_client/version.rb +15 -0
- data/lib/pulp_container_client.rb +68 -0
- data/pulp_container_client.gemspec +39 -0
- data/spec/api/content_blobs_api_spec.rb +70 -0
- data/spec/api/content_manifests_api_spec.rb +70 -0
- data/spec/api/content_tags_api_spec.rb +71 -0
- data/spec/api/distributions_container_api_spec.rb +120 -0
- data/spec/api/remotes_container_api_spec.rb +122 -0
- data/spec/api/repositories_container_api_spec.rb +200 -0
- data/spec/api/repositories_container_versions_api_spec.rb +91 -0
- data/spec/api_client_spec.rb +188 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/container_blob_spec.rb +65 -0
- data/spec/models/container_container_distribution_spec.rb +83 -0
- data/spec/models/container_container_remote_spec.rb +123 -0
- data/spec/models/container_container_repository_spec.rb +71 -0
- data/spec/models/container_manifest_spec.rb +89 -0
- data/spec/models/container_tag_spec.rb +65 -0
- data/spec/models/content_summary_spec.rb +53 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response2005_spec.rb +59 -0
- data/spec/models/inline_response2006_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/manifest_copy_spec.rb +63 -0
- data/spec/models/recursive_manage_spec.rb +41 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/repository_version_spec.rb +65 -0
- data/spec/models/tag_copy_spec.rb +53 -0
- data/spec/models/tag_image_spec.rb +47 -0
- data/spec/models/un_tag_image_spec.rb +41 -0
- data/spec/spec_helper.rb +111 -0
- metadata +230 -0
|
@@ -0,0 +1,265 @@
|
|
|
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.2.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpContainerClient
|
|
16
|
+
class TagImage
|
|
17
|
+
# A tag name
|
|
18
|
+
attr_accessor :tag
|
|
19
|
+
|
|
20
|
+
# sha256 of the Manifest file
|
|
21
|
+
attr_accessor :digest
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'tag' => :'tag',
|
|
27
|
+
:'digest' => :'digest'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.openapi_types
|
|
33
|
+
{
|
|
34
|
+
:'tag' => :'String',
|
|
35
|
+
:'digest' => :'String'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# List of attributes with nullable: true
|
|
40
|
+
def self.openapi_nullable
|
|
41
|
+
Set.new([
|
|
42
|
+
])
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Initializes the object
|
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
47
|
+
def initialize(attributes = {})
|
|
48
|
+
if (!attributes.is_a?(Hash))
|
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::TagImage` initialize method"
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::TagImage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
56
|
+
end
|
|
57
|
+
h[k.to_sym] = v
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if attributes.key?(:'tag')
|
|
61
|
+
self.tag = attributes[:'tag']
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
if attributes.key?(:'digest')
|
|
65
|
+
self.digest = attributes[:'digest']
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
70
|
+
# @return Array for valid properties with the reasons
|
|
71
|
+
def list_invalid_properties
|
|
72
|
+
invalid_properties = Array.new
|
|
73
|
+
if @tag.nil?
|
|
74
|
+
invalid_properties.push('invalid value for "tag", tag cannot be nil.')
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if @tag.to_s.length < 1
|
|
78
|
+
invalid_properties.push('invalid value for "tag", the character length must be great than or equal to 1.')
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if @digest.nil?
|
|
82
|
+
invalid_properties.push('invalid value for "digest", digest cannot be nil.')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if @digest.to_s.length < 1
|
|
86
|
+
invalid_properties.push('invalid value for "digest", the character length must be great than or equal to 1.')
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
invalid_properties
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Check to see if the all the properties in the model are valid
|
|
93
|
+
# @return true if the model is valid
|
|
94
|
+
def valid?
|
|
95
|
+
return false if @tag.nil?
|
|
96
|
+
return false if @tag.to_s.length < 1
|
|
97
|
+
return false if @digest.nil?
|
|
98
|
+
return false if @digest.to_s.length < 1
|
|
99
|
+
true
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Custom attribute writer method with validation
|
|
103
|
+
# @param [Object] tag Value to be assigned
|
|
104
|
+
def tag=(tag)
|
|
105
|
+
if tag.nil?
|
|
106
|
+
fail ArgumentError, 'tag cannot be nil'
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if tag.to_s.length < 1
|
|
110
|
+
fail ArgumentError, 'invalid value for "tag", the character length must be great than or equal to 1.'
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
@tag = tag
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Custom attribute writer method with validation
|
|
117
|
+
# @param [Object] digest Value to be assigned
|
|
118
|
+
def digest=(digest)
|
|
119
|
+
if digest.nil?
|
|
120
|
+
fail ArgumentError, 'digest cannot be nil'
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
if digest.to_s.length < 1
|
|
124
|
+
fail ArgumentError, 'invalid value for "digest", the character length must be great than or equal to 1.'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@digest = digest
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
tag == o.tag &&
|
|
136
|
+
digest == o.digest
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[tag, digest].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
new.build_from_hash(attributes)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Builds the object from hash
|
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
160
|
+
# @return [Object] Returns the model itself
|
|
161
|
+
def build_from_hash(attributes)
|
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
|
163
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
164
|
+
if type =~ /\AArray<(.*)>/i
|
|
165
|
+
# check to ensure the input is an array given that the attribute
|
|
166
|
+
# is documented as an array but the input is not
|
|
167
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
168
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
169
|
+
end
|
|
170
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
171
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
172
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
self
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Deserializes the data based on type
|
|
179
|
+
# @param string type Data type
|
|
180
|
+
# @param string value Value to be deserialized
|
|
181
|
+
# @return [Object] Deserialized data
|
|
182
|
+
def _deserialize(type, value)
|
|
183
|
+
case type.to_sym
|
|
184
|
+
when :DateTime
|
|
185
|
+
DateTime.parse(value)
|
|
186
|
+
when :Date
|
|
187
|
+
Date.parse(value)
|
|
188
|
+
when :String
|
|
189
|
+
value.to_s
|
|
190
|
+
when :Integer
|
|
191
|
+
value.to_i
|
|
192
|
+
when :Float
|
|
193
|
+
value.to_f
|
|
194
|
+
when :Boolean
|
|
195
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
196
|
+
true
|
|
197
|
+
else
|
|
198
|
+
false
|
|
199
|
+
end
|
|
200
|
+
when :Object
|
|
201
|
+
# generic object (usually a Hash), return directly
|
|
202
|
+
value
|
|
203
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
204
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
205
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
206
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
207
|
+
k_type = Regexp.last_match[:k_type]
|
|
208
|
+
v_type = Regexp.last_match[:v_type]
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each do |k, v|
|
|
211
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
else # model
|
|
215
|
+
PulpContainerClient.const_get(type).build_from_hash(value)
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the string representation of the object
|
|
220
|
+
# @return [String] String presentation of the object
|
|
221
|
+
def to_s
|
|
222
|
+
to_hash.to_s
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_body
|
|
228
|
+
to_hash
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns the object in the form of hash
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_hash
|
|
234
|
+
hash = {}
|
|
235
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
236
|
+
value = self.send(attr)
|
|
237
|
+
if value.nil?
|
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
hash[param] = _to_hash(value)
|
|
243
|
+
end
|
|
244
|
+
hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Outputs non-array value in the form of hash
|
|
248
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
249
|
+
# @param [Object] value Any valid value
|
|
250
|
+
# @return [Hash] Returns the value in the form of hash
|
|
251
|
+
def _to_hash(value)
|
|
252
|
+
if value.is_a?(Array)
|
|
253
|
+
value.compact.map { |v| _to_hash(v) }
|
|
254
|
+
elsif value.is_a?(Hash)
|
|
255
|
+
{}.tap do |hash|
|
|
256
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
257
|
+
end
|
|
258
|
+
elsif value.respond_to? :to_hash
|
|
259
|
+
value.to_hash
|
|
260
|
+
else
|
|
261
|
+
value
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
end
|
|
265
|
+
end
|
|
@@ -0,0 +1,231 @@
|
|
|
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.2.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module PulpContainerClient
|
|
16
|
+
class UnTagImage
|
|
17
|
+
# A tag name
|
|
18
|
+
attr_accessor :tag
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'tag' => :'tag'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Attribute type mapping.
|
|
28
|
+
def self.openapi_types
|
|
29
|
+
{
|
|
30
|
+
:'tag' => :'String'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# List of attributes with nullable: true
|
|
35
|
+
def self.openapi_nullable
|
|
36
|
+
Set.new([
|
|
37
|
+
])
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Initializes the object
|
|
41
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
42
|
+
def initialize(attributes = {})
|
|
43
|
+
if (!attributes.is_a?(Hash))
|
|
44
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::UnTagImage` initialize method"
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
48
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
49
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
50
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::UnTagImage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
51
|
+
end
|
|
52
|
+
h[k.to_sym] = v
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if attributes.key?(:'tag')
|
|
56
|
+
self.tag = attributes[:'tag']
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
61
|
+
# @return Array for valid properties with the reasons
|
|
62
|
+
def list_invalid_properties
|
|
63
|
+
invalid_properties = Array.new
|
|
64
|
+
if @tag.nil?
|
|
65
|
+
invalid_properties.push('invalid value for "tag", tag cannot be nil.')
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
if @tag.to_s.length < 1
|
|
69
|
+
invalid_properties.push('invalid value for "tag", the character length must be great than or equal to 1.')
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
invalid_properties
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Check to see if the all the properties in the model are valid
|
|
76
|
+
# @return true if the model is valid
|
|
77
|
+
def valid?
|
|
78
|
+
return false if @tag.nil?
|
|
79
|
+
return false if @tag.to_s.length < 1
|
|
80
|
+
true
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Custom attribute writer method with validation
|
|
84
|
+
# @param [Object] tag Value to be assigned
|
|
85
|
+
def tag=(tag)
|
|
86
|
+
if tag.nil?
|
|
87
|
+
fail ArgumentError, 'tag cannot be nil'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if tag.to_s.length < 1
|
|
91
|
+
fail ArgumentError, 'invalid value for "tag", the character length must be great than or equal to 1.'
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
@tag = tag
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
tag == o.tag
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Integer] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[tag].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def self.build_from_hash(attributes)
|
|
121
|
+
new.build_from_hash(attributes)
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Builds the object from hash
|
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
126
|
+
# @return [Object] Returns the model itself
|
|
127
|
+
def build_from_hash(attributes)
|
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
|
131
|
+
# check to ensure the input is an array given that the attribute
|
|
132
|
+
# is documented as an array but the input is not
|
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
135
|
+
end
|
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
self
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Deserializes the data based on type
|
|
145
|
+
# @param string type Data type
|
|
146
|
+
# @param string value Value to be deserialized
|
|
147
|
+
# @return [Object] Deserialized data
|
|
148
|
+
def _deserialize(type, value)
|
|
149
|
+
case type.to_sym
|
|
150
|
+
when :DateTime
|
|
151
|
+
DateTime.parse(value)
|
|
152
|
+
when :Date
|
|
153
|
+
Date.parse(value)
|
|
154
|
+
when :String
|
|
155
|
+
value.to_s
|
|
156
|
+
when :Integer
|
|
157
|
+
value.to_i
|
|
158
|
+
when :Float
|
|
159
|
+
value.to_f
|
|
160
|
+
when :Boolean
|
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
+
true
|
|
163
|
+
else
|
|
164
|
+
false
|
|
165
|
+
end
|
|
166
|
+
when :Object
|
|
167
|
+
# generic object (usually a Hash), return directly
|
|
168
|
+
value
|
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each do |k, v|
|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
else # model
|
|
181
|
+
PulpContainerClient.const_get(type).build_from_hash(value)
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Returns the string representation of the object
|
|
186
|
+
# @return [String] String presentation of the object
|
|
187
|
+
def to_s
|
|
188
|
+
to_hash.to_s
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
|
193
|
+
def to_body
|
|
194
|
+
to_hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Returns the object in the form of hash
|
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
|
199
|
+
def to_hash
|
|
200
|
+
hash = {}
|
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
202
|
+
value = self.send(attr)
|
|
203
|
+
if value.nil?
|
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
hash[param] = _to_hash(value)
|
|
209
|
+
end
|
|
210
|
+
hash
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Outputs non-array value in the form of hash
|
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
215
|
+
# @param [Object] value Any valid value
|
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
|
217
|
+
def _to_hash(value)
|
|
218
|
+
if value.is_a?(Array)
|
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
|
220
|
+
elsif value.is_a?(Hash)
|
|
221
|
+
{}.tap do |hash|
|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
223
|
+
end
|
|
224
|
+
elsif value.respond_to? :to_hash
|
|
225
|
+
value.to_hash
|
|
226
|
+
else
|
|
227
|
+
value
|
|
228
|
+
end
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
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.2.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
module PulpContainerClient
|
|
14
|
+
VERSION = '1.0.0rc1'
|
|
15
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
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.2.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'pulp_container_client/api_client'
|
|
15
|
+
require 'pulp_container_client/api_error'
|
|
16
|
+
require 'pulp_container_client/version'
|
|
17
|
+
require 'pulp_container_client/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'pulp_container_client/models/async_operation_response'
|
|
21
|
+
require 'pulp_container_client/models/container_blob'
|
|
22
|
+
require 'pulp_container_client/models/container_container_distribution'
|
|
23
|
+
require 'pulp_container_client/models/container_container_remote'
|
|
24
|
+
require 'pulp_container_client/models/container_container_repository'
|
|
25
|
+
require 'pulp_container_client/models/container_manifest'
|
|
26
|
+
require 'pulp_container_client/models/container_tag'
|
|
27
|
+
require 'pulp_container_client/models/content_summary'
|
|
28
|
+
require 'pulp_container_client/models/inline_response200'
|
|
29
|
+
require 'pulp_container_client/models/inline_response2001'
|
|
30
|
+
require 'pulp_container_client/models/inline_response2002'
|
|
31
|
+
require 'pulp_container_client/models/inline_response2003'
|
|
32
|
+
require 'pulp_container_client/models/inline_response2004'
|
|
33
|
+
require 'pulp_container_client/models/inline_response2005'
|
|
34
|
+
require 'pulp_container_client/models/inline_response2006'
|
|
35
|
+
require 'pulp_container_client/models/manifest_copy'
|
|
36
|
+
require 'pulp_container_client/models/recursive_manage'
|
|
37
|
+
require 'pulp_container_client/models/repository_sync_url'
|
|
38
|
+
require 'pulp_container_client/models/repository_version'
|
|
39
|
+
require 'pulp_container_client/models/tag_copy'
|
|
40
|
+
require 'pulp_container_client/models/tag_image'
|
|
41
|
+
require 'pulp_container_client/models/un_tag_image'
|
|
42
|
+
|
|
43
|
+
# APIs
|
|
44
|
+
require 'pulp_container_client/api/content_blobs_api'
|
|
45
|
+
require 'pulp_container_client/api/content_manifests_api'
|
|
46
|
+
require 'pulp_container_client/api/content_tags_api'
|
|
47
|
+
require 'pulp_container_client/api/distributions_container_api'
|
|
48
|
+
require 'pulp_container_client/api/remotes_container_api'
|
|
49
|
+
require 'pulp_container_client/api/repositories_container_api'
|
|
50
|
+
require 'pulp_container_client/api/repositories_container_versions_api'
|
|
51
|
+
|
|
52
|
+
module PulpContainerClient
|
|
53
|
+
class << self
|
|
54
|
+
# Customize default settings for the SDK using block.
|
|
55
|
+
# PulpContainerClient.configure do |config|
|
|
56
|
+
# config.username = "xxx"
|
|
57
|
+
# config.password = "xxx"
|
|
58
|
+
# end
|
|
59
|
+
# If no block given, return the default Configuration object.
|
|
60
|
+
def configure
|
|
61
|
+
if block_given?
|
|
62
|
+
yield(Configuration.default)
|
|
63
|
+
else
|
|
64
|
+
Configuration.default
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
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.2.2-SNAPSHOT
|
|
12
|
+
|
|
13
|
+
=end
|
|
14
|
+
|
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
|
16
|
+
require "pulp_container_client/version"
|
|
17
|
+
|
|
18
|
+
Gem::Specification.new do |s|
|
|
19
|
+
s.name = "pulp_container_client"
|
|
20
|
+
s.version = PulpContainerClient::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 = 'GPL-2.0'
|
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
|
29
|
+
|
|
30
|
+
s.add_runtime_dependency 'faraday', '>= 0.14.0'
|
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
|
32
|
+
|
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
|
34
|
+
|
|
35
|
+
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
36
|
+
s.test_files = `find spec/*`.split("\n")
|
|
37
|
+
s.executables = []
|
|
38
|
+
s.require_paths = ["lib"]
|
|
39
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
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.2.2-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for PulpContainerClient::ContentBlobsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'ContentBlobsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = PulpContainerClient::ContentBlobsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of ContentBlobsApi' do
|
|
30
|
+
it 'should create an instance of ContentBlobsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(PulpContainerClient::ContentBlobsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for list
|
|
36
|
+
# List blobs
|
|
37
|
+
# ViewSet for Blobs.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :digest Filter results where digest matches value
|
|
40
|
+
# @option opts [String] :digest__in Filter results where digest is in a comma-separated list of values
|
|
41
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
|
42
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
|
43
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
|
44
|
+
# @option opts [String] :media_type
|
|
45
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
|
46
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
|
47
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
48
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
49
|
+
# @return [InlineResponse200]
|
|
50
|
+
describe 'list test' do
|
|
51
|
+
it 'should work' do
|
|
52
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# unit tests for read
|
|
57
|
+
# Inspect a blob
|
|
58
|
+
# ViewSet for Blobs.
|
|
59
|
+
# @param blob_href URI of Blob. e.g.: /pulp/api/v3/content/container/blobs/1/
|
|
60
|
+
# @param [Hash] opts the optional parameters
|
|
61
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
|
62
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
|
63
|
+
# @return [ContainerBlob]
|
|
64
|
+
describe 'read test' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
end
|