Forum Discussion
deltapez_21676
Nimbostratus
Feb 18, 2010Problem with external file
I'm having a problem retrieving data from an external file. The following loop displays the data out of order:
foreach { selectedpool } [class get pool_member_status_list] {
append response "$selectedpool \n"
}
I tried using $::pool_member_status_list instead of "[class get pool_member_status_list]" but both return the same out of order set of strings.
Any ideas welcome!
Thanks,
D
2 Replies
- hoolio
Cirrostratus
Hi D,
There isn't a guarantee of getting the datagroup contents back in the same order they're listed (whether using an internal or external datagroup). I think this is due to hashing that LTM performs when parsing the datagroup entries.
If you need to get them in a specific order, you could prepend a digit or letter to the class element and then sort by that. But I think that could be computationally expensive.
Out of curiosity, why do you need the elements back in order?
Aaron - deltapez_21676
Nimbostratus
Aaron,
I was interested in gathering the stats that come along with some of the pools but reported on separate lines. Working without them or pulling them via another method seems to be the best options.
Thanks,
D
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