cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1602
Views
0
Helpful
1
Replies

EEM menu not prompting for input

CiscoBill101
Level 1
Level 1

Hi, I have the following EEM menu, I can't work out why it doesn't wait for my input, either 1, 2 or 3 and just runs though.

event manager applet menu

event none

action 0   puts "  ****************************Menu***************************"  

action 1   puts "  *                                                                           *"

action 2   puts "  * Please select an option below :                             *"

action 3   puts "  *                                                                           *"

action 4   puts "  * 1 Option A                                                          *"

action 5   puts "  * 2 Option B                                                          *"

action 6   puts "  * 3 Option C                                                          *"

action 7   puts "  *                                                                           *"

action 8   puts "  ***********************************************************"

action 9   gets opt

action 10  if $opt eq 1 goto 800

action 11  if $opt eq 2 goto 900

action 12  if $opt eq 3 goto 950

action 800 puts "Displaying 802.1x stats"

action 801 cli command "sh dot1x all summary"

action 802 puts "$_cli_result"

action 803 exit

action 900 puts "Please enter the interface to remove 802.1x from"

action 901 gets opt

action 902 cli command "enable"

action 903 cli command "conf t"

action 904 cli command "interface $opt"

action 905 cli command "No authentication port-control auto"

action 906 exit

action 950 puts "Please enter the interface to apply 802.1x to"

action 951 gets opt

action 952 cli command "enable"

action 953 cli command "conf t"

action 954 cli command "interface $opt"

action 955 cli command "authentication port-control auto"

action 956 exit

Thanks

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

The first problem you have is that your labels are sorted numerically, not in lexicographical order.  You will need to renumber actions 0 through 12 as 000 through 012 respectively.  Finally, consider adding a longer maxrun and default time to this policy since the user may not answer immediately:

event none maxrun 120 default 120

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: