Forum Discussion
Ronald_van_der_
Jun 25, 2015Nimbostratus
I assume you are referring to variables. You might want to have a look here: https://devcentral.f5.com/articles/-the101-irules-101-variables
- sarat_82132Jun 26, 2015Nimbostratuslet me give my example There are two Vservers vserver-1 is for all sales applications and vserver-2 is for all marketing applications. there is one IRule ( code snippet below ) which needs to fetch different data groups. The way I solved this is by creating two Irule Instances f5 and assocate irule-1 to vserver-1 and irule-2 to vserver-2. all the contents are excatly same for irule-1 and irule-2 except the value of the dg_application_list_name ( example below) . if this value somehow can be read from the Vserver, that will be very useful. when HTTP_REQUEST priority 100 { set dg_application_list_name "sales-applications" set dg_application_list [class get $dg_application_list_name]}] foreach { row } $dg_application_list { do something } } when HTTP_REQUEST priority 100 { set dg_application_list_name "marketing-applications" set dg_application_list [class get $dg_application_list_name]}] foreach { row } $dg_application_list { do something } }
- Ronald_van_der_Jun 29, 2015NimbostratusOk, so if I understand correctly, you want to use a VS-configuration 'item' as the value. In other words, use a global iRule for multiple VS' and based on the VS (name e.g.) change the 'value'?