Skip to content

Commit

Permalink
Added reset validation to the Hosts base class
Browse files Browse the repository at this point in the history
  • Loading branch information
romanblanco committed Nov 1, 2016
1 parent 5ecfce5 commit dd1d005
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 dd1d005

Please sign in to comment.