idrac 0.5.3 → 0.5.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/bin/idrac +17 -17
- data/lib/idrac/version.rb +1 -1
- 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: 11b28d37156ee3d58ef6a804a016cc6ca35f6a4e7c4e158c93fe86c0053398f0
|
4
|
+
data.tar.gz: c69c297450fb2715873e3dbd66f2779d3487ce1fecfca9a4032a7d917d87f8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0beadf7041ca23371999f125d536c25972a615092baf045fdb2694d3c15e2ea28c9f063943e1f8df67065855f26cca23e138622b2f80fba0c8bc8b575c8215c
|
7
|
+
data.tar.gz: c88e403f07b030a238f999498c3da04fa5b3908713d469c4e52ed28ea8ac310ec018c9a6be519695d054358a1603045d4a8785d94d029e07b90cdcbf6445a1c5
|
data/bin/idrac
CHANGED
@@ -557,10 +557,10 @@ module IDRAC
|
|
557
557
|
with_idrac_client do |client|
|
558
558
|
controller = client.controller
|
559
559
|
puts "\nStorage Controller Summary:".green.bold
|
560
|
-
puts "Name: #{controller
|
561
|
-
puts "Model: #{controller
|
562
|
-
puts "Health: #{controller
|
563
|
-
puts "Manufacturer: #{controller
|
560
|
+
puts "Name: #{controller.name}".cyan
|
561
|
+
puts "Model: #{controller.model}".cyan
|
562
|
+
puts "Health: #{controller.status&.health || 'Unknown'}".cyan
|
563
|
+
puts "Manufacturer: #{controller.manufacturer}".cyan
|
564
564
|
|
565
565
|
if client.controller_encryption_capable?(controller)
|
566
566
|
puts "Encryption Capable: Yes".green
|
@@ -610,17 +610,17 @@ module IDRAC
|
|
610
610
|
|
611
611
|
puts "\nPhysical Drives (#{drives.size}):".green.bold
|
612
612
|
drives.each do |drive|
|
613
|
-
capacity_gb = drive
|
614
|
-
health_color = drive
|
613
|
+
capacity_gb = drive.capacity_bytes.to_f / (1024**3)
|
614
|
+
health_color = drive.health == "OK" ? :green : :red
|
615
615
|
|
616
|
-
puts "#{drive
|
617
|
-
puts " Model: #{drive
|
618
|
-
puts " Health: #{drive
|
616
|
+
puts "#{drive.name}:".bold
|
617
|
+
puts " Model: #{drive.model}".cyan
|
618
|
+
puts " Health: #{drive.health.send(health_color)}"
|
619
619
|
puts " Capacity: #{capacity_gb.round(2)} GB".cyan
|
620
|
-
puts " Media Type: #{drive
|
621
|
-
puts " Serial: #{drive
|
622
|
-
if drive
|
623
|
-
puts " Encryption: #{drive
|
620
|
+
puts " Media Type: #{drive.media_type}".cyan
|
621
|
+
puts " Serial: #{drive.serial}".cyan
|
622
|
+
if drive.encryption_ability
|
623
|
+
puts " Encryption: #{drive.encryption_ability}".cyan
|
624
624
|
end
|
625
625
|
puts ""
|
626
626
|
end
|
@@ -675,7 +675,7 @@ module IDRAC
|
|
675
675
|
confirmation = $stdin.gets.chomp.downcase
|
676
676
|
|
677
677
|
if confirmation == 'y'
|
678
|
-
client.create_virtual_disk(controller
|
678
|
+
client.create_virtual_disk(controller.odata_Id, drives, name: options[:name], raid_type: options[:raid])
|
679
679
|
puts "Volume created successfully".green
|
680
680
|
else
|
681
681
|
puts "Operation cancelled".yellow
|
@@ -763,7 +763,7 @@ module IDRAC
|
|
763
763
|
# Get keyid if not provided
|
764
764
|
keyid = options[:keyid] || "RAID-Key-#{Time.now.strftime('%Y%m%d')}"
|
765
765
|
|
766
|
-
client.enable_local_key_management(controller
|
766
|
+
client.enable_local_key_management(controller.odata_id, passphrase: passphrase, keyid: keyid)
|
767
767
|
puts "Encryption enabled successfully".green
|
768
768
|
end
|
769
769
|
end
|
@@ -784,7 +784,7 @@ module IDRAC
|
|
784
784
|
confirmation = $stdin.gets.chomp
|
785
785
|
|
786
786
|
if confirmation == 'DISABLE'
|
787
|
-
client.disable_local_key_management(controller
|
787
|
+
client.disable_local_key_management(controller.odata_id)
|
788
788
|
puts "Encryption disabled successfully".green
|
789
789
|
else
|
790
790
|
puts "Operation cancelled".yellow
|
@@ -1262,7 +1262,7 @@ module IDRAC
|
|
1262
1262
|
puts "\n[TEST] Storage management".cyan.bold
|
1263
1263
|
begin
|
1264
1264
|
controller = client.controller
|
1265
|
-
puts "✓ Storage controller: #{controller
|
1265
|
+
puts "✓ Storage controller: #{controller.name} (#{controller.model})".green
|
1266
1266
|
|
1267
1267
|
drives = client.drives(controller)
|
1268
1268
|
puts "✓ Found #{drives.size} physical drives".green
|
data/lib/idrac/version.rb
CHANGED