Difference between revisions of "Freeside:3:Documentation:Developer/FS/part export/sqlradius"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
m (Edit via perl MediaWiki framework (1.13))
Line 15: Line 15:
  
 
:Returns an arrayref of hashrefs with the following fields:
 
:Returns an arrayref of hashrefs with the following fields:
:; username:; framedipaddress:; acctstarttime:; acctstoptime:; acctsessiontime:; acctinputoctets:; acctoutputoctets:; calledstationid; update_svc; export_nas_insert NAS; export_nas_delete NAS; export_nas_replace NEW_NAS OLD_NAS
+
:; username:; framedipaddress:; acctstarttime:; acctstoptime:; acctsessiontime:; acctinputoctets:; acctoutputoctets:; callingstationid:; calledstationid; update_svc; export_nas_insert NAS; export_nas_delete NAS; export_nas_replace NEW_NAS OLD_NAS
 
:Update the NAS table (allowed RADIUS clients) on the attached RADIUS server. Currently requires the table to be named 'nas' and to follow the stock schema (/etc/freeradius/nas.sql).
 
:Update the NAS table (allowed RADIUS clients) on the attached RADIUS server. Currently requires the table to be named 'nas' and to follow the stock schema (/etc/freeradius/nas.sql).
 
; export_attr_insert RADIUS_ATTR; export_attr_delete RADIUS_ATTR; export_attr_replace NEW_RADIUS_ATTR OLD_RADIUS_ATTR
 
; export_attr_insert RADIUS_ATTR; export_attr_delete RADIUS_ATTR; export_attr_replace NEW_RADIUS_ATTR OLD_RADIUS_ATTR

Revision as of 05:48, 10 February 2015

usage_sessions HASHREF; usage_sessions TIMESTAMP_START TIMESTAMP_END [ SVC_ACCT [ IP [ PREFIX [ SQL_SELECT ] ] ] ]
New-style: pass a hashref with the following keys:
stoptime_start - Lower bound for AcctStopTime, as a UNIX timestamp
; stoptime_end - Upper bound for AcctStopTime, as a UNIX timestamp:; session_status - 'closed' to only show records with AcctStopTime, 'open' to only show records without AcctStopTime, empty to show both.:; starttime_start - Lower bound for AcctStartTime, as a UNIX timestamp:; starttime_end - Upper bound for AcctStartTime, as a UNIX timestamp:; svc_acct:; ip:; prefix
Old-style:
TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.
SVC_ACCT, if specified, limits the results to the specified account.
IP, if specified, limits the results to the specified IP address.
PREFIX, if specified, limits the results to records with a matching Called-Station-ID.
  1. SQL_SELECT defaults to * if unspecified. It can be useful to set it to #SUM(acctsessiontime) or SUM(AcctInputOctets), etc.
Returns an arrayref of hashrefs with the following fields:
username
; framedipaddress:; acctstarttime:; acctstoptime:; acctsessiontime:; acctinputoctets:; acctoutputoctets:; callingstationid:; calledstationid; update_svc; export_nas_insert NAS; export_nas_delete NAS; export_nas_replace NEW_NAS OLD_NAS
Update the NAS table (allowed RADIUS clients) on the attached RADIUS server. Currently requires the table to be named 'nas' and to follow the stock schema (/etc/freeradius/nas.sql).
export_attr_insert RADIUS_ATTR; export_attr_delete RADIUS_ATTR; export_attr_replace NEW_RADIUS_ATTR OLD_RADIUS_ATTR
Update the group attribute tables (radgroupcheck and radgroupreply) on the RADIUS server. In delete and replace actions, the existing records are identified by the combination of group name and attribute name.
In the special case where attributes are being replaced because a group name (FS::radius_group->groupname) is changing, the pseudo-field 'groupname' must be set in OLD_RADIUS_ATTR.
export_group_replace NEW OLD
Replace the FS::radius_group object OLD with NEW. This will change the group name and priority in all radusergroup records, and the group name in radgroupcheck and radgroupreply.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 591:
'=item' outside of any '=over'