Skip to content

Commit

Permalink
Merge pull request #12324 from romanblanco/host_validate_reset
Browse files Browse the repository at this point in the history
Added reset validation to the Hosts base class
  • Loading branch information
mzazrivec authored Nov 1, 2016
2 parents 5ecfce5 + dd1d005 commit 1c51dd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ def validate_unset_node_maintenance
validate_unsupported("Maintenance mode is unavailable")
end

def validate_reset
validate_unsupported("Reset is unavailable")
end

def validate_unsupported(message_prefix)
{:available => false, :message => "#{message_prefix} is not available for #{self.class.model_suffix} Host."}
end
Expand Down

0 comments on commit 1c51dd8

Please sign in to comment.