cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

255
Views
0
Helpful
0
Replies
Highlighted
Beginner

Cisco EEM nested block [Version 4.00]

[UPDATE 04/03/2018]

Problem has been resolved

 

Hi everyone,

I made script which pinging some IP's. The problem is with action end in conditional block because it causing problem with script triggering (getting error: "else" found without matching "if" action) .

 

Sample structure of my script:

foreach loop_variable_name

   cli command ping...

   if first_operand gt  
        puts

        ......

        ......

   foreach loop_variable_name
      cli command ping
      if first_operand gt

      puts

      ........

      ........

  else

      puts

      .......

  end  

   else

      puts

     .......

 

     end

   end

 end

 

I have no problem with script working when I'm using construction:
    foreach

        if
        else

     end

   end

 

Anyone can tell me how to properly close the condition block with end action? Appreciate any help.

Everyone's tags (4)
CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards