radfish-idrac 0.2.3 → 0.2.4

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: 9e06ed50701a0a34c99711a2cba0e5ee4238667d75988b7c78f06b66c6f08cf9
4
- data.tar.gz: a4e88ec48073815ff1e368d5bd93b1c4d14b9b5dd44bcb0324e0aa037e79430d
3
+ metadata.gz: 3287141d4e7316bb871ca1fa86099e81f2148e9cf810d8f2e22f475506d58e38
4
+ data.tar.gz: 167d356a4682cce6b1448142b4ba07b5fef22f0deb030d7b2dd7584516811163
5
5
  SHA512:
6
- metadata.gz: 1b189ac7729869a390ff50e4043a4eccd92dbf3fcab823d338130895a735ff7f1d30dd3d03aa3b5611d4eb5f54e8e8cab4e57307eebd82b33153049f1930c633
7
- data.tar.gz: 451835735540908ea5a129e50dacc003088d2411d03eb89826ec4d423de594d49767c353dda430329a40df05639a9e7b8bfb76a075dc5bd091cbdad71a51fc22
6
+ metadata.gz: 51604ede9e27e2f70aeb760fa165b091f08155335b763b011e2ddee1554bd992730a3ffa9ad4388184d1a2c50d971bce8f52e6e05cbff0121aa60250a96caad0
7
+ data.tar.gz: 943856d3352e504a339495dd0d735aba370373cdb2207b939ced663503adc72dd26a4b0502b85e45b460e52ca76198b338484995c4b65206fd680b01026e9d13
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Radfish
4
4
  module Idrac
5
- VERSION = "0.2.3"
5
+ VERSION = "0.2.4"
6
6
  end
7
7
  end
@@ -331,6 +331,30 @@ module Radfish
331
331
 
332
332
  volume_data = @idrac_client.volumes(controller_id)
333
333
 
334
+ # Normalize key names for expected fields
335
+ volume_data.each do |v|
336
+ # Ensure raid_type/volume_type
337
+ v["raid_type"] ||= v["raid_level"] || v["RAIDType"]
338
+ v["volume_type"] ||= v["VolumeType"] if v["VolumeType"]
339
+ # Operations mapping
340
+ if v["Operations"]&.any?
341
+ v["operation_percent_complete"] ||= v["Operations"].first["PercentageComplete"]
342
+ v["operation_name"] ||= v["Operations"].first["OperationName"]
343
+ end
344
+ # Health normalization
345
+ v["health"] ||= v.dig("Status", "Health")
346
+ # OEM fallbacks
347
+ oem = v.dig("Oem", "Dell", "DellVirtualDisk") || v.dig("Oem", "Dell", "DellVolume")
348
+ if oem
349
+ v["lock_status"] ||= oem["LockStatus"]
350
+ v["stripe_size"] ||= oem["StripeSize"]
351
+ v["operation_name"] ||= oem["OperationName"]
352
+ v["operation_percent_complete"] ||= oem["OperationPercentComplete"]
353
+ v["write_cache_policy"] ||= oem["WriteCachePolicy"]
354
+ v["read_cache_policy"] ||= oem["ReadCachePolicy"]
355
+ end
356
+ end
357
+
334
358
  # Convert to OpenStruct for consistency
335
359
  volume_data.map { |volume| OpenStruct.new(volume) }
336
360
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radfish-idrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Siegel