RE: Hello, I want to know how to pass the value of variables

From: Tyson Scott <tscott_at_ipexpert.com>
Date: Fri, 21 Jan 2011 10:29:49 -0800

Can you please be a little more specific with what the goal you are trying
to accomplish is.

Regards,
 
Tyson Scott - CCIE #13513 R&S, Security, and SP
Managing Partner / Sr. Instructor - IPexpert, Inc.
Mailto: tscott_at_ipexpert.com

-----Original Message-----
From: nobody_at_groupstudy.com [mailto:nobody_at_groupstudy.com] On Behalf Of
Parahexen
Sent: Friday, January 21, 2011 6:21 AM
To: maskabouteem_at_cisco.com
Cc: ccielab_at_groupstudy.com
Subject: Hello, I want to know how to pass the value of variables EEM
applets?

For example,

Applet 1
event none
action 1 cli command "show ip route"
action 2 puts "$_cli_result"

Applet 2
event none
action 1 puts "($_cli_result from Applet 1)"

How to accomplish this goal?

I've tried three totally differnet ways but neither were working.

Method 1:

Applet 1
event none
action 1 cli command "show ip route"
action 2 policy 2 "$_cli_result"

Applet 2
event none
action 1 puts "$_none_argc"
action 2 puts "$_none_arg1"

Result:
$_none_argc = 1
$_none_arg1 = "$_cli_result"
(just string "$_cli_result" but not the value of this variable)

Method 2:

Applet 1
event none
action 1 cli command "show ip route"
action 2 cli command "enable"
action 3 cli command "event manager run 2 $_cli_result"

Applet 2
event none
action 1 puts "$_none_argc"
action 2 puts "$_none_arg1"

Result:
$_none_argc = 1
$_none_arg1 = "$_cli_result"
(just string "$_cli_result" but not the value of this variable)

Method 3:

Applet 1
event none
action 1 cli command "show ip route"
action 2 publish-event sub-system 798 type 1 arg1 "$_cli_result"

Applet 2
event application subsystem 798 type 1
action 1 puts "$_application_data1"

Result:
$_application_data1 = "$_cli_result"
(just string "$_cli_result" but not the value of this variable)

Method 4:

Maybe we can utilize the common event manager enviroment to share variables?
I did a few simple tries but failed.

I've totally been stuck here, please let me out, thank you!

Blogs and organic groups at http://www.ccie.net
Received on Fri Jan 21 2011 - 10:29:49 ART

This archive was generated by hypermail 2.2.0 : Tue Feb 01 2011 - 07:39:17 ART