Forum Discussion

Ross_79170's avatar
Ross_79170
Icon for Nimbostratus rankNimbostratus
Feb 17, 2012

import iApp template via icontrol

Hi All

 

 

Any suggestions on how to import an iapp downloaded from devcentral via icontrol? It imports easily enough via the gui, but I am struggling to find a simple method to perform this action within icontrol.

 

 

"Management :: ApplicationTemplate :: set_action_implementation" is along the right lines when combined with create(), but this seems focused on modifying individual functions. Whereas, I want to simply import a file in a similar way to importing an irule via icontrol.

 

 

Any thoughts? What aspect of the API have I missed?

 

 

Thanks!

 

 

Ross

 

 

 

4 Replies

  • There isn't a single iControl method for creating templates. There are 4 methods you need to look at in the Management.ApplicationTemplate interface

     

     

    create()

     

    set_action_implementation()

     

    set_action_presentation()

     

    set_action_presentation_help()

     

     

    The first step is to call the create() method to create an empty template. You then call the other three methods with the implementation code (tmsh), the presentation code (APL) and the help (HTML) using the action "definition". Currently there is only one action available but in the future we are looking at adding others.

     

     

    Not sure why the developers didn't create a single method to do the above 4 steps but they didn't.

     

     

    This is a great idea for a tech tip. I'll put this in my queue for the next week or so.

     

     

    -Joe

     

  • Just a heads up. I powered through a PowerShell example for importing/exporting iApps in .tmpl format. Be on the lookout for the entry in the Codeshare early next week with an associated Tech Tip on Thursday at 10:00am PST.

     

     

    -Joe

     

  • In case you didn't see it, here's the tech tip on interfacing with the .tmpl format with iControl:

     

     

    https://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/ArticleView/articleId/1088527/Managing-iApp-template-files-with-iControl.aspx

     

     

    -Joe

     

  • Sorry Joe, for some reason I missed your earlier email updates to my question. This is perfect! Thanks for taking the time to reply to me.

     

     

    Best Wishes

     

     

    Ross