idrac 0.8.7 → 0.9.0
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/README.md +33 -0
- data/bin/idrac +2 -2
- data/lib/idrac/client.rb +29 -3
- data/lib/idrac/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40d8abda65007546224a817d15c735d6b0f4fb35f7d4aba6a429bf1f4d92bc98
|
4
|
+
data.tar.gz: 8a33504cada67707e4f5d38ea8af248d68c6de3d91bf9f03c867ec2042617c9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 451ec8c73047bb0af4abf66e6b8139b7c84ea4f5e94c3391aa791b669c5e7cd95bc6aaa980ea0b37978b7f464cf6b9598072efdd767a4714bd542d1345f705cc
|
7
|
+
data.tar.gz: 98772256156d10521bffc87e752ef2249d35c865af29a3ad74743af283dd74ac0fbb19cff18767978fa06b2ef556dc57ee847b74381f6360ab462d829d021295
|
data/README.md
CHANGED
@@ -291,6 +291,39 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
291
291
|
|
292
292
|
## Changelog
|
293
293
|
|
294
|
+
### Version 0.9.0
|
295
|
+
- **Automatic Retry Handling**: ServiceTemporarilyUnavailable (503) errors now automatically retry with iDRAC-specified delay
|
296
|
+
- **Simplified API**: `authenticated_request` now returns response body string by default instead of response object
|
297
|
+
- Use block syntax `authenticated_request(...) { |response| ... }` for custom response handling
|
298
|
+
- Most methods are now simpler and more consistent across the codebase
|
299
|
+
- **Automatic Content-Type Header**: JSON request bodies automatically get `Content-Type: application/json` header
|
300
|
+
- **Automatic Job Monitoring**: Location headers for async operations are automatically handled with job/task monitoring
|
301
|
+
- **Fixed Jobs Module**: Resolved NoMethodError in `jobs`, `jobs_detail`, `clear_jobs!`, `force_clear_jobs!`, `wait_for_job`, and `tasks` methods
|
302
|
+
- **Improved Error Handling**: Job failures now raise immediately instead of retrying indefinitely
|
303
|
+
- **SSL Warning**: SSL verification warning now only shows in verbose mode
|
304
|
+
- **Code Cleanup**: Removed ~60 lines of redundant Content-Type headers and manual location handling
|
305
|
+
- **Comprehensive Tests**: Added full test coverage for Jobs module (63 total tests passing)
|
306
|
+
- **Ruby 3.4+ Ready**: Added `csv` and `ostruct` gems to prevent future deprecation warnings
|
307
|
+
|
308
|
+
### Versions 0.8.1-0.8.7
|
309
|
+
- **Enhanced Hardware Support**: Added updates for latest Dell PowerEdge R7525 models
|
310
|
+
- **Storage Improvements**: Fixed controller model extraction from StorageControllers array
|
311
|
+
- **PSU Enhancements**:
|
312
|
+
- Fixed PSU voltage type display to show actual server values
|
313
|
+
- Added `power_supply_type` attribute
|
314
|
+
- Added `power_consumption_watts` alias for cross-vendor uniformity
|
315
|
+
- Ensured drives/volumes require controller_id parameter
|
316
|
+
- **BMC/iDRAC IP Configuration**: Added vendor-agnostic BMC IP setting functionality
|
317
|
+
- **API Consistency**: Enhanced API consistency and functionality across all modules
|
318
|
+
- **Test Suite**: Fixed TSR logs test suite with proper mocking
|
319
|
+
- **Dependency Updates**:
|
320
|
+
- Upgraded to Thor 1.4.0 (from 1.2.2)
|
321
|
+
- Updated ActiveSupport for Rails 8 compatibility
|
322
|
+
- Bumped Nokogiri to 1.18.9 for security updates
|
323
|
+
- **Bug Fixes**:
|
324
|
+
- Fixed nagging multi-release attempts
|
325
|
+
- Resolved various dependency issues
|
326
|
+
|
294
327
|
### Version 0.8.0
|
295
328
|
- **Added TSR/SupportAssist Collection Support**: Simplified commands for generating Technical Support Reports
|
296
329
|
- Generate and download SupportAssist collections with direct file download
|
data/bin/idrac
CHANGED
@@ -1746,8 +1746,8 @@ module IDRAC
|
|
1746
1746
|
end
|
1747
1747
|
|
1748
1748
|
def check_ssl_verification
|
1749
|
-
# If verify_ssl is not explicitly set in the command line, show a warning
|
1750
|
-
|
1749
|
+
# If verify_ssl is not explicitly set in the command line, show a warning (only with verbose mode)
|
1750
|
+
if options[:verbose] && !(ARGV.include?('--verify-ssl') || ARGV.include?('--no-verify-ssl'))
|
1751
1751
|
puts "WARNING: SSL verification is disabled by default. iDRAC typically uses self-signed certificates.".yellow
|
1752
1752
|
puts " Use --verify-ssl if you want to enable SSL verification.".yellow
|
1753
1753
|
puts ""
|
data/lib/idrac/client.rb
CHANGED
@@ -114,7 +114,23 @@ module IDRAC
|
|
114
114
|
end
|
115
115
|
|
116
116
|
# Send an authenticated request to the iDRAC
|
117
|
-
|
117
|
+
#
|
118
|
+
# Returns the full HTTParty::Response object by default, which allows access to:
|
119
|
+
# - response.status (HTTP status code)
|
120
|
+
# - response.body (response body as string)
|
121
|
+
# - response.headers (response headers)
|
122
|
+
#
|
123
|
+
# Automatically handles retry for 503 ServiceTemporarilyUnavailable errors.
|
124
|
+
# For error status codes (4xx, 5xx), handle_response is called to raise appropriate errors.
|
125
|
+
#
|
126
|
+
# You can provide a block for custom response handling:
|
127
|
+
# authenticated_request(:post, path) { |response| custom_logic(response) }
|
128
|
+
def authenticated_request(method, path, body: nil, headers: {}, timeout: nil, open_timeout: nil, **options, &block)
|
129
|
+
# Automatically set Content-Type for JSON requests if not already set
|
130
|
+
if body && body.is_a?(String) && !headers.key?('Content-Type') && !headers.key?(:content_type)
|
131
|
+
headers = headers.merge('Content-Type' => 'application/json')
|
132
|
+
end
|
133
|
+
|
118
134
|
# Build options hash with all parameters
|
119
135
|
request_options = {
|
120
136
|
body: body,
|
@@ -122,9 +138,19 @@ module IDRAC
|
|
122
138
|
timeout: timeout,
|
123
139
|
open_timeout: open_timeout
|
124
140
|
}.merge(options).compact
|
125
|
-
|
141
|
+
|
126
142
|
with_retries do
|
127
|
-
_perform_authenticated_request(method, path, request_options)
|
143
|
+
response = _perform_authenticated_request(method, path, request_options)
|
144
|
+
|
145
|
+
# If a block is provided, use it for custom response handling
|
146
|
+
if block_given?
|
147
|
+
yield response
|
148
|
+
else
|
149
|
+
# Call handle_response only for error status codes to enable retry logic
|
150
|
+
# This allows 503 errors to be caught and retried by with_retries
|
151
|
+
handle_response(response) if response.status >= 400
|
152
|
+
response # Return full response object for backward compatibility
|
153
|
+
end
|
128
154
|
end
|
129
155
|
end
|
130
156
|
|
data/lib/idrac/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: idrac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Siegel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|