I’m stumbling a bit on something that seems to be quite easy to find in the docs of iControl but not for iCall… I have a TCL array of VIPs (name or IPs..I can do both) that I selected according to my specific criteria. How can I see if the route-advertisement option is already enabled or not for a VIP?
With iControl it was easy from the API: get_route_advertisement_state(VIP) → 1 = enabled, 0 = disabled
damn. seems this is the only way. the iControl API is much more structured and can address objects directly without needing to parse whole things. I guess F5 still has to improve on this side. thanks for the answer.
I will probably do this query once and store it in a hash array something like: array[“ip address”]=1 or 0 (for enabled/disabled). This saves me then the trouble for the other parsing I will do.
Thanks Alex. As always you’re keeping a close eye on my questions:)
set entity [tmsh::list /ltm virtual-address “My VIP here”] puts $entity set ohaoha [tmsh::get_field_value $entity mask] puts “nothing==$ohaoha” }
The entity works and if I do puts it shows: ltm virtual-address my-IP { address my-IP mask 255.255.255.255 route-advertisement enabled traffic-group Redundant unit 2 }
the ohaoha testing part did not work…tested with mask/route-advertisement/etc Anything I might be missing out in the syntax ?
The error given is: can’t eval proc: “script::run” unexpected TCL object type while executing “tmsh::get_field_value $entity mask” (procedure “script::run” line 22) invoked from within
set entity [tmsh::list /ltm virtual-address “My VIP here”] puts $entity set ohaoha [tmsh::get_field_value $entity mask] puts “nothing==$ohaoha” }
The entity works and if I do puts it shows: ltm virtual-address my-IP { address my-IP mask 255.255.255.255 route-advertisement enabled traffic-group Redundant unit 2 }
the ohaoha testing part did not work…tested with mask/route-advertisement/etc Anything I might be missing out in the syntax ?
The error given is: can’t eval proc: “script::run” unexpected TCL object type while executing “tmsh::get_field_value $entity mask” (procedure “script::run” line 22) invoked from within
the ohaoha testing part did not work…tested with mask/route-advertisement/etc
Anything I might be missing out in the syntax ? The error given is:
can't eval proc: "script::run"
unexpected TCL object type
while executing
"tmsh::get_field_value $entity mask"
(procedure "script::run" line 22)
invoked from within
I can’t edit this one and the duplicate that was added by itself for reformatting…somehow it gives an error..please ignore..I will report it so that someone who has more rights removes it (suppose something went wrong on the server side).
set obs [tmsh::get_config /ltm virtual-address ip-address]
which should return an object in the format that the scripting engine expects..but ran into the same error (probably I’m not getting the syntax right) when trying to do get_field_value/get_field_name on it.
I used get_config instead as the tmsh::list does not provide the data in the object format that I can then parse / extract easily with the get_field_value command.
I used get_config instead as the tmsh::list does not provide the data in the object format that I can then parse / extract easily with the get_field_value command.