Skip to content

Commit

Permalink
Last rss_fails_policy caller was removed circa 2008
Browse files Browse the repository at this point in the history
;-)

e9328983b3104
BugzID: 2678
Removed RSS feed for vms that fail basic policy, per ***

git-svn-id: http://miq-ubuntusub.manageiq.com/svn/svnrepos/Manageiq/trunk@7851 3c68ef56-dcc3-11dc-9475-a42b84ecc76f

Fixes ManageIQ#22778
Deprecated ManageIQ#18478
UI removed callers in ManageIQ/manageiq-ui-classic#5271
  • Loading branch information
jrafanie committed Sep 10, 2024
1 parent 617c3d9 commit 1dd0e4c
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions app/models/vm_or_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,30 +610,6 @@ def service_pack
name
end

# Generates the contents of the RSS feed that lists VMs that fail policy
def self.rss_fails_policy(_name, options)
order(options[:orderby]).limit(options[:limit_to_count]).each_with_object([]) do |vm, result|
rec = OpenStruct.new(vm.attributes)
if vm.host.nil?
rec.host_name = "unknown"
else
rec.host_name = vm.host.name
end
rec.vm_id = vm.id
rec.reason = []
presult = vm.enforce_policy("rsop")
if presult[:result] == false
presult[:details].each do |p|
rec.reason.push(p["description"]) unless p["result"]
end
if rec.reason != []
rec.reason = rec.reason.join(", ")
result.push(rec)
end
end
end
end

def vendor_display
VENDOR_TYPES[vendor]
end
Expand Down

0 comments on commit 1dd0e4c

Please sign in to comment.