Changeset 198

Show
Ignore:
Timestamp:
08/01/08 11:54:14 (4 months ago)
Author:
pwh
Message:
  • IP VPN model: Add validations and documentation.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nethorus/app/helpers/ipvpns_helper.rb

    r140 r198  
    2727 
    2828module IpvpnsHelper 
     29 
     30 
     31  # Convert an MPLS Route Distinguisher (see RFC4364 section 4.2: Encoding 
     32  # of Route Distinguishers) in to integer format 
     33   
     34  def mpls_rd_human_to_integer(rd_human) 
     35   
     36  end 
     37   
     38   
     39  # Convert an MPLS Route Distinguisher (see RFC4364 section 4.2: Encoding 
     40  # of Route Distinguishers) in to human-readable format 
     41 
     42  def mpls_rd_integer_to_human(rd_int) 
     43   
     44  end 
     45 
    2946end 
  • nethorus/app/models/ipvpn.rb

    r168 r198  
    2020# 
    2121 
     22=begin rdoc 
     23 
     24An object representing an IP VPN, commonly used in an MPLS environment to 
     25differentiate routing table instances. 
     26 
     27[id] 
     28  A unique ID to represent this IP VPN. 
     29   
     30[ipvpn_rd] 
     31  The Route Distinguisher for this IP VPN. 
     32     
     33[ipvpn_name] 
     34  A human-readable name for this IP VPN. 
     35 
     36=end 
     37 
    2238class Ipvpn < ActiveRecord::Base 
    2339 
     40  validates_presence_of :ipvpn_rd 
     41  validates_presence_of :ipvpn_name 
     42 
    2443end