Teemu_Kunnari_1
Oct 16, 2017Nimbostratus
Datagroup content listing to a html page with an iRule
Hi,
I was wondering if anyone has an idea why my datagroup content listing page made with an iRule broke when customers services were moved from a big ip platform running version 11.6.1 to 12.1.2 HF1. The setup was moved from /common to a customer specific /customer1 partition. Could this have any impact why this is not working? Should there be some pointer to the partition?
Here is the iRule with namings modified:
when HTTP_REQUEST {
if { ([IP::client_addr] equals "1.2.3.4" ) and ([HTTP::uri] starts_with "/lista/") } {
set listaurl [string range [HTTP::uri] 7 end]
set lista customer1_$listaurl
if { [class exists $lista] } {
set response "Customer 1 datagroup list - [clock format [clock seconds]]
"
set response "$response [class names $lista]"
set response "$response
"
HTTP::respond 200 content $response "Content-Type" "text/html"
}
else {
set response "Customer 1 datagroup list - [clock format [clock seconds]]
"
set response "Non existent datagroup name"
set response "$response
"
HTTP::respond 200 content $response "Content-Type" "text/html"
}
}
}
Any help is greatly appreciated!
BR
Teemu