radfish-supermicro 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 499189bee910ae6a2e0e988ae483da3942747a82eed4c92ea135d6860e7cadb5
4
- data.tar.gz: 64c25e2b26bda44fee6d22a67a5810bb360abfcd81519383fa9468af3d556686
3
+ metadata.gz: 202dcec4a1ba67974964ada0218d40876d291858bba3de7d163f401c05206fd9
4
+ data.tar.gz: a944dca7885e3df865a6ba44f2b776c321dfbce0480ed11533e49d92fa91e21f
5
5
  SHA512:
6
- metadata.gz: 9914c96b7ac2f16af5ea3503b4dd0ae651ba27eb051475f33abd1af90d0d5a60f09eff180ce62260b55f42d5cc52cebcffb0e4c72a2375db541cb864be3416d9
7
- data.tar.gz: 36fb04d97574bfcb12db4e92616f328bbf5147a9cfaa8a9508e6b150560d72b0ce2c45d5fdb4a5420bb11640a563fb5adec3eef7af54a9d3a52e01af09009962
6
+ metadata.gz: 9fbe20bfba799ddb24d2a7b14aaf66d4d123c4a5b15a4cebf2f52dac6a2a501c420d29662cfb432a06bb667666404d9b4721e5caf0a60b855f75d2df429c766e
7
+ data.tar.gz: 642e58e514d1baa77c972cfa4acb520d692490e421e273b92fd8b5a9b8e73ec342f3fdd460cc64e5b76a1de00a74ccf266fab04da01af31736354669e7ba2dbe
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Radfish
4
4
  module Supermicro
5
- VERSION = "0.1.4"
5
+ VERSION = "0.1.6"
6
6
  end
7
7
  end
@@ -203,6 +203,35 @@ module Radfish
203
203
  }.compact
204
204
  end
205
205
 
206
+ # Individual accessor methods for Core::System interface
207
+ def service_tag
208
+ @service_tag ||= begin
209
+ info = @supermicro_client.system_info
210
+ info["manager_uuid"]&.split('-')&.last || info["serial"]
211
+ end
212
+ end
213
+
214
+ def make
215
+ @make ||= begin
216
+ info = @supermicro_client.system_info
217
+ manufacturer = info["manufacturer"]
218
+ if manufacturer
219
+ # Strip "Super Micro", "Super Micro Computer", etc. to just "Supermicro"
220
+ manufacturer.gsub(/Super\s*Micro(\s+Computer.*)?/i, 'Supermicro')
221
+ else
222
+ "Supermicro"
223
+ end
224
+ end
225
+ end
226
+
227
+ def model
228
+ @model ||= @supermicro_client.system_info["model"]
229
+ end
230
+
231
+ def serial
232
+ @serial ||= @supermicro_client.system_info["serial"]
233
+ end
234
+
206
235
  def cpus
207
236
  # The supermicro gem returns an array of CPU hashes
208
237
  # Convert them to OpenStruct objects for dot notation access
@@ -251,7 +280,11 @@ module Radfish
251
280
  end
252
281
  end
253
282
 
254
- # Note: Supermicro doesn't provide a temperatures method
283
+ def temperatures
284
+ # Supermicro doesn't provide a dedicated temperatures method
285
+ # Return empty array to satisfy the interface
286
+ []
287
+ end
255
288
 
256
289
  def psus
257
290
  # Convert hash array to OpenStruct objects for dot notation access
@@ -287,12 +320,24 @@ module Radfish
287
320
  end
288
321
  end
289
322
 
290
- def drives
291
- @supermicro_client.drives
323
+ def drives(controller_id)
324
+ # The Supermicro gem now requires controller_id following natural Redfish pattern
325
+ raise ArgumentError, "Controller ID is required" unless controller_id
326
+
327
+ drive_data = @supermicro_client.drives(controller_id)
328
+
329
+ # Convert to OpenStruct for consistency
330
+ drive_data.map { |drive| OpenStruct.new(drive) }
292
331
  end
293
332
 
294
- def volumes
295
- @supermicro_client.volumes
333
+ def volumes(controller_id)
334
+ # The Supermicro gem now requires controller_id following natural Redfish pattern
335
+ raise ArgumentError, "Controller ID is required" unless controller_id
336
+
337
+ volume_data = @supermicro_client.volumes(controller_id)
338
+
339
+ # Convert to OpenStruct for consistency
340
+ volume_data.map { |volume| OpenStruct.new(volume) }
296
341
  end
297
342
 
298
343
  def storage_summary
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radfish-supermicro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Siegel
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  requirements: []
90
- rubygems_version: 3.3.26
90
+ rubygems_version: 3.5.22
91
91
  signing_key:
92
92
  specification_version: 4
93
93
  summary: Supermicro adapter for Radfish