Skip to content

Commit

Permalink
Merge pull request #21073 from agrare/replace_host_validate_destroy_w…
Browse files Browse the repository at this point in the history
…ith_supports_feature

Replace validate_destroy with supports feature
  • Loading branch information
chessbyte authored Feb 22, 2021
2 parents 2b40b57 + 7cbd2c0 commit 67e5479
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/models/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class Host < ApplicationRecord
before_create :make_smart
after_save :process_events

supports :destroy
supports :reset do
unsupported_reason_add(:reset, _("The Host is not configured for IPMI")) if ipmi_address.blank?
unsupported_reason_add(:reset, _("The Host has no IPMI credentials")) if authentication_type(:ipmi).nil?
Expand Down Expand Up @@ -1728,10 +1729,6 @@ def normalized_state
"unknown"
end

def validate_destroy
{:available => true, :message => nil}
end

def self.display_name(number = 1)
n_('Host', 'Hosts', number)
end
Expand Down

0 comments on commit 67e5479

Please sign in to comment.