6 #use FS::Record qw( qsearch qsearchs );
12 FS::nas - Object methods for nas records
18 $record = new FS::nas \%hash;
19 $record = new FS::nas {
21 'nasip' => '10.4.20.23',
22 'nasfqdn' => 'box1.brc.nv.us.example.net',
25 $error = $record->insert;
27 $error = $new_record->replace($old_record);
29 $error = $record->delete;
31 $error = $record->check;
33 $error = $record->heartbeat($timestamp);
37 An FS::nas object represents an Network Access Server on your network, such as
38 a terminal server or equivalent. FS::nas inherits from FS::Record. The
39 following fields are currently supported:
43 =item nasnum - primary key
47 =item nasip - NAS ip address
49 =item nasfqdn - NAS fully-qualified domain name
51 =item last - timestamp indicating the last instant the NAS was in a known
52 state (used by the session monitoring).
62 Creates a new NAS. To add the NAS to the database, see L<"insert">.
64 Note that this stores the hash reference, not a distinct copy of the hash it
65 points to. You can ask the object for a copy with the I<hash> method.
69 # the new method can be inherited from FS::Record, if a table method is defined
75 Adds this record to the database. If there is an error, returns the error,
76 otherwise returns false.
80 # the insert method can be inherited from FS::Record
84 Delete this record from the database.
88 # the delete method can be inherited from FS::Record
90 =item replace OLD_RECORD
92 Replaces the OLD_RECORD with this one in the database. If there is an error,
93 returns the error, otherwise returns false.
97 # the replace method can be inherited from FS::Record
101 Checks all fields to make sure this is a valid example. If there is
102 an error, returns the error, otherwise returns false. Called by the insert
107 # the check method should currently be supplied - FS::Record contains some
108 # data checking routines
113 $self->ut_numbern('nasnum')
114 || $self->ut_text('nas')
115 || $self->ut_ip('nasip')
116 || $self->ut_domain('nasfqdn')
117 || $self->ut_numbern('last');
120 =sub heartbeat TIMESTAMP
122 Updates the timestamp for this nas
127 warn "warning: heartbeat unimplemented!"
134 $Id: nas.pm,v 1.2 2000-11-07 15:00:37 ivan Exp $
138 The author forgot to customize this manpage.
142 L<FS::Record>, schema.html from the base documentation.