Forum Discussion
tidenz_92110
Nimbostratus
Jun 16, 2010irule data class reference issues 9.4.x to 10.1
Hi Guys,
We recently have migrated to v10.1 from 9.4.7 and we have broken our existing irule. The part that is braking is parsing the data class into an array for processing.
when...
hoolio
Cirrostratus
Jun 16, 2010In 10.x, you can no longer directly access a datagroup as a TCL list. For the same functionality, you can use [class get my_class]:
when RULE_INIT {
set this to 1 to enable maintenance
set ::MAINTENANCE 0
array unset ::ARRAY_REWRITE_NZ
array set ::ARRAY_REWRITE_NZ { }
array unset ::ARRAY_REDIRECT_NZ
array set ::ARRAY_REDIRECT_NZ { }
set ::SERIAL1 0
set ::SERIAL2 0
set ::REQ_COUNT 0
log local0.debug "-------- RULE INIT -------------"
if { [findclass "serial" URL_REWRITE_NZ_LIST "|"] != $::SERIAL1 }{
clear contents of previous mem resident table
array unset ::ARRAY_REWRITE_NZ
set ::SERIAL1 [findclass "serial" URL_REWRITE_NZ_LIST "|"]
log local0.debug "RELOADING UPDATED URI REWITE CLASS TO MEMORY"
foreach item [class get URL_REWRITE_NZ_LIST] {
set index [findstr $item "" 0 "|"]
set data [findstr $item "|" 1 "\n"]
set LIST "$index $data"
set ::ARRAY_REWRITE_NZ($index) $data
log local0.debug "Adding $index --> $data"
}
}
}
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects