Class: Proxy::DHCP::Infoblox::RecordTypeValidator

Inherits:
PluginValidators::Base
  • Object
show all
Defined in:
lib/smart_proxy_dhcp_infoblox/record_type_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate!(settings) ⇒ Object

Raises:

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


3
4
5
6
# File 'lib/smart_proxy_dhcp_infoblox/record_type_validator.rb', line 3

def validate!(settings)
  return true if ['host', 'fixedaddress'].include?(settings[:record_type])
  raise ::Proxy::Error::ConfigurationError, "Setting 'record_type' can be set to either 'host' or 'fixedaddress'"
end