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

Use EEM script to create another EEM Script?

emory.clayton
Beginner
Beginner

The switch accepts all commands until action 11.0. I believe it's because of the additional quotes. Is there a way around this?

event manager applet CODE_DOWNLOAD
event syslog pattern "IOSD_INFRA-6-IFS_DEVICE_OIR: Device usbflash"
action 1.0 cli command "term len 0"
action 1.5 puts "EEM Script CODE_DOWNLOAD Executing"
action 2.0 cli command "enable"
action 2.5 puts "Copying cat9k_iosxe.17.06.04.SPA.bin..."
action 3.0 cli command "copy usbflash0:cat9k_iosxe.17.06.04.SPA.bin flash:" pattern "cat9k_iosxe.17.06.04.SPA.bin"
action 3.5 cli command "cat9k_iosxe.17.06.04.SPA.bin"
Action 4.0 wait 90
action 4.5 puts "Code downloaded, removing configuration from SVI 1"
action 5.0 cli command "conf t"
action 5.5 cli command "int vlan 1"
action 6.0 cli command "no IP address"
action 6.5 cli command "shut"
action 7.0 puts "Setting boot parameters..."
action 7.5 cli command "no boot system"
action 8.0 cli command "boot system bootflash:packages.conf"
action 8.5 cli command "wr mem"
Action 9.0 wait 10
action 10.0 puts "REMOVE_EEM_CODE_DOWNLOAD"
action 10.5 cli command "event manager applet REMOVE_EEM_CODE_DOWNLOAD"
action 11.0 cli command "event syslog pattern "IOSD_INFRA-6-IFS_DEVICE_OIR: Device usbflash"
action 11.5 cli command "action 1.1 puts "Deleting EEM script""
action 12.0 cli command "action 1.2 cli command "enable""
action 12.5 cli command "action 1.2 cli command "conf t""
action 13.0 cli command "action 1.3 cli command "no event manager applet CODE_DOWNLOAD"
action 13.5 cli command
action 14.0 cli command "action 1.4 cli command "install add file bootflash:cat9k_iosxe.17.06.04.SPA.bin activate commit" pattern "Press Yes(y) to save the configuration and proceed."
Action 14.5 cli command "action 1.5 cli command "n"
Action 15.0 cli command "action 1.6 wait 60"
Action 15.5 cli command "action 1.7 cli command pattern "Action 5.5 This operation may require a reload of the system."
Action 16.0 cli command "y"



I have tried using this also, but again the cli doesn't accept the command. I added an additional " to the end, thinking the quotes needed to be closed, 
action 11.0 cli command "event syslog pattern "IOSD_INFRA-6-IFS_DEVICE_OIR: Device usbflash""

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:

Recognize Your Peers