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

Puts seems to output blank

s.louw
Level 1
Level 1

Consider the applets below.

One assigns a variable and one sends it to the CLI output.

The CLI output is bank.

Why is this?

 

event manager environment Var_3G_Unshut

event manager applet App_Set_Var_3G_Unshut

 event none

 action 2.0 set Var_3G_Unshut 1

event manager applet App_View_Var_3G_Unshut_CLI

 event none

 action 1.0 puts "Var_3G_Unshut is $Var_3G_Unshut"

 

The output is blank as mentioned:

c617rt19#event manager run App_View_Var_3G_Unshut_CLI
Var_3G_Unshut is 

 

I know from running an alterntive script with an if statement in it that the variable is greeter then 0 (Applet left off for clarity can post if requested)

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

Just because you set the value of an environment variable in a policy does not mean it will be set globally.  Environment variables are read-only.  If you want to set the value, you need to enter config mode and reconfigure it.