zest 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/zest/version.rb +1 -1
  4. data/spec/api/pulp_api_spec.rb +3 -3
  5. data/spec/api_client_spec.rb +29 -29
  6. data/spec/configuration_spec.rb +3 -3
  7. data/spec/models/artifact_spec.rb +3 -3
  8. data/spec/models/async_operation_response_spec.rb +3 -3
  9. data/spec/models/distribution_spec.rb +3 -3
  10. data/spec/models/file_content_spec.rb +3 -3
  11. data/spec/models/file_publisher_spec.rb +3 -3
  12. data/spec/models/file_remote_spec.rb +3 -3
  13. data/spec/models/inline_response_200_10_spec.rb +3 -3
  14. data/spec/models/inline_response_200_1_spec.rb +3 -3
  15. data/spec/models/inline_response_200_2_spec.rb +3 -3
  16. data/spec/models/inline_response_200_3_spec.rb +3 -3
  17. data/spec/models/inline_response_200_4_spec.rb +3 -3
  18. data/spec/models/inline_response_200_5_spec.rb +3 -3
  19. data/spec/models/inline_response_200_6_spec.rb +3 -3
  20. data/spec/models/inline_response_200_7_spec.rb +3 -3
  21. data/spec/models/inline_response_200_8_spec.rb +3 -3
  22. data/spec/models/inline_response_200_9_spec.rb +3 -3
  23. data/spec/models/inline_response_200_spec.rb +3 -3
  24. data/spec/models/progress_report_spec.rb +3 -3
  25. data/spec/models/publication_spec.rb +3 -3
  26. data/spec/models/repository_publish_url_spec.rb +3 -3
  27. data/spec/models/repository_spec.rb +3 -3
  28. data/spec/models/repository_sync_url_spec.rb +3 -3
  29. data/spec/models/repository_version_create_spec.rb +3 -3
  30. data/spec/models/repository_version_spec.rb +3 -3
  31. data/spec/models/task_spec.rb +3 -3
  32. data/spec/models/user_spec.rb +3 -3
  33. data/spec/models/worker_spec.rb +3 -3
  34. data/spec/spec_helper.rb +1 -1
  35. data/zest.gemspec +3 -4
  36. metadata +6 -44
  37. data/api.json +0 -1
  38. data/config.json +0 -6
  39. data/katello_pulp_api-0.0.1.gem +0 -0
  40. data/katello_pulp_api.gemspec +0 -46
  41. data/lib/katello_pulp_api.rb +0 -67
  42. data/lib/katello_pulp_api/api/pulp_api.rb +0 -3277
  43. data/lib/katello_pulp_api/api_client.rb +0 -389
  44. data/lib/katello_pulp_api/api_error.rb +0 -38
  45. data/lib/katello_pulp_api/configuration.rb +0 -209
  46. data/lib/katello_pulp_api/models/artifact.rb +0 -278
  47. data/lib/katello_pulp_api/models/async_operation_response.rb +0 -194
  48. data/lib/katello_pulp_api/models/distribution.rb +0 -350
  49. data/lib/katello_pulp_api/models/file_content.rb +0 -272
  50. data/lib/katello_pulp_api/models/file_publisher.rb +0 -306
  51. data/lib/katello_pulp_api/models/file_remote.rb +0 -452
  52. data/lib/katello_pulp_api/models/inline_response_200.rb +0 -227
  53. data/lib/katello_pulp_api/models/inline_response_200_1.rb +0 -227
  54. data/lib/katello_pulp_api/models/inline_response_200_10.rb +0 -227
  55. data/lib/katello_pulp_api/models/inline_response_200_2.rb +0 -227
  56. data/lib/katello_pulp_api/models/inline_response_200_3.rb +0 -227
  57. data/lib/katello_pulp_api/models/inline_response_200_4.rb +0 -227
  58. data/lib/katello_pulp_api/models/inline_response_200_5.rb +0 -227
  59. data/lib/katello_pulp_api/models/inline_response_200_6.rb +0 -227
  60. data/lib/katello_pulp_api/models/inline_response_200_7.rb +0 -227
  61. data/lib/katello_pulp_api/models/inline_response_200_8.rb +0 -227
  62. data/lib/katello_pulp_api/models/inline_response_200_9.rb +0 -227
  63. data/lib/katello_pulp_api/models/progress_report.rb +0 -271
  64. data/lib/katello_pulp_api/models/publication.rb +0 -249
  65. data/lib/katello_pulp_api/models/repository.rb +0 -260
  66. data/lib/katello_pulp_api/models/repository_publish_url.rb +0 -199
  67. data/lib/katello_pulp_api/models/repository_sync_url.rb +0 -206
  68. data/lib/katello_pulp_api/models/repository_version.rb +0 -277
  69. data/lib/katello_pulp_api/models/repository_version_create.rb +0 -223
  70. data/lib/katello_pulp_api/models/task.rb +0 -363
  71. data/lib/katello_pulp_api/models/user.rb +0 -284
  72. data/lib/katello_pulp_api/models/worker.rb +0 -254
  73. data/lib/katello_pulp_api/version.rb +0 -15
@@ -1,284 +0,0 @@
1
- =begin
2
- #Pulp3 API
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: v3
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module KatelloPulpApi
16
-
17
- class User
18
- attr_accessor :_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :_created
22
-
23
- # Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.
24
- attr_accessor :username
25
-
26
- # Password
27
- attr_accessor :password
28
-
29
-
30
- # Attribute mapping from ruby-style variable name to JSON key.
31
- def self.attribute_map
32
- {
33
- :'_href' => :'_href',
34
- :'_created' => :'_created',
35
- :'username' => :'username',
36
- :'password' => :'password'
37
- }
38
- end
39
-
40
- # Attribute type mapping.
41
- def self.swagger_types
42
- {
43
- :'_href' => :'String',
44
- :'_created' => :'DateTime',
45
- :'username' => :'String',
46
- :'password' => :'String'
47
- }
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- return unless attributes.is_a?(Hash)
54
-
55
- # convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
-
58
- if attributes.has_key?(:'_href')
59
- self._href = attributes[:'_href']
60
- end
61
-
62
- if attributes.has_key?(:'_created')
63
- self._created = attributes[:'_created']
64
- end
65
-
66
- if attributes.has_key?(:'username')
67
- self.username = attributes[:'username']
68
- end
69
-
70
- if attributes.has_key?(:'password')
71
- self.password = attributes[:'password']
72
- end
73
-
74
- end
75
-
76
- # Show invalid properties with the reasons. Usually used together with valid?
77
- # @return Array for valid properties with the reasons
78
- def list_invalid_properties
79
- invalid_properties = Array.new
80
- if @username.nil?
81
- invalid_properties.push("invalid value for 'username', username cannot be nil.")
82
- end
83
-
84
- if @username.to_s.length > 150
85
- invalid_properties.push("invalid value for 'username', the character length must be smaller than or equal to 150.")
86
- end
87
-
88
- if @username.to_s.length < 1
89
- invalid_properties.push("invalid value for 'username', the character length must be great than or equal to 1.")
90
- end
91
-
92
- if @username !~ Regexp.new(/^[\\w.@+-]+$/)
93
- invalid_properties.push("invalid value for 'username', must conform to the pattern /^[\\w.@+-]+$/.")
94
- end
95
-
96
- if @password.nil?
97
- invalid_properties.push("invalid value for 'password', password cannot be nil.")
98
- end
99
-
100
- if @password.to_s.length < 1
101
- invalid_properties.push("invalid value for 'password', the character length must be great than or equal to 1.")
102
- end
103
-
104
- return invalid_properties
105
- end
106
-
107
- # Check to see if the all the properties in the model are valid
108
- # @return true if the model is valid
109
- def valid?
110
- return false if @username.nil?
111
- return false if @username.to_s.length > 150
112
- return false if @username.to_s.length < 1
113
- return false if @username !~ Regexp.new(/^[\\w.@+-]+$/)
114
- return false if @password.nil?
115
- return false if @password.to_s.length < 1
116
- return true
117
- end
118
-
119
- # Custom attribute writer method with validation
120
- # @param [Object] username Value to be assigned
121
- def username=(username)
122
- if username.nil?
123
- fail ArgumentError, "username cannot be nil"
124
- end
125
-
126
- if username.to_s.length > 150
127
- fail ArgumentError, "invalid value for 'username', the character length must be smaller than or equal to 150."
128
- end
129
-
130
- if username.to_s.length < 1
131
- fail ArgumentError, "invalid value for 'username', the character length must be great than or equal to 1."
132
- end
133
-
134
- if username !~ Regexp.new(/^[\\w.@+-]+$/)
135
- fail ArgumentError, "invalid value for 'username', must conform to the pattern /^[\\w.@+-]+$/."
136
- end
137
-
138
- @username = username
139
- end
140
-
141
- # Custom attribute writer method with validation
142
- # @param [Object] password Value to be assigned
143
- def password=(password)
144
- if password.nil?
145
- fail ArgumentError, "password cannot be nil"
146
- end
147
-
148
- if password.to_s.length < 1
149
- fail ArgumentError, "invalid value for 'password', the character length must be great than or equal to 1."
150
- end
151
-
152
- @password = password
153
- end
154
-
155
- # Checks equality by comparing each attribute.
156
- # @param [Object] Object to be compared
157
- def ==(o)
158
- return true if self.equal?(o)
159
- self.class == o.class &&
160
- _href == o._href &&
161
- _created == o._created &&
162
- username == o.username &&
163
- password == o.password
164
- end
165
-
166
- # @see the `==` method
167
- # @param [Object] Object to be compared
168
- def eql?(o)
169
- self == o
170
- end
171
-
172
- # Calculates hash code according to all attributes.
173
- # @return [Fixnum] Hash code
174
- def hash
175
- [_href, _created, username, password].hash
176
- end
177
-
178
- # Builds the object from hash
179
- # @param [Hash] attributes Model attributes in the form of hash
180
- # @return [Object] Returns the model itself
181
- def build_from_hash(attributes)
182
- return nil unless attributes.is_a?(Hash)
183
- self.class.swagger_types.each_pair do |key, type|
184
- if type =~ /\AArray<(.*)>/i
185
- # check to ensure the input is an array given that the the attribute
186
- # is documented as an array but the input is not
187
- if attributes[self.class.attribute_map[key]].is_a?(Array)
188
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
189
- end
190
- elsif !attributes[self.class.attribute_map[key]].nil?
191
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
192
- end # or else data not found in attributes(hash), not an issue as the data can be optional
193
- end
194
-
195
- self
196
- end
197
-
198
- # Deserializes the data based on type
199
- # @param string type Data type
200
- # @param string value Value to be deserialized
201
- # @return [Object] Deserialized data
202
- def _deserialize(type, value)
203
- case type.to_sym
204
- when :DateTime
205
- DateTime.parse(value)
206
- when :Date
207
- Date.parse(value)
208
- when :String
209
- value.to_s
210
- when :Integer
211
- value.to_i
212
- when :Float
213
- value.to_f
214
- when :BOOLEAN
215
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
- true
217
- else
218
- false
219
- end
220
- when :Object
221
- # generic object (usually a Hash), return directly
222
- value
223
- when /\AArray<(?<inner_type>.+)>\z/
224
- inner_type = Regexp.last_match[:inner_type]
225
- value.map { |v| _deserialize(inner_type, v) }
226
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
- k_type = Regexp.last_match[:k_type]
228
- v_type = Regexp.last_match[:v_type]
229
- {}.tap do |hash|
230
- value.each do |k, v|
231
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
- end
233
- end
234
- else # model
235
- temp_model = KatelloPulpApi.const_get(type).new
236
- temp_model.build_from_hash(value)
237
- end
238
- end
239
-
240
- # Returns the string representation of the object
241
- # @return [String] String presentation of the object
242
- def to_s
243
- to_hash.to_s
244
- end
245
-
246
- # to_body is an alias to to_hash (backward compatibility)
247
- # @return [Hash] Returns the object in the form of hash
248
- def to_body
249
- to_hash
250
- end
251
-
252
- # Returns the object in the form of hash
253
- # @return [Hash] Returns the object in the form of hash
254
- def to_hash
255
- hash = {}
256
- self.class.attribute_map.each_pair do |attr, param|
257
- value = self.send(attr)
258
- next if value.nil?
259
- hash[param] = _to_hash(value)
260
- end
261
- hash
262
- end
263
-
264
- # Outputs non-array value in the form of hash
265
- # For object, use to_hash. Otherwise, just return the value
266
- # @param [Object] value Any valid value
267
- # @return [Hash] Returns the value in the form of hash
268
- def _to_hash(value)
269
- if value.is_a?(Array)
270
- value.compact.map{ |v| _to_hash(v) }
271
- elsif value.is_a?(Hash)
272
- {}.tap do |hash|
273
- value.each { |k, v| hash[k] = _to_hash(v) }
274
- end
275
- elsif value.respond_to? :to_hash
276
- value.to_hash
277
- else
278
- value
279
- end
280
- end
281
-
282
- end
283
-
284
- end
@@ -1,254 +0,0 @@
1
- =begin
2
- #Pulp3 API
3
-
4
- #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
-
6
- OpenAPI spec version: v3
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module KatelloPulpApi
16
-
17
- class Worker
18
- attr_accessor :_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :_created
22
-
23
- # The name of the worker.
24
- attr_accessor :name
25
-
26
- # Timestamp of the last time the worker talked to the service.
27
- attr_accessor :last_heartbeat
28
-
29
- # True if the worker is considered online, otherwise False
30
- attr_accessor :online
31
-
32
- # True if the worker is considerd missing, otherwise False
33
- attr_accessor :missing
34
-
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
- :'name' => :'name',
42
- :'last_heartbeat' => :'last_heartbeat',
43
- :'online' => :'online',
44
- :'missing' => :'missing'
45
- }
46
- end
47
-
48
- # Attribute type mapping.
49
- def self.swagger_types
50
- {
51
- :'_href' => :'String',
52
- :'_created' => :'DateTime',
53
- :'name' => :'String',
54
- :'last_heartbeat' => :'DateTime',
55
- :'online' => :'BOOLEAN',
56
- :'missing' => :'BOOLEAN'
57
- }
58
- end
59
-
60
- # Initializes the object
61
- # @param [Hash] attributes Model attributes in the form of hash
62
- def initialize(attributes = {})
63
- return unless attributes.is_a?(Hash)
64
-
65
- # convert string to symbol for hash key
66
- attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
67
-
68
- if attributes.has_key?(:'_href')
69
- self._href = attributes[:'_href']
70
- end
71
-
72
- if attributes.has_key?(:'_created')
73
- self._created = attributes[:'_created']
74
- end
75
-
76
- if attributes.has_key?(:'name')
77
- self.name = attributes[:'name']
78
- end
79
-
80
- if attributes.has_key?(:'last_heartbeat')
81
- self.last_heartbeat = attributes[:'last_heartbeat']
82
- end
83
-
84
- if attributes.has_key?(:'online')
85
- self.online = attributes[:'online']
86
- end
87
-
88
- if attributes.has_key?(:'missing')
89
- self.missing = attributes[:'missing']
90
- end
91
-
92
- end
93
-
94
- # Show invalid properties with the reasons. Usually used together with valid?
95
- # @return Array for valid properties with the reasons
96
- def list_invalid_properties
97
- invalid_properties = Array.new
98
- if !@name.nil? && @name.to_s.length < 1
99
- invalid_properties.push("invalid value for 'name', the character length must be great than or equal to 1.")
100
- end
101
-
102
- return invalid_properties
103
- end
104
-
105
- # Check to see if the all the properties in the model are valid
106
- # @return true if the model is valid
107
- def valid?
108
- return false if !@name.nil? && @name.to_s.length < 1
109
- return true
110
- end
111
-
112
- # Custom attribute writer method with validation
113
- # @param [Object] name Value to be assigned
114
- def name=(name)
115
-
116
- if !name.nil? && name.to_s.length < 1
117
- fail ArgumentError, "invalid value for 'name', the character length must be great than or equal to 1."
118
- end
119
-
120
- @name = name
121
- end
122
-
123
- # Checks equality by comparing each attribute.
124
- # @param [Object] Object to be compared
125
- def ==(o)
126
- return true if self.equal?(o)
127
- self.class == o.class &&
128
- _href == o._href &&
129
- _created == o._created &&
130
- name == o.name &&
131
- last_heartbeat == o.last_heartbeat &&
132
- online == o.online &&
133
- missing == o.missing
134
- end
135
-
136
- # @see the `==` method
137
- # @param [Object] Object to be compared
138
- def eql?(o)
139
- self == o
140
- end
141
-
142
- # Calculates hash code according to all attributes.
143
- # @return [Fixnum] Hash code
144
- def hash
145
- [_href, _created, name, last_heartbeat, online, missing].hash
146
- end
147
-
148
- # Builds the object from hash
149
- # @param [Hash] attributes Model attributes in the form of hash
150
- # @return [Object] Returns the model itself
151
- def build_from_hash(attributes)
152
- return nil unless attributes.is_a?(Hash)
153
- self.class.swagger_types.each_pair do |key, type|
154
- if type =~ /\AArray<(.*)>/i
155
- # check to ensure the input is an array given that the the attribute
156
- # is documented as an array but the input is not
157
- if attributes[self.class.attribute_map[key]].is_a?(Array)
158
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
159
- end
160
- elsif !attributes[self.class.attribute_map[key]].nil?
161
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
- end # or else data not found in attributes(hash), not an issue as the data can be optional
163
- end
164
-
165
- self
166
- end
167
-
168
- # Deserializes the data based on type
169
- # @param string type Data type
170
- # @param string value Value to be deserialized
171
- # @return [Object] Deserialized data
172
- def _deserialize(type, value)
173
- case type.to_sym
174
- when :DateTime
175
- DateTime.parse(value)
176
- when :Date
177
- Date.parse(value)
178
- when :String
179
- value.to_s
180
- when :Integer
181
- value.to_i
182
- when :Float
183
- value.to_f
184
- when :BOOLEAN
185
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
- true
187
- else
188
- false
189
- end
190
- when :Object
191
- # generic object (usually a Hash), return directly
192
- value
193
- when /\AArray<(?<inner_type>.+)>\z/
194
- inner_type = Regexp.last_match[:inner_type]
195
- value.map { |v| _deserialize(inner_type, v) }
196
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
- k_type = Regexp.last_match[:k_type]
198
- v_type = Regexp.last_match[:v_type]
199
- {}.tap do |hash|
200
- value.each do |k, v|
201
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
- end
203
- end
204
- else # model
205
- temp_model = KatelloPulpApi.const_get(type).new
206
- temp_model.build_from_hash(value)
207
- end
208
- end
209
-
210
- # Returns the string representation of the object
211
- # @return [String] String presentation of the object
212
- def to_s
213
- to_hash.to_s
214
- end
215
-
216
- # to_body is an alias to to_hash (backward compatibility)
217
- # @return [Hash] Returns the object in the form of hash
218
- def to_body
219
- to_hash
220
- end
221
-
222
- # Returns the object in the form of hash
223
- # @return [Hash] Returns the object in the form of hash
224
- def to_hash
225
- hash = {}
226
- self.class.attribute_map.each_pair do |attr, param|
227
- value = self.send(attr)
228
- next if value.nil?
229
- hash[param] = _to_hash(value)
230
- end
231
- hash
232
- end
233
-
234
- # Outputs non-array value in the form of hash
235
- # For object, use to_hash. Otherwise, just return the value
236
- # @param [Object] value Any valid value
237
- # @return [Hash] Returns the value in the form of hash
238
- def _to_hash(value)
239
- if value.is_a?(Array)
240
- value.compact.map{ |v| _to_hash(v) }
241
- elsif value.is_a?(Hash)
242
- {}.tap do |hash|
243
- value.each { |k, v| hash[k] = _to_hash(v) }
244
- end
245
- elsif value.respond_to? :to_hash
246
- value.to_hash
247
- else
248
- value
249
- end
250
- end
251
-
252
- end
253
-
254
- end