Forum Discussion

7 Replies

  • Hi Robert, Sorry if this is not, but, you're asking about writing irule into user partitions?
  • Right now, the iRule Editor defaults to the partition selected under the file menu. If you change the partition there, then all subsequent actions will happen in that partition.

     

    -Joe

     

  • No, I am asking about writing irule into subfolder such as /partition_name/folder_name/irule_name
  • Right now that feature isn't available in the Editor. I'll put that on my list of enhancements for a future update. If you have a need for a faster update, the source for the Editor is available for a custom build.

     

    -Joe

     

  • which part should I change? any instruction?

     

    what api is used to call irule under folder?

     

  • I haven't done much with folders in a while but I think you can either call the System.Session.set_active_folder() method with a path to default to (ie. /my/folder/path) and then create the object with a single name (myirule), or pass in the full path to the created object (/my/folder/path/myirule).

     

    For the editor, I would likely just add a new extension to the File.Partition menu which

     

    1) queries the Management.Folder.get_list() method for all available folders 2) Add an option to "create" a folder that then prompts for a path and then calls the Management.Folder.create() method. 3) When user selects a folder (much like the partition), it calls the System.Session.set_active_folder().

     

    It will likely require some refreshes of the tree view when things are selected or changed.

     

    Or you could wait until I get to the next update in the next few months or so...

     

    -Joe