Forum Discussion

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Ed - yeah that's possible. You just need to disable Strict Updates, else it will complain and won't let you make the change.

     

    If you do go back into the iApp and amend anything in here, under Reconfigure, then any custom changes like this are reset.

     

    N

     

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    Don't disable strictness. Re-code your iApp! In presentation, change your "choice" to a "multichioce", for example:

     

    multichoice reuse_monitor_name display "xlarge" tcl { 
        tmsh::run_proc f5.app_utils:get_ltm_monitors_filter http https tcp 
    }

    and in implementation, change the tmsh statement to add your list of monitors, separated by the word "and". For example:

    set monitor_name [list \
            [join $::server_pools__reuse_monitor_name " and "]]

     

    • Ed_Carpon_13196's avatar
      Ed_Carpon_13196
      Icon for Nimbostratus rankNimbostratus
      I appreciate the help but i cannot seem to get this working how you stated. I am attempting to duplicate the f5 HTTP template. Below is what I am editing from the presentation section. optional ( create_new_monitor == "Use Monitor..." ) { choice reuse_monitor_name display "xlarge" tcl { package require iapp 1.0.0 return "[iapp::get_items ltm monitor http]\n[iapp::get_items ltm monitor https]" Just doing this does not change how it looks when you select the edited iApp template.
    • Fred_Slater_856's avatar
      Fred_Slater_856
      Historic F5 Account
      If you replace the keyword "choice" with "multichoice", do you see the change in presentation?
  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    A simple change to the implementation will allow existing monitors to work. Replace:

     

            1,0,1 { monitor $::monitor__monitor }
            1,0,0 { monitor $::monitor__monitor }
    with:
            1,0,1 { monitor [join $::monitor__monitor " and "] }
            1,0,0 { monitor [join $::monitor__monitor " and "] }

    The "Create a new HTTP monitor" option is trickier to mix with the others, and would take more code changes.

     

    • Ed_Carpon_13196's avatar
      Ed_Carpon_13196
      Icon for Nimbostratus rankNimbostratus
      Awesome this works. If you select 'Create a new HTTP monitor' from the options it looks like it doesnt actually prompt like before. Is there a way to get that back in addition to having the multichoice? Appreciate all of the help.
    • Fred_Slater_856's avatar
      Fred_Slater_856
      Historic F5 Account
      Easiest way is probably to split the questions. First ask if the user wants to "Create New" or "Select from existing", then show the multichoice only if the user selects " from existing".
    • Ed_Carpon_13196's avatar
      Ed_Carpon_13196
      Icon for Nimbostratus rankNimbostratus
      I was able to create the separate question successfully in the presentation section, but it looks like I am still having issues in the Implementation section for monitor1. Presentation section monitor { multichoice monitor display "xxlarge" tcl { package require iapp 1.0.0 set choices "[iapp::get_items ltm monitor http]\n[iapp::get_items ltm monitor https]\n[iapp::get_items -filter NAME != "external" ltm monitor external]" return $choices } choice monitor1 display "xxlarge" default "/create_new" tcl { package require iapp 1.0.0 set choices "/create_new" return $choices } optional ( ssl_encryption_questions.help == "max" ) { message monitor_max } optional ( monitor1 == "/create_new" ) { optional ( ssl_encryption_questions.legacy_advanced == "yes" || ssl_encryption_questions.advanced == "yes" ) { string frequency display "medium" required default "30" optional ( ssl_encryption_questions.help == "max" ) { message freq_max } choice http_method display "xxlarge" default "GET" optional ( ssl_encryption_questions.help == "max" ) { message method_max } } Implementation 1,1,1 { monitor1 [iapp::conf create ltm monitor $http_or_https \ ${app}_${http_or_https}_monitor \ defaults-from $http_or_https \ interval $::monitor__frequency \ timeout [expr { $::monitor__frequency * 3 + 1 } ] \ [expr { [iapp::is ::monitor__anonymous "no"] ? \ "username $::monitor__user password $::monitor__passwd" : "" }] \ send [iapp::substa send_string_arr($advanced,$http11,$http_post)]\ recv '$::monitor__response'] } 1,1,0 { monitor1 [iapp::conf create ltm monitor $http_or_https \ ${app}_${http_or_https}_monitor \ defaults-from $http_or_https \ interval 30 \ timeout 91 \ send [iapp::substa send_string_arr($advanced,$http11,$http_post)]\ recv '$::monitor__response'] } 1,0,1 { monitor1 [join $::monitor__monitor " and "]} 1,0,0 { monitor1 [join $::monitor__monitor " and "]} * { monitor1 none }
  • If you want multiple pool use the " and " command

    See below sample :

    modify ltm pool POOL_NAME CREATED_MONITOR_1 and CREATED_MONITOR_1 ---> TO MODIFY POOL

    create ltm pool POOL_NAME CREATED_MONITOR_1 and CREATED_MONITOR_1 ----> NEWLY CREATED POOL

     

    Hope it will help you