all is a
tmsh ltm profile ramcache
option, not a catch-all meta symbol like
*. If you specify a ramcache profile
/Test/all, for example, BIG-IP (tmsh) looks for the profile named
all under the partition
/Test. If it does not find it, it reports
Invalid profile name
error. This is the reason why an iControl REST request to
~Test~all gets an error.
The all option is applied to the current partition in
tmsh show ltm profile ramcache
command. To change the partition, you need to run
cd
command in tmsh. The following example demonstrates the behaviour.
for part in " " "cd /Test;" "cd /Common;"; do echo --$part && echo "$part; \
show ltm profile ramcache all" | tmsh | egrep 'URI|Ltm::Ramcache' | grep -v apm-enduser; done
-- <<< default parition = /Common
Ltm::Ramcaches /Common/webacceleration
URI : /index.html
URI : /cookie.html
URI : /
--cd /Test;
Ltm::Ramcaches /Test/myweb
URI : /index.html
URI : /cookie.html
URI : /
Ltm::Ramcaches /Test/myweb2
URI : /index.html
URI : /cookie.html
URI : /
--cd /Common;
Ltm::Ramcaches /Common/webacceleration
URI : /index.html
URI : /cookie.html
URI : /
Unfortunately, we cannot use the tmsh
cd
command in iControl REST, hence
all can only be used for the default partition
/Common: e.g.,
curl -sku admin:passwd https://localhost/mgmt/tm/ltm/profile/ramcache/all/stats \
| python -m json.tool | sed 's/\\n/\n/g;' | egrep 'URI|Ltm::Ramcache' | grep -v apm-enduser
"apiAnonymous": "Ltm::Ramcaches /Common/webacceleration
URI : /index.html
URI : /cookie.html
URI : /
Interestingly, the all option behaves differently when used in
delete
command. As you stated, it deletes all the entries in all the profiles under all the partitions. Not just the current partition. Again, you can't specify
partition plus
all (
/Test/all or
~Test~all😞 It's an option, not a wild-card.
A workaround is to loop around a list of ramcache profiles: e.g.,
for i in myweb myweb2; do curl -sku admin:passwd \
https://localhost/mgmt/tm/ltm/profile/ramcache/~Test~$i -X DELETE
I hope this clarifies some myths. Let me know if you have additional questions.
Cheers,
Satoshi
P.S. Interestingly, although the all option appears in tab completion, it is not explained in the
tmsh help ltm profile ramcache
.