Forum Discussion
Sergio000_19532
Jan 19, 2018Nimbostratus
Datagroup into variable
Hi I am making an Irule and I need to set the value of a datagroup into a variable.
Something like this
set url [RESOLV::lookup @8.8.8.8 domains]
I want that the varaible url gets the value...
Lee_Sutcliffe
Jan 23, 2018Nacreous
In this example, you have a datagroup called 'domains' and a record, 'mydomain.com' which has a value of '10.1.1.1'
ltm data-group internal domains {
records {
mydomain.com {
data 10.1.1.1
}
}
type string
}
In an iRule, you can use the -value switch to return the value in a datagroup, rather than a Boolean match when using the class command
The following code will set a variable 'url' to '10.1.1.1'
set url [class match -value "mydomain.com" equals "domains"]
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects