Revision e42aa400
Added by Trey Dockendorf almost 10 years ago
app/models/host/managed.rb | ||
---|---|---|
include HostTemplateHelpers
|
||
|
||
validates :ip, :uniqueness => true, :if => Proc.new {|host| host.require_ip_validation?}
|
||
validates :mac, :uniqueness => true, :format => {:with => Net::Validations::MAC_REGEXP}, :unless => Proc.new { |host| host.compute? or !host.managed }
|
||
validates :mac, :uniqueness => true, :mac_address => true, :unless => Proc.new { |host| host.compute? or !host.managed }
|
||
validates :architecture_id, :operatingsystem_id, :domain_id, :presence => true, :if => Proc.new {|host| host.managed}
|
||
validates :mac, :presence => true, :unless => Proc.new { |host| host.compute? or !host.managed }
|
||
validates :root_pass, :length => {:minimum => 8, :message => _('should be 8 characters or more')},
|
Also available in: Unified diff
fixes #5915 - Add support for Infiniband 64-bit MAC addresses