Hello! I’m trying to modify radius iApp template to automatically create and assign an iRule to the virtual server. I’ve managed to create an iRule, but I can’t assign it to the server.
In the template there is the following code creating a virtual server: set supported_ports [set ::vs_pool_${service}__vs_port] foreach port $supported_ports { iapp::conf create ltm virtual ${tmsh::app_name}_${service}_${port} \ destination [iapp::destination $addr text$port] \ [iapp::substa mask($share_ip,$advanced)] \ ip-protocol udp \ [iapp::substa pool($create_new_pool,$override_monitor)] \ $profiles_action \ [iapp::substa snat($use_snat,$use_automap,$new_snatpool)] \ vlans-disabled \ vlans none \ [iapp::substa rules($attach_irules)] }
I’m trying to rewrite the last line to assign my iRule: set supported_ports [set ::vs_pool_${service}__vs_port] foreach port $supported_ports { iapp::conf create ltm virtual ${tmsh::app_name}_${service}_${port} \ destination [iapp::destination $addr $port] \ [iapp::substa mask($share_ip,$advanced)] \ ip-protocol udp \ [iapp::substa pool($create_new_pool,$override_monitor)] \ $profiles_action \ [iapp::substa snat($use_snat,$use_automap,$new_snatpool)] \ vlans-disabled \ vlans none \ rules RADIUS_persist }
iRule RADIUS_persist is created in the beggining of template with the following code: tmsh::create { ltm rule RADIUS_persist when CLIENT_ACCEPTED { set framed_ip [RADIUS::avp 8 ip4] set calling_station_id [RADIUS::avp 31 “string”] log local0. “request from $calling_station_id:$framed_ip” persist uie “$calling_station_id:$framed_ip” } }
When I’m trying to create iapp with my template i’m getting the following error: script did not successfully complete: (“RADIUS_persist” unexpected argument while executing "tmsh::create [string range $args 7 end] " (“create” arm line 1) invoked from within “switch -exact -- [string range $args 0 5] { create { tmsh::create [string range $args 7 end] } modify { tmsh::modify [string r…” (procedure “iapp::conf” line 14) invoked from within “iapp::conf create ltm virtual ${tmsh::app_name}_${service}_${port} destination [iapp::destination $addr $port] [iapp::substa mask($share_ip,$advance…” (procedure “configure_radius_deployment” line 114) invoked from within “configure_radius_deployment” invoked from within “subst $substa_out” invoked from within “if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] set substa_out [subst $substa_out] } else { …” (“uplevel” body line 3) invoked from within “uplevel { append ::substa_debug “\n$substa_in” if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] …” (procedure “iapp::substa” line 9) invoked from within “iapp::substa main($is_v11_3,$upgrade,$downgrade)” line:349)
What is the right way to assign an iRule to virtual server?