Forum Discussion
Sean_Ellis_9378
Nimbostratus
Sep 26, 2012Dumping contents of a class
I have a few classes which I need to retrieve from some BIG-IP systems. I would like to do this via curl, so I set up a virtual service on each and applied an iRule. Here is the TCL I was testing wit...
Kevin_Stewart
Employee
Sep 26, 2012Not sure about the error, but there's probably a simpler way to get class values using the 'class get' command:
when HTTP_REQUEST {
set tv1db "rdDB"
if { [class exists $tv1db] } {
set testResponse "\n"
foreach x [class get $tv1db] {
append testResponse $x "\n"
}
HTTP::respond 200 content $testResponse "Content-Type" "text/html" "pragma" "no-cache" "Connection" "Close"
}
}
Your HTTP::respond command is also outside of your conditions, so it's possible that testResponse may may not exist in some scenarios.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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