Forum Discussion
Patrick_Harring
Nimbostratus
Oct 09, 2013Is there an example of simple non-interactive iapp that configures a profile, monitor, node, pool, and virtual?
Greetings,
I was in a class recently where we used an iApp to change the configuration on the LTM. I thought this technique was brilliant because the actual amount of interaction with the device...
- Oct 09, 2013
This should work for you:
sys application template /Common/f5.hardcoded { actions { definition { html-help { } implementation { proc tmsh_create { args } { set args [join $args] puts "tmsh create $args" tmsh::create $args return [lindex $args [lsearch -glob $args "*_*"]] } tmsh_create ltm virtual ${tmsh::app_name}_vip \ destination 10.10.10.1:80 \ pool [tmsh_create ltm pool ${tmsh::app_name}_pool \ members replace-all-with \{ \ 10.1.1.1:80 \ 10.1.1.2:80 \ 10.1.1.3:80 \ \} \ load-balancing-mode least-connections-member \ monitor [tmsh_create \ ltm monitor http ${tmsh::app_name}_http]] \ persist replace-all-with \{[tmsh_create \ ltm persistence source-addr ${tmsh::app_name}_source_ip]\} \ profiles replace-all-with \{[tmsh_create \ ltm profile http ${tmsh::app_name}_http]\} \ ip-protocol tcp \ snat automap } macro { } presentation { section intro { message hello } text { intro "Hard-Coded Implementation" intro.hello " " "Just click Finished." } } role-acl none run-as none } } }
Fred_Slater_856
Oct 09, 2013Historic F5 Account
This should work for you:
sys application template /Common/f5.hardcoded {
actions {
definition {
html-help {
}
implementation {
proc tmsh_create { args } {
set args [join $args]
puts "tmsh create $args"
tmsh::create $args
return [lindex $args [lsearch -glob $args "*_*"]]
}
tmsh_create ltm virtual ${tmsh::app_name}_vip \
destination 10.10.10.1:80 \
pool [tmsh_create ltm pool ${tmsh::app_name}_pool \
members replace-all-with \{ \
10.1.1.1:80 \
10.1.1.2:80 \
10.1.1.3:80 \
\} \
load-balancing-mode least-connections-member \
monitor [tmsh_create \
ltm monitor http ${tmsh::app_name}_http]] \
persist replace-all-with \{[tmsh_create \
ltm persistence source-addr ${tmsh::app_name}_source_ip]\} \
profiles replace-all-with \{[tmsh_create \
ltm profile http ${tmsh::app_name}_http]\} \
ip-protocol tcp \
snat automap
}
macro {
}
presentation {
section intro {
message hello
}
text {
intro "Hard-Coded Implementation"
intro.hello " " "Just click Finished."
}
}
role-acl none
run-as none
}
}
}
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