Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Questions and Answers

Loading... Loading...


I've created an iApp which allows for additional VS's to be created if required. However building the code is quite cumbersome if you wanted to allow X number of VS's. The manual process requires that I have to copy and paste code for each of the new VS's, result in a many lines of code. From an administration point this is a night mare. Any ideas how I could rather dynamically create more VS's if required..


For example (presentation code):

noyes add_vs

   optional ( add_yes == "Yes" ) {

        choice nbr_vs { "1", "2", "3", "4", "5", "6" }



Then one could write a single section in the presentation code which will require user to complete VS specifics based on the nbr_vs value selected above. Similarly I would like to write one proc (procedure) in the implementation code which can be re-used, also based on the nbr_vs value selected above.


Does this seem possible or is the manual method the only way to do this? I've looked at other templates (e.g. Citrix and Exchange but it's all manual creation when one wants to use mulitple VS's)




2 Answer(s):

You can create a reusable proc in a cli script which you can include in your iApps. in TMSH, navigate to '/cli script'. From there you can create your script with a create command. You can then include this script in just the same way that the built-in templates include the app_utils script. Once you have included it, you will be able to call and procs in that script from that iApp.

I am not entirely certain what you want to know for the rest of your question. Can you tell me how you are using the terms manual and dynamic method. In my parlance, creating objects by the manual method means going it through the regular UI and doing it in an automated way means doing it with an iApp. How are you using these terms? Can you maybe pose a more specific code question? There are a great many ways that the code could be written to create a number of VSs, and it all depends on your specific needs.
Hi Mitra,

Thanks for your response. In the presentation code I'm currently nesting questions. This involves copying and pasting static code (this is what I'm referring to as a manual process). I believe that in APL there is no way to write a script with a loop so that it is used multiple times.

With regards to the Implementation code I have duplicated a proc and made the necessary code adjustments to handle the additional vs nesting questions. I was wondering if there is a loop script which could be used in tcl to create the additional vs's? The naming convention of the vs's will differ though :(


Your answer:

You must be logged in to reply. You can login here.