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

Cisco EEM nested block [Version 4.00]

kamil.swedrak
Level 1
Level 1

[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.

0 Replies 0
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: