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 +4 -4
- data/lib/radfish/idrac/version.rb +1 -1
- data/lib/radfish/idrac_adapter.rb +24 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3287141d4e7316bb871ca1fa86099e81f2148e9cf810d8f2e22f475506d58e38
|
4
|
+
data.tar.gz: 167d356a4682cce6b1448142b4ba07b5fef22f0deb030d7b2dd7584516811163
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51604ede9e27e2f70aeb760fa165b091f08155335b763b011e2ddee1554bd992730a3ffa9ad4388184d1a2c50d971bce8f52e6e05cbff0121aa60250a96caad0
|
7
|
+
data.tar.gz: 943856d3352e504a339495dd0d735aba370373cdb2207b939ced663503adc72dd26a4b0502b85e45b460e52ca76198b338484995c4b65206fd680b01026e9d13
|
@@ -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
|