Forum Discussion
Conver Data Group List to static variables
I am looking to convert the global variables listed in Data Group List to a list of static variables. I am doing this as the virtual server associated with a few iRules are accessing them that would demote CMP. I am planning to create an iRule having only RULE_INIT that would set the static variables. Is there a good migration plan or if there is a better way to do this, can anyone suggest? Thanks!
- Kevin_StewartEmployee
I am doing this as the virtual server associated with a few iRules are accessing them that would demote CMP
I'm not sure I understand this statement. If you're using [class ] syntax to query the data group, then that shouldn't be demoting CMP. I'd further add that if by chance it was demoting CMP, the act of accessing it RULE_INIT, if only to store the values somewhere else, would have the same effect.
In any case, to enumerate the values in a data group, you can use the class get command:
https://devcentral.f5.com/wiki/iRules.class.ashx
- Sriram_129909Nimbostratus
I have the following line in one of the iRule that the qkview data says should not use Global Variables.
elseif { ([HTTP::path] ends_with ".asp") or [matchclass [string tolower [HTTP::path]] contains $::Domain_collapse_uri_list] } {
I will change this line to use "class match" instead of matchclass. Is there any other change that I should do to this line? like not to use :: for the Variable?
- Kevin_StewartEmployee
Well, there's two things going on here. First, the matchclass command is deprecated in v10 and up, in favor of the new class match syntax. Second, since 9.4.4, you shouldn't use the $:: syntax to reference data groups. It may work in some versions, but it'd most definitely demote CMP.
- Sriram_129909Nimbostratus
Thanks. I read the same in F5 documentations also. Now, what I don't find is does this change to the iRule require a roboot?
- Kevin_StewartEmployeeIt should not, no.
Recent Discussions
Related Content
* 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