Skip to content

Commit

Permalink
Merge pull request ManageIQ#14140 from yrudman/remove-miq-proxies-fro…
Browse files Browse the repository at this point in the history
…m-vm-or-template

Remove not used VmOrTemplate#miq_proxies and MiqServer#miq_proxy
  • Loading branch information
gtanzillo authored Apr 4, 2017
2 parents 9ef53d9 + 18daa4b commit 128926b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions app/models/miq_server/server_smart_proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ def print_backtrace(errStr)
errArray.each { |e| $log.error "Error Trace: [#{e}]" }
end

def miq_proxy
self
end

def forceVmScan
true
end
Expand Down
10 changes: 1 addition & 9 deletions app/models/vm_or_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def proxies4job(job = nil)
def log_proxies(proxy_list = [], all_proxy_list = nil, message = nil, job = nil)
log_method = proxy_list.empty? ? :warn : :debug
all_proxy_list ||= storage2proxies
proxies = all_proxy_list.collect { |a| "[#{log_proxies_format_instance(a.miq_proxy)}]" }
proxies = all_proxy_list.collect { |a| "[#{log_proxies_format_instance(a)}]" }
job_guid = job.nil? ? "" : job.guid
proxies_text = proxies.empty? ? "[none]" : proxies.join(" -- ")
method_name = caller[0][/`([^']*)'/, 1]
Expand Down Expand Up @@ -990,14 +990,6 @@ def has_proxy?
storage2proxies.any?
end

def miq_proxies
miqproxies = storage2proxies.collect(&:miq_proxy).compact

# The UI does not handle getting back non-MiqProxy objects back from this call.
# Remove MiqServer elements until we can support different class types.
miqproxies.delete_if { |p| p.class == MiqServer }
end

# Cache the servers because the JobProxyDispatch calls this for each Vm scan job in a loop
cache_with_timeout(:miq_servers_for_scan, 30.seconds) do
MiqServer.where(:status => "started").includes([:zone, :server_roles]).to_a
Expand Down

0 comments on commit 128926b

Please sign in to comment.