Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the Hardware#m_bios method #20258

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions app/models/hardware.rb
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,6 @@ def m_memory(_parent, xmlNode, _deletes)
self.memory_mb = xmlNode.attributes["memsize"]
end

def m_bios(_parent, xmlNode, _deletes)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roliveri @jerryk55 I assume this was used for smartstate scans, does this look familiar to you? Was it previously used but not anymore?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agrare if it was it was from before my time. I don't ever remember seeing it used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall. Are the similar routines (like m_vm) currently used by SSA?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think the answer to "is this used anymore" is a definite yes. There are a number of m_ methods that appear to be called by smartstate (#20258 (comment))

new_bios = MiqUUID.clean_guid(xmlNode.attributes["bios"])
self.bios = new_bios.nil? ? xmlNode.attributes["bios"] : new_bios

new_bios = MiqUUID.clean_guid(xmlNode.attributes["location"])
self.bios_location = new_bios.nil? ? xmlNode.attributes["location"] : new_bios
end

def m_vm(parent, xmlNode, _deletes)
xmlNode.each_element do |e|
self.guest_os = e.attributes["guestos"] if e.name == "guestos"
Expand Down
1 change: 0 additions & 1 deletion lib/vmdb_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'miq-extensions'
require 'miq-uuid'

require 'ostruct'
require 'fileutils'
Expand Down