Sha256: 0ad5de65cfc4060d3d9e3ce445cdeb6eb998011ae520e1c432acaf14213492c7

Contents?: true

Size: 421 Bytes

Versions: 14

Compression:

Stored size: 421 Bytes

Contents

class DiscoveryAttributeSet < ActiveRecord::Base
  belongs_to :host, :class_name => "Host::Discovered", :foreign_key => :host_id
  attr_accessible :cpu_count, :disk_count, :disks_size, :memory

  validates :cpu_count, :presence => true, :numericality => {:greater_than_or_equal_to => 0}
  validates :memory, :presence => true,    :numericality => {:greater_than_or_equal_to => 0}
  validates :host, :presence => true
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
foreman_discovery-6.0.0 app/models/discovery_attribute_set.rb
foreman_discovery-5.0.2 app/models/discovery_attribute_set.rb
foreman_discovery-5.0.1 app/models/discovery_attribute_set.rb
foreman_discovery-5.0.0 app/models/discovery_attribute_set.rb
foreman_discovery-4.1.2 app/models/discovery_attribute_set.rb
foreman_discovery-4.1.1 app/models/discovery_attribute_set.rb
foreman_discovery-4.1.0 app/models/discovery_attribute_set.rb
foreman_discovery-4.0.0 app/models/discovery_attribute_set.rb
foreman_discovery-2.0.2 app/models/discovery_attribute_set.rb
foreman_discovery-2.0.1 app/models/discovery_attribute_set.rb
foreman_discovery-3.0.0 app/models/discovery_attribute_set.rb
foreman_discovery-2.0.0 app/models/discovery_attribute_set.rb
foreman_discovery-2.0.0.rc2 app/models/discovery_attribute_set.rb
foreman_discovery-2.0.0.rc1 app/models/discovery_attribute_set.rb