Class: Proxy::Omaha::PluginValidators::DistributionValidator

Inherits:
PluginValidators::Base
  • Object
show all
Defined in:
lib/smart_proxy_omaha/plugin_validators.rb

Instance Method Summary collapse

Instance Method Details

#validate!(settings) ⇒ Object

Raises:

  • (::Proxy::Error::ConfigurationError)


5
6
7
# File 'lib/smart_proxy_omaha/plugin_validators.rb', line 5

def validate!(settings)
  raise ::Proxy::Error::ConfigurationError, "Setting '#{@setting_name}' must be a supported Omaha distribution ('coreos' or 'flatcar')" unless ['coreos', 'flatcar'].include?(settings[@setting_name])
end