Changeset 217

Show
Ignore:
Timestamp:
08/07/08 22:52:44 (4 months ago)
Author:
pwh
Message:
  • Added a Layer 2 VLAN model and a bridge forwarding table, plus associated tests
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nethorus/app/models/device.rb

    r186 r217  
    9090  has_many :event_logs 
    9191  has_many :ent_physical_elements 
     92  has_many :l2_vlans 
    9293  has_one :bridge, :dependent => :destroy 
    9394 
     
    107108                      :on => :update 
    108109 
     110  validates_numericality_of :snmp_version, 
     111                            :less_than_or_equal_to => 3, 
     112                            :greater_than_or_equal_to => 1, 
     113                            :allow_nil => :true 
     114 
    109115  validates_inclusion_of :snmpv3_security_level, 
    110116                         :in => %w{ noAuthNoPriv authNoPriv authPriv }, 
    111                          :allow_nil => true, 
     117                         :allow_nil => :true, 
    112118                         :message => "should be noAuthNoPriv, authNoPriv or authPriv" 
    113119 
    114120  validates_inclusion_of :snmpv3_auth_protocol, 
    115121                         :in => %w{ SHA MD5 }, 
    116                          :allow_nil => true, 
     122                         :allow_nil => :true, 
    117123                         :message => "should be SHA or MD5" 
    118124 
    119125  validates_inclusion_of :snmpv3_priv_protocol, 
    120126                         :in => %w{ DES AES }, 
    121                          :allow_nil => true, 
     127                         :allow_nil => :true, 
    122128                         :message => "should be DES or AES" 
    123129