Forum Discussion
Sam_Hall
Nimbostratus
Jul 29, 2013Can iApps display a textarea parameter?
I've figured out how to create a hard coded iRule from within an iApp. Now I'm wondering is it possible to allow the user to manage the iRule directly from the iApp configuration screen. Otherwise, i...
Brent_Blood_768
Jul 30, 2013Historic F5 Account
I failed to answer all of your questions, sorry.
Otherwise, is there any way to avoid the need to disable strict updates to edit an iRule created via an iApp?
That depends on what version you're running. I forget when it was introduced (maybe v11.3?) but the "app-service" property of an object is now writable. When creating an object via tmsh::create, you can now manually set this property to "none" (you might need to create the object outside of your app's folder by prepending "/Common" to the name - or building that prefix dynamically using tmsh::pwd if you're using admin partitions) which will cause the object to not be owned by the iApp - and thus allowing external edits without disabling strictness. This has much of the same danger as disabling strictness, only it protects the rest of the service's objects. If you do this, be aware that the next time your iApp runs it'll still try to overwrite this object unless you carefully handle the situation in your code.
When I create an iRule from within the iApp is there anyway to prevent it from being reconfigured?
I think I understand your question: you want to have an iApp template create an iRule when the service is first created, but then to leave it alone on subsequent runs. Is that right?
This is possible, but not very easily, and not without some hackery. It's not easy for an iApp implementation to detect if it's being submitted for the first time for a given service, or if the template has been re-entered and it's a resubmission. It's the 99+% case that a run through the implementation for a given iApp doesn't care whether it's creating new objects or overwriting old ones - the underlying framework handles doing "the right thing" generally. However, if you want to make an iApp only create objects on the first run for a service, you can manually inject a variable into the application service object (off the top of my head, something close to: "tmsh::modify sys app service ${tmsh::app_name}.app/${tmsh::app_name} variables add \{ first \{ value false \} \}"), and then look for that variable earlier in the implementation. If it's not there, it's the first run - otherwise it's a subsequent run and you should skip creating the iRule.
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