From dd1d0051a545946bdcfc4caffbb9ee31a1daa7e5 Mon Sep 17 00:00:00 2001 From: Roman Blanco Date: Tue, 1 Nov 2016 09:14:10 +0100 Subject: [PATCH] Added reset validation to the Hosts base class --- app/models/host.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/host.rb b/app/models/host.rb index cdaaf68c635..23cd3166715 100644 --- a/app/models/host.rb +++ b/app/models/host.rb @@ -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