Forum Discussion

Prakash_90163's avatar
Prakash_90163
Icon for Nimbostratus rankNimbostratus
Apr 05, 2012

Perl script to create an Application service using f5.http template

Hi,

 

 

Do we have any Perl script available to create an Application service using f5.http template.

 

 

Thanks,

 

Prakash

 

 

  • Brent_Blood_768's avatar
    Brent_Blood_768
    Historic F5 Account
    Hi Prakash,

    Are you asking for a perl script that uses iControl to deploy a new application service via an iApp template? I don't think we have any examples of that in perl. If this is what you're after, let me know and I'll whip one up later.

    In case you're just looking for a way to deploy iApps from the command line you can do so via tmsh (and thus via a tmsh script as well). The rough syntax is:

    create sys application service my_service template my_template variables add { ... }

    For the full help on how to use that command, see "help sys application service" in tmsh.

    Cheers,

    -Brent
  • Hi Brent,

     

    You are correct, I am looking for perl script that uses iControl to deploy the application service via iAPP.

     

     

    Please let me know if someone can help.

     

     

    Thanks,

     

    Prakash
  • I have also following questions,

     

     

    1. I was looking at the help of iControl sdk but cannot find out which are the required parameters or which are the optional parameters given as a input to any method?

     

     

    Example: For method "Management::ApplicationService::create" there are 5 different parameter needs to be specified i.e apps, templates, scalar_vars, list_vars and table_vars. Are all these parameters are mandatory parameters to create the application service or is there any optional paramater among them?

     

     

    2. The structures scalar_vars, list_vars and table_vars are having members "name and values". Then what should be the name of the variables I can give to create the structures? Please note I am using "f5.http" template.
  • Brent_Blood_768's avatar
    Brent_Blood_768
    Historic F5 Account

    Hi Prakash,

     

     

    I wrote up an example and posted it here. Please take a look at it, as I think it probably answers your questions.

     

     

    Quick answers though:

     

     

    1. all parameters are required, though they can just be blank.

     

    2. the names correspond to the names of the variables as they are used in the iApp's implementation TCL script, and are formed as a combination of the section name, two underscores, and the input name in the APL.

     

     

    Cheers,

     

    -Brent