Need help to convert Rules from BIG-IP v4 to v9

class cluster3_class {

“app=pp-”

“app=ers-engpptrans”

}

class cluster1_class {

“app=spt-”

}

rule Rule {

if (tolower(http_uri) contains one of cluster1_class or http_cookie(“BIGipServercluster1_Pool”)) {

use pool cluster1_pool

}

else if (tolower(http_uri) contains one of cluster3_class or http_cookie(“BIGipServercluster3_Pool”)) {

use pool cluster3_Pool

}

else {

use pool AllClusters

}

}

This should get you started…

when HTTP_REQUEST {
  if { [matchclass [string tolower [HTTP::uri]] contains $::cluster1_class] or
       [HTTP::cookie exists "BIGipServercluster1_Pool"] } {
    pool cluster1_pool
  } elseif { [matchclass [string tolower [HTTP::uri]] contains $::cluster3_class] or
       [HTTP::cookie exists "BIGipServercluster3_Pool"] } {
    pool cluster3_Pool
  } else {
    pool AllClusters
  }
}

-Joe

Thanks Joe.

Btw is there any list of command reference for iRules

Everything is documented over in the wiki along with code samples and tech tips.

http://devcentral.f5.com/Wiki/default.aspx/iRules/iRulesReference.html

Click here

You might also want to check the iRules Page that has some of the most recent iRules content along with links to almost everything else. Just click iRules under the “Docs” menu.

-Joe