idrac 0.1.22 → 0.1.24
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 +13 -0
- data/bin/idrac +1 -2
- data/lib/idrac/firmware.rb +28 -7
- 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: f2e790b22ca375a798916fdb6d908583d2fa4823e90a814c2e7c27796c7b6351
|
4
|
+
data.tar.gz: 0ab7103ae540892dc959d22c7fa646050fe8eeaf003f6dc538c753fc3d614452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89b75cdaf04c90368379af12884e55dcd4e5daa52ccda59143776934c871a60c039891a13194a52496532159bad0859f3b8502fe2f8beeaf433319ba1d5aa0e1
|
7
|
+
data.tar.gz: 6dee9f26c047f9931ea846e2eaf738f91510801fdb090c384d18fd76639ca098db11ca071acb55ab81a0c319bb42ecb781d33f71ed83c66c9dac22c58c8bf2c6
|
data/README.md
CHANGED
@@ -127,6 +127,19 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
127
127
|
|
128
128
|
## Changelog
|
129
129
|
|
130
|
+
### Version 0.1.24
|
131
|
+
- **Improved Firmware Update Check**: Fixed issues with firmware version comparison
|
132
|
+
- Eliminated duplicate entries in firmware update results
|
133
|
+
- Improved matching logic between installed firmware and catalog entries
|
134
|
+
- Added proper handling of BIOS updates
|
135
|
+
- Fixed missing version information in update output
|
136
|
+
- Enhanced name comparison with case-insensitive matching
|
137
|
+
|
138
|
+
### Version 0.1.23
|
139
|
+
- **Fixed Duplicate Messages**: Removed duplicate "Retrieving system inventory..." message in firmware:status command
|
140
|
+
- The message was appearing twice because it was being printed by both the CLI class and the Firmware class
|
141
|
+
- Improved user experience by eliminating redundant output
|
142
|
+
|
130
143
|
### Version 0.1.22
|
131
144
|
- **Session Management Control**: Added `--auto-delete-sessions` CLI option (default: true)
|
132
145
|
- When enabled, the client automatically deletes existing sessions when maximum session limit is reached
|
data/bin/idrac
CHANGED
@@ -65,8 +65,7 @@ module IDRAC
|
|
65
65
|
firmware = IDRAC::Firmware.new(client)
|
66
66
|
|
67
67
|
begin
|
68
|
-
# Get system inventory
|
69
|
-
puts "Retrieving system inventory..."
|
68
|
+
# Get system inventory - the Firmware class will print its own message
|
70
69
|
inventory = firmware.get_system_inventory
|
71
70
|
|
72
71
|
puts "System Information:"
|
data/lib/idrac/firmware.rb
CHANGED
@@ -153,7 +153,12 @@ module IDRAC
|
|
153
153
|
# Get current firmware versions
|
154
154
|
current_versions = {}
|
155
155
|
inventory[:firmware].each do |fw|
|
156
|
-
|
156
|
+
# Use the ID as the key to avoid duplicates
|
157
|
+
current_versions[fw[:id]] = {
|
158
|
+
name: fw[:name],
|
159
|
+
version: fw[:version],
|
160
|
+
updateable: fw[:updateable]
|
161
|
+
}
|
157
162
|
end
|
158
163
|
|
159
164
|
# Find matching components in catalog
|
@@ -163,21 +168,37 @@ module IDRAC
|
|
163
168
|
path = component.at_xpath('Path')&.text
|
164
169
|
component_type = component.at_xpath('ComponentType')&.text
|
165
170
|
|
171
|
+
next unless name && version && path # Skip if missing essential data
|
172
|
+
|
166
173
|
# Check if this component matches any of our firmware
|
167
|
-
|
168
|
-
|
169
|
-
|
174
|
+
# We'll track if we found a match to avoid duplicates
|
175
|
+
matched = false
|
176
|
+
|
177
|
+
current_versions.each do |id, fw_info|
|
178
|
+
# Normalize names for comparison
|
179
|
+
catalog_name = name.downcase.strip
|
180
|
+
firmware_name = fw_info[:name].downcase.strip
|
181
|
+
|
182
|
+
# Check if names match or contain each other
|
183
|
+
if catalog_name.include?(firmware_name) || firmware_name.include?(catalog_name) ||
|
184
|
+
(catalog_name.include?("bios") && firmware_name.include?("bios"))
|
185
|
+
|
186
|
+
# Skip if already matched to avoid duplicates
|
187
|
+
next if matched
|
170
188
|
|
171
|
-
#
|
172
|
-
if version !=
|
189
|
+
# Compare versions
|
190
|
+
if version != fw_info[:version] && fw_info[:updateable]
|
173
191
|
updates << {
|
174
192
|
name: name,
|
175
|
-
current_version:
|
193
|
+
current_version: fw_info[:version],
|
176
194
|
available_version: version,
|
177
195
|
path: path,
|
178
196
|
component_type: component_type,
|
179
197
|
download_url: "https://downloads.dell.com/#{path}"
|
180
198
|
}
|
199
|
+
|
200
|
+
# Mark as matched to avoid duplicates
|
201
|
+
matched = true
|
181
202
|
end
|
182
203
|
end
|
183
204
|
end
|
data/lib/idrac/version.rb
CHANGED