Changeset 195

Show
Ignore:
Timestamp:
07/30/08 18:54:57 (4 months ago)
Author:
pwh
Message:
  • Allow IPv4 networks to be associated with sites
Files:

Legend:

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

    r168 r195  
    3939  The network mask of this IPv4 address in long integer format. 
    4040 
     41[site_id] 
     42  The site in which this network is located, or nil if it spans multiple sites. 
     43 
    4144[ipvpn_id] 
    4245  A foreign key holding the primary key of IPVPN (or VRF) to which this network belongs. 
     
    5356 
    5457class Ipv4Network < ActiveRecord::Base 
     58 
     59  belongs_to :site 
    5560 
    5661  validates_presence_of :network_address, :network_mask 
  • nethorus/app/models/site.rb

    r168 r195  
    2929 
    3030  has_many :device 
     31  has_many :ipv4_network 
    3132 
    3233  validates_presence_of :description