autosde_openapi_client 1.0.44 → 1.0.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +58 -46
  3. data/docs/AbstractCapabilityApi.md +4 -4
  4. data/docs/AccountApi.md +2 -2
  5. data/docs/AddressApi.md +2 -2
  6. data/docs/AutoSDEProjectApi.md +4 -4
  7. data/docs/AutoSDERoleApi.md +4 -4
  8. data/docs/CapabilityTranslationApi.md +2 -2
  9. data/docs/HostApi.md +2 -2
  10. data/docs/HostCluster.md +32 -0
  11. data/docs/HostClusterApi.md +276 -0
  12. data/docs/HostClusterCreate.md +28 -0
  13. data/docs/HostClusterMembership.md +24 -0
  14. data/docs/HostClusterMembershipApi.md +276 -0
  15. data/docs/HostVolumeConnectionApi.md +2 -2
  16. data/docs/NativeCapabilityApi.md +2 -2
  17. data/docs/ProfileApi.md +4 -4
  18. data/docs/ProvisioningStrategyApi.md +2 -2
  19. data/docs/ServiceApi.md +2 -2
  20. data/docs/ServiceResourceAttachmentApi.md +2 -2
  21. data/docs/SnapshotApi.md +2 -2
  22. data/docs/StorageResourceApi.md +2 -2
  23. data/docs/StorageSystemApi.md +8 -8
  24. data/docs/StorageSystemUpdate.md +24 -0
  25. data/docs/SystemTypeApi.md +2 -2
  26. data/docs/VolumeApi.md +2 -2
  27. data/docs/VolumeSafeDeleteApi.md +2 -2
  28. data/lib/autosde_openapi_client/api/abstract_capability_api.rb +4 -4
  29. data/lib/autosde_openapi_client/api/account_api.rb +2 -2
  30. data/lib/autosde_openapi_client/api/address_api.rb +2 -2
  31. data/lib/autosde_openapi_client/api/auto_sde_project_api.rb +4 -4
  32. data/lib/autosde_openapi_client/api/auto_sde_role_api.rb +4 -4
  33. data/lib/autosde_openapi_client/api/capability_translation_api.rb +2 -2
  34. data/lib/autosde_openapi_client/api/host_api.rb +2 -2
  35. data/lib/autosde_openapi_client/api/host_cluster_api.rb +254 -0
  36. data/lib/autosde_openapi_client/api/host_cluster_membership_api.rb +254 -0
  37. data/lib/autosde_openapi_client/api/host_volume_connection_api.rb +2 -2
  38. data/lib/autosde_openapi_client/api/native_capability_api.rb +2 -2
  39. data/lib/autosde_openapi_client/api/profile_api.rb +4 -4
  40. data/lib/autosde_openapi_client/api/provisioning_strategy_api.rb +2 -2
  41. data/lib/autosde_openapi_client/api/service_api.rb +2 -2
  42. data/lib/autosde_openapi_client/api/service_resource_attachment_api.rb +2 -2
  43. data/lib/autosde_openapi_client/api/snapshot_api.rb +2 -2
  44. data/lib/autosde_openapi_client/api/storage_resource_api.rb +2 -2
  45. data/lib/autosde_openapi_client/api/storage_system_api.rb +11 -11
  46. data/lib/autosde_openapi_client/api/system_type_api.rb +2 -2
  47. data/lib/autosde_openapi_client/api/volume_api.rb +2 -2
  48. data/lib/autosde_openapi_client/api/volume_safe_delete_api.rb +2 -2
  49. data/lib/autosde_openapi_client/models/abstract_capability.rb +1 -1
  50. data/lib/autosde_openapi_client/models/host_cluster.rb +388 -0
  51. data/lib/autosde_openapi_client/models/host_cluster_create.rb +329 -0
  52. data/lib/autosde_openapi_client/models/host_cluster_membership.rb +287 -0
  53. data/lib/autosde_openapi_client/models/storage_system_update.rb +265 -0
  54. data/lib/autosde_openapi_client/version.rb +2 -2
  55. data/lib/autosde_openapi_client.rb +6 -0
  56. data/spec/api/host_cluster_api_spec.rb +74 -0
  57. data/spec/api/host_cluster_membership_api_spec.rb +74 -0
  58. data/spec/api/storage_system_api_spec.rb +1 -1
  59. data/spec/models/host_cluster_create_spec.rb +64 -0
  60. data/spec/models/host_cluster_membership_spec.rb +56 -0
  61. data/spec/models/host_cluster_spec.rb +80 -0
  62. data/spec/models/storage_system_update_spec.rb +52 -0
  63. metadata +81 -57
@@ -33,7 +33,7 @@ module AutosdeOpenapiClient
33
33
  @api_client.config.logger.debug 'Calling API: SystemTypeApi.system_types_get ...'
34
34
  end
35
35
  # resource path
36
- local_var_path = '/system-types/'
36
+ local_var_path = '/system-types'
37
37
 
38
38
  # query parameters
39
39
  query_params = opts[:query_params] || {}
@@ -210,7 +210,7 @@ module AutosdeOpenapiClient
210
210
  fail ArgumentError, "Missing the required parameter 'system_type_create' when calling SystemTypeApi.system_types_post"
211
211
  end
212
212
  # resource path
213
- local_var_path = '/system-types/'
213
+ local_var_path = '/system-types'
214
214
 
215
215
  # query parameters
216
216
  query_params = opts[:query_params] || {}
@@ -33,7 +33,7 @@ module AutosdeOpenapiClient
33
33
  @api_client.config.logger.debug 'Calling API: VolumeApi.volumes_get ...'
34
34
  end
35
35
  # resource path
36
- local_var_path = '/volumes/'
36
+ local_var_path = '/volumes'
37
37
 
38
38
  # query parameters
39
39
  query_params = opts[:query_params] || {}
@@ -277,7 +277,7 @@ module AutosdeOpenapiClient
277
277
  fail ArgumentError, "Missing the required parameter 'volume_create' when calling VolumeApi.volumes_post"
278
278
  end
279
279
  # resource path
280
- local_var_path = '/volumes/'
280
+ local_var_path = '/volumes'
281
281
 
282
282
  # query parameters
283
283
  query_params = opts[:query_params] || {}
@@ -33,7 +33,7 @@ module AutosdeOpenapiClient
33
33
  @api_client.config.logger.debug 'Calling API: VolumeSafeDeleteApi.safe_deletes_get ...'
34
34
  end
35
35
  # resource path
36
- local_var_path = '/safe-deletes/'
36
+ local_var_path = '/safe-deletes'
37
37
 
38
38
  # query parameters
39
39
  query_params = opts[:query_params] || {}
@@ -210,7 +210,7 @@ module AutosdeOpenapiClient
210
210
  fail ArgumentError, "Missing the required parameter 'volume_safe_delete_create' when calling VolumeSafeDeleteApi.safe_deletes_post"
211
211
  end
212
212
  # resource path
213
- local_var_path = '/safe-deletes/'
213
+ local_var_path = '/safe-deletes'
214
214
 
215
215
  # query parameters
216
216
  query_params = opts[:query_params] || {}
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module AutosdeOpenapiClient
17
- # Bk-Abstract capabilities are the storage system feature capabilities, in general terminology.
17
+ # Abstract capabilities are the storage system feature capabilities, in general terminology.
18
18
  class AbstractCapability
19
19
  # name
20
20
  attr_accessor :name
@@ -0,0 +1,388 @@
1
+ =begin
2
+ #Site Manager API
3
+
4
+ #Site Manager API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: autosde@il.ibm.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AutosdeOpenapiClient
17
+ # HostCluster
18
+ class HostCluster
19
+ # component_state
20
+ attr_accessor :component_state
21
+
22
+ # name
23
+ attr_accessor :name
24
+
25
+ # owner_id
26
+ attr_accessor :owner_id
27
+
28
+ # owner_name
29
+ attr_accessor :owner_name
30
+
31
+ # protocol
32
+ attr_accessor :protocol
33
+
34
+ # status
35
+ attr_accessor :status
36
+
37
+ attr_accessor :storage_system
38
+
39
+ # uuid
40
+ attr_accessor :uuid
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'component_state' => :'component_state',
68
+ :'name' => :'name',
69
+ :'owner_id' => :'owner_id',
70
+ :'owner_name' => :'owner_name',
71
+ :'protocol' => :'protocol',
72
+ :'status' => :'status',
73
+ :'storage_system' => :'storage_system',
74
+ :'uuid' => :'uuid'
75
+ }
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'component_state' => :'String',
87
+ :'name' => :'String',
88
+ :'owner_id' => :'String',
89
+ :'owner_name' => :'String',
90
+ :'protocol' => :'String',
91
+ :'status' => :'String',
92
+ :'storage_system' => :'StorageSystem',
93
+ :'uuid' => :'String'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::HostCluster` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!self.class.attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::HostCluster`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'component_state')
119
+ self.component_state = attributes[:'component_state']
120
+ end
121
+
122
+ if attributes.key?(:'name')
123
+ self.name = attributes[:'name']
124
+ end
125
+
126
+ if attributes.key?(:'owner_id')
127
+ self.owner_id = attributes[:'owner_id']
128
+ end
129
+
130
+ if attributes.key?(:'owner_name')
131
+ self.owner_name = attributes[:'owner_name']
132
+ end
133
+
134
+ if attributes.key?(:'protocol')
135
+ self.protocol = attributes[:'protocol']
136
+ end
137
+
138
+ if attributes.key?(:'status')
139
+ self.status = attributes[:'status']
140
+ end
141
+
142
+ if attributes.key?(:'storage_system')
143
+ self.storage_system = attributes[:'storage_system']
144
+ end
145
+
146
+ if attributes.key?(:'uuid')
147
+ self.uuid = attributes[:'uuid']
148
+ end
149
+ end
150
+
151
+ # Show invalid properties with the reasons. Usually used together with valid?
152
+ # @return Array for valid properties with the reasons
153
+ def list_invalid_properties
154
+ invalid_properties = Array.new
155
+ if !@component_state.nil? && @component_state.to_s.length > 32
156
+ invalid_properties.push('invalid value for "component_state", the character length must be smaller than or equal to 32.')
157
+ end
158
+
159
+ if !@name.nil? && @name.to_s.length > 15
160
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 15.')
161
+ end
162
+
163
+ if !@owner_id.nil? && @owner_id.to_s.length > 15
164
+ invalid_properties.push('invalid value for "owner_id", the character length must be smaller than or equal to 15.')
165
+ end
166
+
167
+ if !@owner_name.nil? && @owner_name.to_s.length > 15
168
+ invalid_properties.push('invalid value for "owner_name", the character length must be smaller than or equal to 15.')
169
+ end
170
+
171
+ if !@protocol.nil? && @protocol.to_s.length > 15
172
+ invalid_properties.push('invalid value for "protocol", the character length must be smaller than or equal to 15.')
173
+ end
174
+
175
+ invalid_properties
176
+ end
177
+
178
+ # Check to see if the all the properties in the model are valid
179
+ # @return true if the model is valid
180
+ def valid?
181
+ component_state_validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
182
+ return false unless component_state_validator.valid?(@component_state)
183
+ return false if !@component_state.nil? && @component_state.to_s.length > 32
184
+ return false if !@name.nil? && @name.to_s.length > 15
185
+ return false if !@owner_id.nil? && @owner_id.to_s.length > 15
186
+ return false if !@owner_name.nil? && @owner_name.to_s.length > 15
187
+ return false if !@protocol.nil? && @protocol.to_s.length > 15
188
+ true
189
+ end
190
+
191
+ # Custom attribute writer method checking allowed values (enum).
192
+ # @param [Object] component_state Object to be assigned
193
+ def component_state=(component_state)
194
+ validator = EnumAttributeValidator.new('String', ["PENDING_CREATION", "CREATED", "DELETED", "PENDING_DELETION", "MODIFICATION", "PENDING_MODIFICATION"])
195
+ unless validator.valid?(component_state)
196
+ fail ArgumentError, "invalid value for \"component_state\", must be one of #{validator.allowable_values}."
197
+ end
198
+ @component_state = component_state
199
+ end
200
+
201
+ # Custom attribute writer method with validation
202
+ # @param [Object] name Value to be assigned
203
+ def name=(name)
204
+ if !name.nil? && name.to_s.length > 15
205
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 15.'
206
+ end
207
+
208
+ @name = name
209
+ end
210
+
211
+ # Custom attribute writer method with validation
212
+ # @param [Object] owner_id Value to be assigned
213
+ def owner_id=(owner_id)
214
+ if !owner_id.nil? && owner_id.to_s.length > 15
215
+ fail ArgumentError, 'invalid value for "owner_id", the character length must be smaller than or equal to 15.'
216
+ end
217
+
218
+ @owner_id = owner_id
219
+ end
220
+
221
+ # Custom attribute writer method with validation
222
+ # @param [Object] owner_name Value to be assigned
223
+ def owner_name=(owner_name)
224
+ if !owner_name.nil? && owner_name.to_s.length > 15
225
+ fail ArgumentError, 'invalid value for "owner_name", the character length must be smaller than or equal to 15.'
226
+ end
227
+
228
+ @owner_name = owner_name
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] protocol Value to be assigned
233
+ def protocol=(protocol)
234
+ if !protocol.nil? && protocol.to_s.length > 15
235
+ fail ArgumentError, 'invalid value for "protocol", the character length must be smaller than or equal to 15.'
236
+ end
237
+
238
+ @protocol = protocol
239
+ end
240
+
241
+ # Checks equality by comparing each attribute.
242
+ # @param [Object] Object to be compared
243
+ def ==(o)
244
+ return true if self.equal?(o)
245
+ self.class == o.class &&
246
+ component_state == o.component_state &&
247
+ name == o.name &&
248
+ owner_id == o.owner_id &&
249
+ owner_name == o.owner_name &&
250
+ protocol == o.protocol &&
251
+ status == o.status &&
252
+ storage_system == o.storage_system &&
253
+ uuid == o.uuid
254
+ end
255
+
256
+ # @see the `==` method
257
+ # @param [Object] Object to be compared
258
+ def eql?(o)
259
+ self == o
260
+ end
261
+
262
+ # Calculates hash code according to all attributes.
263
+ # @return [Integer] Hash code
264
+ def hash
265
+ [component_state, name, owner_id, owner_name, protocol, status, storage_system, uuid].hash
266
+ end
267
+
268
+ # Builds the object from hash
269
+ # @param [Hash] attributes Model attributes in the form of hash
270
+ # @return [Object] Returns the model itself
271
+ def self.build_from_hash(attributes)
272
+ new.build_from_hash(attributes)
273
+ end
274
+
275
+ # Builds the object from hash
276
+ # @param [Hash] attributes Model attributes in the form of hash
277
+ # @return [Object] Returns the model itself
278
+ def build_from_hash(attributes)
279
+ return nil unless attributes.is_a?(Hash)
280
+ self.class.openapi_types.each_pair do |key, type|
281
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
282
+ self.send("#{key}=", nil)
283
+ elsif type =~ /\AArray<(.*)>/i
284
+ # check to ensure the input is an array given that the attribute
285
+ # is documented as an array but the input is not
286
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
287
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
288
+ end
289
+ elsif !attributes[self.class.attribute_map[key]].nil?
290
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
291
+ end
292
+ end
293
+
294
+ self
295
+ end
296
+
297
+ # Deserializes the data based on type
298
+ # @param string type Data type
299
+ # @param string value Value to be deserialized
300
+ # @return [Object] Deserialized data
301
+ def _deserialize(type, value)
302
+ case type.to_sym
303
+ when :Time
304
+ Time.parse(value)
305
+ when :Date
306
+ Date.parse(value)
307
+ when :String
308
+ value.to_s
309
+ when :Integer
310
+ value.to_i
311
+ when :Float
312
+ value.to_f
313
+ when :Boolean
314
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
315
+ true
316
+ else
317
+ false
318
+ end
319
+ when :Object
320
+ # generic object (usually a Hash), return directly
321
+ value
322
+ when /\AArray<(?<inner_type>.+)>\z/
323
+ inner_type = Regexp.last_match[:inner_type]
324
+ value.map { |v| _deserialize(inner_type, v) }
325
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
326
+ k_type = Regexp.last_match[:k_type]
327
+ v_type = Regexp.last_match[:v_type]
328
+ {}.tap do |hash|
329
+ value.each do |k, v|
330
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
331
+ end
332
+ end
333
+ else # model
334
+ # models (e.g. Pet) or oneOf
335
+ klass = AutosdeOpenapiClient.const_get(type)
336
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
337
+ end
338
+ end
339
+
340
+ # Returns the string representation of the object
341
+ # @return [String] String presentation of the object
342
+ def to_s
343
+ to_hash.to_s
344
+ end
345
+
346
+ # to_body is an alias to to_hash (backward compatibility)
347
+ # @return [Hash] Returns the object in the form of hash
348
+ def to_body
349
+ to_hash
350
+ end
351
+
352
+ # Returns the object in the form of hash
353
+ # @return [Hash] Returns the object in the form of hash
354
+ def to_hash
355
+ hash = {}
356
+ self.class.attribute_map.each_pair do |attr, param|
357
+ value = self.send(attr)
358
+ if value.nil?
359
+ is_nullable = self.class.openapi_nullable.include?(attr)
360
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
361
+ end
362
+
363
+ hash[param] = _to_hash(value)
364
+ end
365
+ hash
366
+ end
367
+
368
+ # Outputs non-array value in the form of hash
369
+ # For object, use to_hash. Otherwise, just return the value
370
+ # @param [Object] value Any valid value
371
+ # @return [Hash] Returns the value in the form of hash
372
+ def _to_hash(value)
373
+ if value.is_a?(Array)
374
+ value.compact.map { |v| _to_hash(v) }
375
+ elsif value.is_a?(Hash)
376
+ {}.tap do |hash|
377
+ value.each { |k, v| hash[k] = _to_hash(v) }
378
+ end
379
+ elsif value.respond_to? :to_hash
380
+ value.to_hash
381
+ else
382
+ value
383
+ end
384
+ end
385
+
386
+ end
387
+
388
+ end