Revision 86bdf09d
Added by Ohad Levy about 12 years ago
- ID 86bdf09d37cd7a612697fd0cc58b75bb239d9c8d
app/models/host.rb | ||
---|---|---|
validates_format_of :sp_ip, :with => Net::Validations::IP_REGEXP, :allow_nil => true, :allow_blank => true
|
||
validates_format_of :serial, :with => /[01],\d{3,}n\d/, :message => "should follow this format: 0,9600n8", :allow_blank => true, :allow_nil => true
|
||
|
||
validates_presence_of :puppet_proxy_id
|
||
validates_presence_of :puppet_proxy_id, :if => Proc.new {|h| h.managed? } if SETTINGS[:unattended]
|
||
end
|
||
|
||
before_validation :set_hostgroup_defaults, :set_ip_address, :set_default_user, :normalize_addresses, :normalize_hostname
|
Also available in: Unified diff
refs #1503, ensures that puppet proxy is not required if you are not provisioning