CSV Tabular Data Sideband Importer
Problem this snippet solves: This iRule adds the ability to import CSV-formatted tabular data to a table via an HTTP sideband connection.
The implementation is described in George Watkins' article...
Published Mar 17, 2015
Version 1.0George_Watkins_
Historic F5 Account
Joined September 17, 2008
George_Watkins_
Historic F5 Account
Joined September 17, 2008
Nikoolayy1
Jun 24, 2021MVP
Because of some errors [use curly braces to avoid double substitution] like the ones in https://support.f5.com/csp/article/K57410758 I have replaced line 29, 62 and 63.
Old code:
if { [expr [clock seconds]-$last_refresh] > $static::db_cache_timeout } {
---------------------
set key [string range $field 0 [expr $sep_offset - 1]]
set value [string range $field [expr $sep_offset + 1] end]
New code:
set time_now [clock seconds]
set test_var [expr {${time_now} - ${last_refresh}}]
if { ${test_var} > ${static::db_cache_timeout} } {
---------------
set key [string range $field 0 [expr {${sep_offset} - 1}]]
set value [string range $field [expr {${sep_offset} + 1}] end]