Forum Discussion

chungyu_16122's avatar
chungyu_16122
Icon for Altostratus rankAltostratus
Mar 17, 2011

Create an External class file

Hi all

 

 

I am using an iRule to move traffic to different pools based on data group strings. Initially for testing used the GUI data group interface to create the class file.

 

 

But for production, we will have a over a thousand web subdirectories to point at a Drupal pool; so I want to use the external data group file.

 

 

But having alot of problems figuring out the syntax on how to list strings.

 

 

Inside the GUI

 

 

/dev/

 

/it/

 

/tmpdev/

 

 

works just fine, but when created an external file under /var/class, it would not parse past the first line.

 

 

Here is the iRule I am using:

 

 

when HTTP_REQUEST

 

 

{ if { [matchclass [HTTP::uri] contains ${::Drupal}] } {

 

pool CCS_Drupal

 

} else { pool CCS_Webnode }

 

}

 

 

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Nice Hamish, I'll have to re-post that if I can find it so folks can get their hands on it. Also keep in mind that the external class file format changed (for the better) in v10. So an updated version would definitely be worth it.

     

     

    Colin