ruby-linstor-client 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/codegen.sh +1 -1
  4. data/generator/custom/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume.rb +1 -1
  5. data/generator/custom/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume_cache_volume.rb +11 -0
  6. data/lib/ruby-linstor-client/api/developers_api.rb +923 -103
  7. data/lib/ruby-linstor-client/api_client.rb +2 -2
  8. data/lib/ruby-linstor-client/api_error.rb +2 -2
  9. data/lib/ruby-linstor-client/configuration.rb +2 -2
  10. data/lib/ruby-linstor-client/models/api_call_rc.rb +2 -2
  11. data/lib/ruby-linstor-client/models/auto_place_request.rb +2 -2
  12. data/lib/ruby-linstor-client/models/auto_select_filter.rb +25 -3
  13. data/lib/ruby-linstor-client/models/cache_resource.rb +220 -0
  14. data/lib/ruby-linstor-client/models/cache_volume.rb +276 -0
  15. data/lib/ruby-linstor-client/models/candidate.rb +2 -2
  16. data/lib/ruby-linstor-client/models/controller_config.rb +272 -0
  17. data/lib/ruby-linstor-client/models/controller_config_config.rb +218 -0
  18. data/lib/ruby-linstor-client/models/controller_config_db.rb +263 -0
  19. data/lib/ruby-linstor-client/models/controller_config_db_etcd.rb +227 -0
  20. data/lib/ruby-linstor-client/models/controller_config_debug.rb +218 -0
  21. data/lib/ruby-linstor-client/models/controller_config_http.rb +236 -0
  22. data/lib/ruby-linstor-client/models/controller_config_https.rb +236 -0
  23. data/lib/ruby-linstor-client/models/controller_config_ldap.rb +263 -0
  24. data/lib/ruby-linstor-client/models/controller_config_log.rb +315 -0
  25. data/lib/ruby-linstor-client/models/controller_props_modify.rb +2 -2
  26. data/lib/ruby-linstor-client/models/controller_version.rb +2 -2
  27. data/lib/ruby-linstor-client/models/drbd_connection.rb +262 -0
  28. data/lib/ruby-linstor-client/models/drbd_proxy_enable.rb +2 -2
  29. data/lib/ruby-linstor-client/models/drbd_proxy_modify.rb +2 -2
  30. data/lib/ruby-linstor-client/models/drbd_resource.rb +35 -6
  31. data/lib/ruby-linstor-client/models/drbd_resource_definition_layer.rb +2 -2
  32. data/lib/ruby-linstor-client/models/drbd_volume.rb +2 -2
  33. data/lib/ruby-linstor-client/models/drbd_volume_definition.rb +2 -2
  34. data/lib/ruby-linstor-client/models/error_report.rb +87 -7
  35. data/lib/ruby-linstor-client/models/error_report_delete.rb +273 -0
  36. data/lib/ruby-linstor-client/models/event_may_promote_change.rb +237 -0
  37. data/lib/ruby-linstor-client/models/key_value_store.rb +2 -2
  38. data/lib/ruby-linstor-client/models/key_value_store_modify.rb +2 -2
  39. data/lib/ruby-linstor-client/models/layer_type.rb +4 -2
  40. data/lib/ruby-linstor-client/models/log_level.rb +40 -0
  41. data/lib/ruby-linstor-client/models/luks_resource.rb +2 -2
  42. data/lib/ruby-linstor-client/models/luks_volume.rb +2 -2
  43. data/lib/ruby-linstor-client/models/max_volume_sizes.rb +2 -2
  44. data/lib/ruby-linstor-client/models/net_interface.rb +2 -2
  45. data/lib/ruby-linstor-client/models/node.rb +4 -4
  46. data/lib/ruby-linstor-client/models/node_modify.rb +2 -2
  47. data/lib/ruby-linstor-client/models/nvme_resource.rb +2 -2
  48. data/lib/ruby-linstor-client/models/nvme_volume.rb +2 -2
  49. data/lib/ruby-linstor-client/models/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume.rb +1 -1
  50. data/lib/ruby-linstor-client/models/one_of_drbd_volume_luks_volume_storage_nvme_volme_writecache_volume_cache_volume.rb +11 -0
  51. data/lib/ruby-linstor-client/models/openflex_resource.rb +229 -0
  52. data/lib/ruby-linstor-client/models/openflex_resource_definition_layer.rb +227 -0
  53. data/lib/ruby-linstor-client/models/openflex_volume.rb +256 -0
  54. data/lib/ruby-linstor-client/models/pass_phrase_create.rb +2 -2
  55. data/lib/ruby-linstor-client/models/physical_storage.rb +2 -2
  56. data/lib/ruby-linstor-client/models/physical_storage_create.rb +2 -2
  57. data/lib/ruby-linstor-client/models/physical_storage_device.rb +2 -2
  58. data/lib/ruby-linstor-client/models/physical_storage_storage_pool_create.rb +2 -2
  59. data/lib/ruby-linstor-client/models/provider_kind.rb +3 -2
  60. data/lib/ruby-linstor-client/models/resource.rb +16 -6
  61. data/lib/ruby-linstor-client/models/resource_connection.rb +2 -2
  62. data/lib/ruby-linstor-client/models/resource_connection_modify.rb +2 -2
  63. data/lib/ruby-linstor-client/models/resource_create.rb +2 -2
  64. data/lib/ruby-linstor-client/models/resource_definition.rb +2 -2
  65. data/lib/ruby-linstor-client/models/resource_definition_create.rb +2 -2
  66. data/lib/ruby-linstor-client/models/resource_definition_layer.rb +3 -3
  67. data/lib/ruby-linstor-client/models/resource_definition_modify.rb +16 -6
  68. data/lib/ruby-linstor-client/models/resource_group.rb +2 -2
  69. data/lib/ruby-linstor-client/models/resource_group_modify.rb +2 -2
  70. data/lib/ruby-linstor-client/models/resource_group_spawn.rb +22 -3
  71. data/lib/ruby-linstor-client/models/resource_layer.rb +24 -6
  72. data/lib/ruby-linstor-client/models/resource_modify.rb +2 -2
  73. data/lib/ruby-linstor-client/models/resource_state.rb +2 -2
  74. data/lib/ruby-linstor-client/models/resource_with_volumes.rb +13 -3
  75. data/lib/ruby-linstor-client/models/resource_with_volumes_all_of.rb +2 -2
  76. data/lib/ruby-linstor-client/models/satellite_config.rb +272 -0
  77. data/lib/ruby-linstor-client/models/satellite_config_log.rb +245 -0
  78. data/lib/ruby-linstor-client/models/satellite_config_net.rb +236 -0
  79. data/lib/ruby-linstor-client/models/snapshot.rb +17 -6
  80. data/lib/ruby-linstor-client/models/snapshot_node.rb +261 -0
  81. data/lib/ruby-linstor-client/models/snapshot_restore.rb +2 -2
  82. data/lib/ruby-linstor-client/models/snapshot_shipping.rb +259 -0
  83. data/lib/ruby-linstor-client/models/snapshot_shipping_status.rb +279 -0
  84. data/lib/ruby-linstor-client/models/snapshot_volume_definition.rb +2 -2
  85. data/lib/ruby-linstor-client/models/storage_pool.rb +2 -2
  86. data/lib/ruby-linstor-client/models/storage_pool_definition.rb +2 -2
  87. data/lib/ruby-linstor-client/models/storage_pool_definition_modify.rb +2 -2
  88. data/lib/ruby-linstor-client/models/storage_resource.rb +2 -2
  89. data/lib/ruby-linstor-client/models/storage_volume.rb +2 -2
  90. data/lib/ruby-linstor-client/models/volume.rb +2 -2
  91. data/lib/ruby-linstor-client/models/volume_definition.rb +2 -2
  92. data/lib/ruby-linstor-client/models/volume_definition_create.rb +2 -2
  93. data/lib/ruby-linstor-client/models/volume_definition_layer.rb +2 -2
  94. data/lib/ruby-linstor-client/models/volume_definition_modify.rb +2 -2
  95. data/lib/ruby-linstor-client/models/volume_group.rb +2 -2
  96. data/lib/ruby-linstor-client/models/volume_group_modify.rb +2 -2
  97. data/lib/ruby-linstor-client/models/volume_layer.rb +3 -3
  98. data/lib/ruby-linstor-client/models/volume_modify.rb +2 -2
  99. data/lib/ruby-linstor-client/models/volume_state.rb +2 -2
  100. data/lib/ruby-linstor-client/models/writecache_resource.rb +2 -2
  101. data/lib/ruby-linstor-client/models/writecache_volume.rb +2 -2
  102. data/lib/ruby-linstor-client/version.rb +3 -3
  103. data/lib/ruby-linstor-client.rb +26 -2
  104. data/pkg/ruby-linstor-client-1.0.0.gem +0 -0
  105. data/spec/api_client_spec.rb +2 -2
  106. data/spec/configuration_spec.rb +2 -2
  107. data/spec/models/cache_resource_spec.rb +34 -0
  108. data/spec/models/cache_volume_spec.rb +70 -0
  109. data/spec/models/controller_config_config_spec.rb +34 -0
  110. data/spec/models/controller_config_db_etcd_spec.rb +40 -0
  111. data/spec/models/controller_config_db_spec.rb +64 -0
  112. data/spec/models/controller_config_debug_spec.rb +34 -0
  113. data/spec/models/controller_config_http_spec.rb +46 -0
  114. data/spec/models/controller_config_https_spec.rb +46 -0
  115. data/spec/models/controller_config_ldap_spec.rb +64 -0
  116. data/spec/models/controller_config_log_spec.rb +80 -0
  117. data/spec/models/controller_config_spec.rb +70 -0
  118. data/spec/models/drbd_connection_spec.rb +44 -0
  119. data/spec/models/error_report_delete_spec.rb +64 -0
  120. data/spec/models/event_may_promote_change_spec.rb +46 -0
  121. data/spec/models/log_level_spec.rb +28 -0
  122. data/spec/models/openflex_resource_definition_layer_spec.rb +40 -0
  123. data/spec/models/openflex_resource_spec.rb +40 -0
  124. data/spec/models/openflex_volume_spec.rb +58 -0
  125. data/spec/models/satellite_config_log_spec.rb +52 -0
  126. data/spec/models/satellite_config_net_spec.rb +46 -0
  127. data/spec/models/satellite_config_spec.rb +70 -0
  128. data/spec/models/snapshot_node_spec.rb +58 -0
  129. data/spec/models/snapshot_shipping_spec.rb +52 -0
  130. data/spec/models/snapshot_shipping_status_spec.rb +56 -0
  131. data/spec/spec_helper.rb +2 -2
  132. metadata +77 -3
@@ -0,0 +1,315 @@
1
+ =begin
2
+ #Linstor REST API
3
+
4
+ #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.5.0 - Added etcd.prefix to ControllerConfigDbEtcd parameters * 1.4.0 - Added promotion_score and may_promote to DrbdResource object - Added /v1/error-reports DELETE method, to delete a range of error reports or single ones - Added SSE (Server Sent Events) url /v1/events/drbd/promotion * 1.3.0 - Added /v1/view/snapshot-shippings * 1.2.0 - Added optional AutoSelectFilter to resource-group/spawn - Added /v1/nodes/{node}/config, that allows you to get and set the satellite config - Added /v1/sos-report to create bug reports you can send to linbit - Added new fields to the ErrorReport object - Added /v1/resource-definitions/{resource}/snapshot-shipping - Allow to modify the resource group in Resource definitions - Added createTimestamp to Resource and Snapshot - Added default value (null) for AutoPlaceRequest's layer_list * 1.1.0 - Added /v1/view/snapshots for a faster all in one snapshot list - Filter lists by properties: - /v1/nodes - /v1/resource-definitions - /v1/resource-groups - /v1/view/storage-pools - /v1/view/resources * 1.0.16 - Added CacheResource and CacheVolume schemas - AutSelectFilter arrays are now null per default * 1.0.15 - Added connections map to the DRBD resource layer data - Added support for Openflex * 1.0.14 - Added /v1/controller/config, that gives you the controller config information * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
5
+
6
+ The version of the OpenAPI document: 1.5.0
7
+ Contact: rene.peinthor@linbit.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LinstorClient
17
+ class ControllerConfigLog
18
+ attr_accessor :print_stack_trace
19
+
20
+ attr_accessor :directory
21
+
22
+ attr_accessor :level
23
+
24
+ attr_accessor :level_global
25
+
26
+ attr_accessor :level_linstor
27
+
28
+ attr_accessor :level_linstor_global
29
+
30
+ attr_accessor :rest_access_log_path
31
+
32
+ attr_accessor :rest_access_mode
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'print_stack_trace' => :'print_stack_trace',
60
+ :'directory' => :'directory',
61
+ :'level' => :'level',
62
+ :'level_global' => :'level_global',
63
+ :'level_linstor' => :'level_linstor',
64
+ :'level_linstor_global' => :'level_linstor_global',
65
+ :'rest_access_log_path' => :'rest_access_log_path',
66
+ :'rest_access_mode' => :'rest_access_mode'
67
+ }
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'print_stack_trace' => :'Boolean',
79
+ :'directory' => :'String',
80
+ :'level' => :'LogLevel',
81
+ :'level_global' => :'LogLevel',
82
+ :'level_linstor' => :'LogLevel',
83
+ :'level_linstor_global' => :'LogLevel',
84
+ :'rest_access_log_path' => :'String',
85
+ :'rest_access_mode' => :'String'
86
+ }
87
+ end
88
+
89
+ # List of attributes with nullable: true
90
+ def self.openapi_nullable
91
+ Set.new([
92
+ ])
93
+ end
94
+
95
+ # Initializes the object
96
+ # @param [Hash] attributes Model attributes in the form of hash
97
+ def initialize(attributes = {})
98
+ if (!attributes.is_a?(Hash))
99
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LinstorClient::ControllerConfigLog` initialize method"
100
+ end
101
+
102
+ # check to see if the attribute exists and convert string to symbol for hash key
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!self.class.attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LinstorClient::ControllerConfigLog`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'print_stack_trace')
111
+ self.print_stack_trace = attributes[:'print_stack_trace']
112
+ end
113
+
114
+ if attributes.key?(:'directory')
115
+ self.directory = attributes[:'directory']
116
+ end
117
+
118
+ if attributes.key?(:'level')
119
+ self.level = attributes[:'level']
120
+ end
121
+
122
+ if attributes.key?(:'level_global')
123
+ self.level_global = attributes[:'level_global']
124
+ end
125
+
126
+ if attributes.key?(:'level_linstor')
127
+ self.level_linstor = attributes[:'level_linstor']
128
+ end
129
+
130
+ if attributes.key?(:'level_linstor_global')
131
+ self.level_linstor_global = attributes[:'level_linstor_global']
132
+ end
133
+
134
+ if attributes.key?(:'rest_access_log_path')
135
+ self.rest_access_log_path = attributes[:'rest_access_log_path']
136
+ end
137
+
138
+ if attributes.key?(:'rest_access_mode')
139
+ self.rest_access_mode = attributes[:'rest_access_mode']
140
+ end
141
+ end
142
+
143
+ # Show invalid properties with the reasons. Usually used together with valid?
144
+ # @return Array for valid properties with the reasons
145
+ def list_invalid_properties
146
+ invalid_properties = Array.new
147
+ invalid_properties
148
+ end
149
+
150
+ # Check to see if the all the properties in the model are valid
151
+ # @return true if the model is valid
152
+ def valid?
153
+ rest_access_mode_validator = EnumAttributeValidator.new('String', ["APPEND", "ROTATE_HOURLY", "ROTATE_DAILY", "NO_LOG"])
154
+ return false unless rest_access_mode_validator.valid?(@rest_access_mode)
155
+ true
156
+ end
157
+
158
+ # Custom attribute writer method checking allowed values (enum).
159
+ # @param [Object] rest_access_mode Object to be assigned
160
+ def rest_access_mode=(rest_access_mode)
161
+ validator = EnumAttributeValidator.new('String', ["APPEND", "ROTATE_HOURLY", "ROTATE_DAILY", "NO_LOG"])
162
+ unless validator.valid?(rest_access_mode)
163
+ fail ArgumentError, "invalid value for \"rest_access_mode\", must be one of #{validator.allowable_values}."
164
+ end
165
+ @rest_access_mode = rest_access_mode
166
+ end
167
+
168
+ # Checks equality by comparing each attribute.
169
+ # @param [Object] Object to be compared
170
+ def ==(o)
171
+ return true if self.equal?(o)
172
+ self.class == o.class &&
173
+ print_stack_trace == o.print_stack_trace &&
174
+ directory == o.directory &&
175
+ level == o.level &&
176
+ level_global == o.level_global &&
177
+ level_linstor == o.level_linstor &&
178
+ level_linstor_global == o.level_linstor_global &&
179
+ rest_access_log_path == o.rest_access_log_path &&
180
+ rest_access_mode == o.rest_access_mode
181
+ end
182
+
183
+ # @see the `==` method
184
+ # @param [Object] Object to be compared
185
+ def eql?(o)
186
+ self == o
187
+ end
188
+
189
+ # Calculates hash code according to all attributes.
190
+ # @return [Integer] Hash code
191
+ def hash
192
+ [print_stack_trace, directory, level, level_global, level_linstor, level_linstor_global, rest_access_log_path, rest_access_mode].hash
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def self.build_from_hash(attributes)
199
+ new.build_from_hash(attributes)
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ self.class.openapi_types.each_pair do |key, type|
208
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
209
+ self.send("#{key}=", nil)
210
+ elsif type =~ /\AArray<(.*)>/i
211
+ # check to ensure the input is an array given that the attribute
212
+ # is documented as an array but the input is not
213
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
214
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
215
+ end
216
+ elsif !attributes[self.class.attribute_map[key]].nil?
217
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
218
+ end
219
+ end
220
+
221
+ self
222
+ end
223
+
224
+ # Deserializes the data based on type
225
+ # @param string type Data type
226
+ # @param string value Value to be deserialized
227
+ # @return [Object] Deserialized data
228
+ def _deserialize(type, value)
229
+ case type.to_sym
230
+ when :Time
231
+ Time.parse(value)
232
+ when :Date
233
+ Date.parse(value)
234
+ when :String
235
+ value.to_s
236
+ when :Integer
237
+ value.to_i
238
+ when :Float
239
+ value.to_f
240
+ when :Boolean
241
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
242
+ true
243
+ else
244
+ false
245
+ end
246
+ when :Object
247
+ # generic object (usually a Hash), return directly
248
+ value
249
+ when /\AArray<(?<inner_type>.+)>\z/
250
+ inner_type = Regexp.last_match[:inner_type]
251
+ value.map { |v| _deserialize(inner_type, v) }
252
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
253
+ k_type = Regexp.last_match[:k_type]
254
+ v_type = Regexp.last_match[:v_type]
255
+ {}.tap do |hash|
256
+ value.each do |k, v|
257
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
258
+ end
259
+ end
260
+ else # model
261
+ # models (e.g. Pet) or oneOf
262
+ klass = LinstorClient.const_get(type)
263
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
264
+ end
265
+ end
266
+
267
+ # Returns the string representation of the object
268
+ # @return [String] String presentation of the object
269
+ def to_s
270
+ to_hash.to_s
271
+ end
272
+
273
+ # to_body is an alias to to_hash (backward compatibility)
274
+ # @return [Hash] Returns the object in the form of hash
275
+ def to_body
276
+ to_hash
277
+ end
278
+
279
+ # Returns the object in the form of hash
280
+ # @return [Hash] Returns the object in the form of hash
281
+ def to_hash
282
+ hash = {}
283
+ self.class.attribute_map.each_pair do |attr, param|
284
+ value = self.send(attr)
285
+ if value.nil?
286
+ is_nullable = self.class.openapi_nullable.include?(attr)
287
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
288
+ end
289
+
290
+ hash[param] = _to_hash(value)
291
+ end
292
+ hash
293
+ end
294
+
295
+ # Outputs non-array value in the form of hash
296
+ # For object, use to_hash. Otherwise, just return the value
297
+ # @param [Object] value Any valid value
298
+ # @return [Hash] Returns the value in the form of hash
299
+ def _to_hash(value)
300
+ if value.is_a?(Array)
301
+ value.compact.map { |v| _to_hash(v) }
302
+ elsif value.is_a?(Hash)
303
+ {}.tap do |hash|
304
+ value.each { |k, v| hash[k] = _to_hash(v) }
305
+ end
306
+ elsif value.respond_to? :to_hash
307
+ value.to_hash
308
+ else
309
+ value
310
+ end
311
+ end
312
+
313
+ end
314
+
315
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Linstor REST API
3
3
 
4
- #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
4
+ #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.5.0 - Added etcd.prefix to ControllerConfigDbEtcd parameters * 1.4.0 - Added promotion_score and may_promote to DrbdResource object - Added /v1/error-reports DELETE method, to delete a range of error reports or single ones - Added SSE (Server Sent Events) url /v1/events/drbd/promotion * 1.3.0 - Added /v1/view/snapshot-shippings * 1.2.0 - Added optional AutoSelectFilter to resource-group/spawn - Added /v1/nodes/{node}/config, that allows you to get and set the satellite config - Added /v1/sos-report to create bug reports you can send to linbit - Added new fields to the ErrorReport object - Added /v1/resource-definitions/{resource}/snapshot-shipping - Allow to modify the resource group in Resource definitions - Added createTimestamp to Resource and Snapshot - Added default value (null) for AutoPlaceRequest's layer_list * 1.1.0 - Added /v1/view/snapshots for a faster all in one snapshot list - Filter lists by properties: - /v1/nodes - /v1/resource-definitions - /v1/resource-groups - /v1/view/storage-pools - /v1/view/resources * 1.0.16 - Added CacheResource and CacheVolume schemas - AutSelectFilter arrays are now null per default * 1.0.15 - Added connections map to the DRBD resource layer data - Added support for Openflex * 1.0.14 - Added /v1/controller/config, that gives you the controller config information * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
5
5
 
6
- The version of the OpenAPI document: 1.0.13
6
+ The version of the OpenAPI document: 1.5.0
7
7
  Contact: rene.peinthor@linbit.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.3.1
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Linstor REST API
3
3
 
4
- #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
4
+ #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.5.0 - Added etcd.prefix to ControllerConfigDbEtcd parameters * 1.4.0 - Added promotion_score and may_promote to DrbdResource object - Added /v1/error-reports DELETE method, to delete a range of error reports or single ones - Added SSE (Server Sent Events) url /v1/events/drbd/promotion * 1.3.0 - Added /v1/view/snapshot-shippings * 1.2.0 - Added optional AutoSelectFilter to resource-group/spawn - Added /v1/nodes/{node}/config, that allows you to get and set the satellite config - Added /v1/sos-report to create bug reports you can send to linbit - Added new fields to the ErrorReport object - Added /v1/resource-definitions/{resource}/snapshot-shipping - Allow to modify the resource group in Resource definitions - Added createTimestamp to Resource and Snapshot - Added default value (null) for AutoPlaceRequest's layer_list * 1.1.0 - Added /v1/view/snapshots for a faster all in one snapshot list - Filter lists by properties: - /v1/nodes - /v1/resource-definitions - /v1/resource-groups - /v1/view/storage-pools - /v1/view/resources * 1.0.16 - Added CacheResource and CacheVolume schemas - AutSelectFilter arrays are now null per default * 1.0.15 - Added connections map to the DRBD resource layer data - Added support for Openflex * 1.0.14 - Added /v1/controller/config, that gives you the controller config information * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
5
5
 
6
- The version of the OpenAPI document: 1.0.13
6
+ The version of the OpenAPI document: 1.5.0
7
7
  Contact: rene.peinthor@linbit.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.3.1
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #Linstor REST API
3
+
4
+ #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.5.0 - Added etcd.prefix to ControllerConfigDbEtcd parameters * 1.4.0 - Added promotion_score and may_promote to DrbdResource object - Added /v1/error-reports DELETE method, to delete a range of error reports or single ones - Added SSE (Server Sent Events) url /v1/events/drbd/promotion * 1.3.0 - Added /v1/view/snapshot-shippings * 1.2.0 - Added optional AutoSelectFilter to resource-group/spawn - Added /v1/nodes/{node}/config, that allows you to get and set the satellite config - Added /v1/sos-report to create bug reports you can send to linbit - Added new fields to the ErrorReport object - Added /v1/resource-definitions/{resource}/snapshot-shipping - Allow to modify the resource group in Resource definitions - Added createTimestamp to Resource and Snapshot - Added default value (null) for AutoPlaceRequest's layer_list * 1.1.0 - Added /v1/view/snapshots for a faster all in one snapshot list - Filter lists by properties: - /v1/nodes - /v1/resource-definitions - /v1/resource-groups - /v1/view/storage-pools - /v1/view/resources * 1.0.16 - Added CacheResource and CacheVolume schemas - AutSelectFilter arrays are now null per default * 1.0.15 - Added connections map to the DRBD resource layer data - Added support for Openflex * 1.0.14 - Added /v1/controller/config, that gives you the controller config information * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
5
+
6
+ The version of the OpenAPI document: 1.5.0
7
+ Contact: rene.peinthor@linbit.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LinstorClient
17
+ class DrbdConnection
18
+ attr_accessor :connected
19
+
20
+ # DRBD connection status
21
+ attr_accessor :message
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'connected' => :'connected',
49
+ :'message' => :'message'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'connected' => :'Boolean',
62
+ :'message' => :'String'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LinstorClient::DrbdConnection` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LinstorClient::DrbdConnection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'connected')
88
+ self.connected = attributes[:'connected']
89
+ end
90
+
91
+ if attributes.key?(:'message')
92
+ self.message = attributes[:'message']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ message_validator = EnumAttributeValidator.new('String', ["StandAlone", "Disconnecting", "Unconnected", "Timeout", "BrokenPipe", "NetworkFailure", "ProtocolError", "Connecting", "TearDown", "Connected", "Unknown"])
107
+ return false unless message_validator.valid?(@message)
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method checking allowed values (enum).
112
+ # @param [Object] message Object to be assigned
113
+ def message=(message)
114
+ validator = EnumAttributeValidator.new('String', ["StandAlone", "Disconnecting", "Unconnected", "Timeout", "BrokenPipe", "NetworkFailure", "ProtocolError", "Connecting", "TearDown", "Connected", "Unknown"])
115
+ unless validator.valid?(message)
116
+ fail ArgumentError, "invalid value for \"message\", must be one of #{validator.allowable_values}."
117
+ end
118
+ @message = message
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ connected == o.connected &&
127
+ message == o.message
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [connected, message].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ new.build_from_hash(attributes)
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ self.class.openapi_types.each_pair do |key, type|
155
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
156
+ self.send("#{key}=", nil)
157
+ elsif type =~ /\AArray<(.*)>/i
158
+ # check to ensure the input is an array given that the attribute
159
+ # is documented as an array but the input is not
160
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
161
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
162
+ end
163
+ elsif !attributes[self.class.attribute_map[key]].nil?
164
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
165
+ end
166
+ end
167
+
168
+ self
169
+ end
170
+
171
+ # Deserializes the data based on type
172
+ # @param string type Data type
173
+ # @param string value Value to be deserialized
174
+ # @return [Object] Deserialized data
175
+ def _deserialize(type, value)
176
+ case type.to_sym
177
+ when :Time
178
+ Time.parse(value)
179
+ when :Date
180
+ Date.parse(value)
181
+ when :String
182
+ value.to_s
183
+ when :Integer
184
+ value.to_i
185
+ when :Float
186
+ value.to_f
187
+ when :Boolean
188
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
189
+ true
190
+ else
191
+ false
192
+ end
193
+ when :Object
194
+ # generic object (usually a Hash), return directly
195
+ value
196
+ when /\AArray<(?<inner_type>.+)>\z/
197
+ inner_type = Regexp.last_match[:inner_type]
198
+ value.map { |v| _deserialize(inner_type, v) }
199
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
200
+ k_type = Regexp.last_match[:k_type]
201
+ v_type = Regexp.last_match[:v_type]
202
+ {}.tap do |hash|
203
+ value.each do |k, v|
204
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
205
+ end
206
+ end
207
+ else # model
208
+ # models (e.g. Pet) or oneOf
209
+ klass = LinstorClient.const_get(type)
210
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ if value.nil?
233
+ is_nullable = self.class.openapi_nullable.include?(attr)
234
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
235
+ end
236
+
237
+ hash[param] = _to_hash(value)
238
+ end
239
+ hash
240
+ end
241
+
242
+ # Outputs non-array value in the form of hash
243
+ # For object, use to_hash. Otherwise, just return the value
244
+ # @param [Object] value Any valid value
245
+ # @return [Hash] Returns the value in the form of hash
246
+ def _to_hash(value)
247
+ if value.is_a?(Array)
248
+ value.compact.map { |v| _to_hash(v) }
249
+ elsif value.is_a?(Hash)
250
+ {}.tap do |hash|
251
+ value.each { |k, v| hash[k] = _to_hash(v) }
252
+ end
253
+ elsif value.respond_to? :to_hash
254
+ value.to_hash
255
+ else
256
+ value
257
+ end
258
+ end
259
+
260
+ end
261
+
262
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Linstor REST API
3
3
 
4
- #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
4
+ #Linstor REST API V1 The V1 rest api of Linstor should stay compatible and only additions are made to the API, If there are breaking changes or redesigned a new major REST API version will be issued. Server runs per default on port `3370` on `::` ipv6 and ipv4. To change the bind address or port you can use the following linstor client commands: ``` linstor controller set-property REST/bindAddress 127.0.0.1 linstor controller set-property REST/port 8080 ``` After setting this properties restart the controller and the new values should be used. Changelog: * 1.5.0 - Added etcd.prefix to ControllerConfigDbEtcd parameters * 1.4.0 - Added promotion_score and may_promote to DrbdResource object - Added /v1/error-reports DELETE method, to delete a range of error reports or single ones - Added SSE (Server Sent Events) url /v1/events/drbd/promotion * 1.3.0 - Added /v1/view/snapshot-shippings * 1.2.0 - Added optional AutoSelectFilter to resource-group/spawn - Added /v1/nodes/{node}/config, that allows you to get and set the satellite config - Added /v1/sos-report to create bug reports you can send to linbit - Added new fields to the ErrorReport object - Added /v1/resource-definitions/{resource}/snapshot-shipping - Allow to modify the resource group in Resource definitions - Added createTimestamp to Resource and Snapshot - Added default value (null) for AutoPlaceRequest's layer_list * 1.1.0 - Added /v1/view/snapshots for a faster all in one snapshot list - Filter lists by properties: - /v1/nodes - /v1/resource-definitions - /v1/resource-groups - /v1/view/storage-pools - /v1/view/resources * 1.0.16 - Added CacheResource and CacheVolume schemas - AutSelectFilter arrays are now null per default * 1.0.15 - Added connections map to the DRBD resource layer data - Added support for Openflex * 1.0.14 - Added /v1/controller/config, that gives you the controller config information * 1.0.13 - Fixed broken volume definition modify `flags` handling - Added flags to volume groups (create/modify) * 1.0.12 - Added WritecacheResource and WritecacheVolume schemas. - Removed support for swordfish - Added `with_storage_pool` to PhysicalStorageCreate post request, allowing to create linstor storage pools too - Added `gross` flag for volume-definition size - Added flags to VolumeDefinitionModify (so that `gross` flag can be changed) - Added query-max-volume-size to resource-groups * 1.0.11 - Added /v1/physical-storage endpoint, that lets you query and create lvm/zfs pools - Extended Node with list of supported providers and layers as well as lists of reasons for unsupported providers and layers * 1.0.10 - Added `reports` array field to Volume object, contains ApiCallRcs for problems - Changed `ResourceDefinitions` can now include `VolumeDefinitions` in `volume_definitions` field - Added various filter query parameters * 1.0.9 - Added supports_snapshots to StoragePool * 1.0.8 - Added /v1/resource-groups - Added /v1/resource-groups/{rscgrp}/volume-groups - Moved AutoSelectFilter::place_count default indirectly to create resource implementation - Added diskless_on_remaining to AutoSelectFilter - Changed /v1/view/resources return type to ResourceWithVolumes ResourceWithVolumes is now a child type of Resource (removed volumes from Resource) * 1.0.7 - Added ext_meta_stor_pool to DrbdVolume - Added is_active field to the NetInterface type * 1.0.6 - Added /v1/resource-definitions/{rscName}/resources/{nodeName}/volumes/{vlmnr} PUT * 1.0.5 - Added `reports` field to StoragePool object * 1.0.4 - Added /v1/view/storage-pools overview path - Added uuid fields for objects * 1.0.3 - Added /v1/view/resources overview path - documentation schema extraction * 1.0.2 - Added /v1/storage-pool-definitions object path - added NVME layer object type * 1.0.1 - Documentation review and updates - no functional changes * 1.0.0 - Initial REST API v1
5
5
 
6
- The version of the OpenAPI document: 1.0.13
6
+ The version of the OpenAPI document: 1.5.0
7
7
  Contact: rene.peinthor@linbit.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.3.1