radfish-idrac 0.2.8 → 0.2.10

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: d4caffb2a74c11d15c48dfff2934e9861ce98acf1fb200a34edcf6dd7cbfc5c1
4
- data.tar.gz: 24d53caadde4ed5fb85f06414e7cc716b996b6965bcd94925b58e342ff3908f3
3
+ metadata.gz: 69c28e5d39ff62c083dabb09e31d52580ad3a3a787c6bbb29b1598b5e737c4a3
4
+ data.tar.gz: 568b97038c24366adc4dcc21d64a4614d96f9ca716d8a03bf2173e6ba0b8a5b7
5
5
  SHA512:
6
- metadata.gz: 1a6c0553272dcc0c8fb3ec163c1aac1316d3dcb7d6a79e14f278d22d75d1102ef454fea067bfbefd76ce61838bf978b5e2a41465ad3e2dcc8bb3861b22321417
7
- data.tar.gz: 6150c9fb862156235358b02e401c5da9a2e527075204028c1df5b37facfddf722667f1d262d02671181a67bda3490530b64517074a7e01a3c42bf53b306471da
6
+ metadata.gz: 429586b113fd10f2171525e1a3433b196259be8ec3211b2797e5d2f960d60dfe458d75ddf7f4d952affcd16715df9130c35cd868da78b3d549f54bbd764696fc
7
+ data.tar.gz: 585d733365d0d149b8b68d83d4ef82af69a7d5bac9b1a243d61207c48a70cd9e27bfd4eacc04757d1d8ddaa97c557906a21823583732f71b1854fb03caf3b18a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Radfish
4
4
  module Idrac
5
- VERSION = "0.2.8"
5
+ VERSION = "0.2.10"
6
6
  end
7
7
  end
@@ -87,9 +87,15 @@ module Radfish
87
87
  result
88
88
  end
89
89
 
90
+ # Reset types that restart the host. These must never be sent through #power_off: the wait for
91
+ # "Off" cannot succeed, and the iDRAC gem reads that failure as a stuck shutdown.
92
+ RESTART_TYPES = %w[ForceRestart GracefulRestart PowerCycle].freeze
93
+
90
94
  def power_off(type: "GracefulShutdown", wait: true)
95
+ raise ArgumentError, "#{type} restarts the host; use #reboot" if RESTART_TYPES.include?(type)
96
+
91
97
  # Use the type parameter directly - it already uses Redfish standard values
92
- result = @idrac_client.power_off(kind: type)
98
+ result = @idrac_client.power_off(kind: type, wait: wait)
93
99
 
94
100
  if wait && result
95
101
  # Wait for power off to complete
@@ -112,17 +118,15 @@ module Radfish
112
118
  end
113
119
 
114
120
  def reboot(type: "GracefulRestart", wait: true)
115
- # Use the type parameter - iDRAC's power_off can handle restart types
121
+ # A restart goes to the restart action. Routing it through power_off left iDRAC8 hosts
122
+ # powered down: the wait for "Off" failed and the iDRAC gem escalated to ForceOff.
116
123
  begin
117
- result = @idrac_client.power_off(kind: type)
124
+ result = @idrac_client.reboot(kind: type, wait: wait)
118
125
  rescue => e
119
- # If graceful restart fails, fall back to force restart
120
- if type == "GracefulRestart"
121
- debug "Graceful restart failed, using force restart", 1, :yellow
122
- result = @idrac_client.reboot # This is ForceRestart
123
- else
124
- raise e
125
- end
126
+ # iDRAC8 has no GracefulRestart in its allowable reset types.
127
+ raise e unless type == "GracefulRestart"
128
+ debug "Graceful restart failed, using force restart", 1, :yellow
129
+ result = @idrac_client.reboot(kind: "ForceRestart", wait: wait)
126
130
  end
127
131
 
128
132
  if wait && result
@@ -445,7 +449,7 @@ module Radfish
445
449
  # Default to "CD" for iDRAC if not specified
446
450
  device ||= "CD"
447
451
  @idrac_client.insert_virtual_media(iso_url, device: device)
448
- rescue Idrac::Error => e
452
+ rescue IDRAC::Error => e
449
453
  # Translate iDRAC errors to Radfish errors with context
450
454
  error_message = e.message
451
455
 
@@ -468,7 +472,7 @@ module Radfish
468
472
 
469
473
  def eject_virtual_media(device: "CD")
470
474
  @idrac_client.eject_virtual_media(device: device)
471
- rescue Idrac::Error => e
475
+ rescue IDRAC::Error => e
472
476
  if e.message.include?("not found") || e.message.include?("does not exist")
473
477
  raise Radfish::VirtualMediaNotFoundError, "Virtual media device not found: #{e.message}"
474
478
  else
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radfish-idrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Siegel
8
+ autorequire:
8
9
  bindir: bin
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2026-08-29 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: radfish
@@ -29,14 +30,20 @@ dependencies:
29
30
  requirements:
30
31
  - - "~>"
31
32
  - !ruby/object:Gem::Version
32
- version: '0.8'
33
+ version: '0.10'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 0.10.4
33
37
  type: :runtime
34
38
  prerelease: false
35
39
  version_requirements: !ruby/object:Gem::Requirement
36
40
  requirements:
37
41
  - - "~>"
38
42
  - !ruby/object:Gem::Version
39
- version: '0.8'
43
+ version: '0.10'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.10.4
40
47
  - !ruby/object:Gem::Dependency
41
48
  name: rspec
42
49
  requirement: !ruby/object:Gem::Requirement
@@ -70,6 +77,7 @@ metadata:
70
77
  homepage_uri: https://github.com/buildio/radfish-idrac
71
78
  source_code_uri: https://github.com/buildio/radfish-idrac
72
79
  changelog_uri: https://github.com/buildio/radfish-idrac/blob/main/CHANGELOG.md
80
+ post_install_message:
73
81
  rdoc_options: []
74
82
  require_paths:
75
83
  - lib
@@ -84,7 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
92
  - !ruby/object:Gem::Version
85
93
  version: '0'
86
94
  requirements: []
87
- rubygems_version: 3.6.9
95
+ rubygems_version: 3.5.22
96
+ signing_key:
88
97
  specification_version: 4
89
98
  summary: Dell iDRAC adapter for Radfish
90
99
  test_files: []