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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 84cc513a711ebdea97f786857702ff36f607a0787e32dfe9b923f2587fc0f547
4
- data.tar.gz: f6ff7e6b297064d268c702bbe89c7a6c663a9e0b7b4096bb92ae3ba922731e49
3
+ metadata.gz: f2e790b22ca375a798916fdb6d908583d2fa4823e90a814c2e7c27796c7b6351
4
+ data.tar.gz: 0ab7103ae540892dc959d22c7fa646050fe8eeaf003f6dc538c753fc3d614452
5
5
  SHA512:
6
- metadata.gz: 40c1af62898da133ddb2ecf7dab1888c4b3b6758c7af912f9cdd3f2f644c089d42dea211c58a0aa5ceb056a04dec9df3cd98cdbe3b664c271aec3e4bc03f686a
7
- data.tar.gz: b1977e34694d5a5c41d54fe461bcb8c03724e4bdf5a6c59aa08fd6325ddd22c41a50d0e615fbfba86428aaf73b6960f03f6dedf1a4811617d98aa466d04dbfa7
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:"
@@ -153,7 +153,12 @@ module IDRAC
153
153
  # Get current firmware versions
154
154
  current_versions = {}
155
155
  inventory[:firmware].each do |fw|
156
- current_versions[fw[:name]] = fw[:version]
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
- inventory[:firmware].each do |fw|
168
- if fw[:name].include?(name) || name.include?(fw[:name])
169
- current_version = fw[:version]
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
- # Simple version comparison (this could be improved)
172
- if version != current_version
189
+ # Compare versions
190
+ if version != fw_info[:version] && fw_info[:updateable]
173
191
  updates << {
174
192
  name: name,
175
- current_version: 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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IDRAC
4
- VERSION = "0.1.22"
4
+ VERSION = "0.1.24"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.22
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Siegel