Forum Discussion
F5 iRule to get data group address content values list
I managed to remove the brackets by simply getting the values. iRule looks like this now:
when HTTP_REQUEST {
HTTP::version 1.0
HTTP::header remove Accept-Encoding
switch -glob [string tolower [HTTP::uri]] {
"/azure.html" {
# Retrieve the Azure datagroup contents, send it in a HTTP 200 response
HTTP::respond 200 content [class names azure_ipv4_dg] "Content-Type" "text/html"
}
}
}
It now gives me something like this:
102.133.0.0/18 102.133.112.0/28 102.133.120.0/21 102.133.128.0/18 102.133.192.0/19 102.133.224.0/20 102.133.240.0/25 102.133.240.128/26 102.133.248.0/21 102.133.64.0/19 102.133.96.0/20 102.37.0.0/20 102.37.128.0/19 102.37.16.0/21 102.37.160.0/21 102.37.192.0/18 102.37.24.0/23 102.37.26.0/27 102.37.26.32/27 102.37.32.0/19 102.37.64.0/21 102.37.72.0/21 102.37.80.0/21 102.37.96.0/19
So the only thing I need is to replace space with line breaks. Any ideas?
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