Changeset 217
- Timestamp:
- 08/07/08 22:52:44 (4 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
nethorus/app/models/device.rb
r186 r217 90 90 has_many :event_logs 91 91 has_many :ent_physical_elements 92 has_many :l2_vlans 92 93 has_one :bridge, :dependent => :destroy 93 94 … … 107 108 :on => :update 108 109 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 109 115 validates_inclusion_of :snmpv3_security_level, 110 116 :in => %w{ noAuthNoPriv authNoPriv authPriv }, 111 :allow_nil => true,117 :allow_nil => :true, 112 118 :message => "should be noAuthNoPriv, authNoPriv or authPriv" 113 119 114 120 validates_inclusion_of :snmpv3_auth_protocol, 115 121 :in => %w{ SHA MD5 }, 116 :allow_nil => true,122 :allow_nil => :true, 117 123 :message => "should be SHA or MD5" 118 124 119 125 validates_inclusion_of :snmpv3_priv_protocol, 120 126 :in => %w{ DES AES }, 121 :allow_nil => true,127 :allow_nil => :true, 122 128 :message => "should be DES or AES" 123 129
