Infoblox Exchange Cybersecurity Roadshow 2020 – Join us!
North America | Europe | Middle East/Africa | Asia-Pacific

Automation Scripts

Reply
Accepted Solution

NetMRI Cisco upgrade script for dual sup devices

B_Lindor
Techie
Posts: 9
4094     1

Hello, 

 

I am currently in the process of creating a script in NetMRI (CCS) to upgrade a large number of Cisco 4507 devices that have dual supervisors installed. I've gotten pretty far into the script but I'm running into an issue related to the actual reloading of the supervisors. Rather than reloading both SUP's at once, Cisco has documented and recommended that we reload the standby and then wait for that to come back online and then reload the active sup to minimize any outages. 

 

Is there a way in NetMRI to have it wait a specified time period before moving to the next command? Ideally I would like the script to first reload peer, then loop through the following command (show mod | i standby) until the standby is back in an active (sso or standby hot) state. The reload of the peer should take anywhere between 5-10 mins before coming back online. I've attached a copy of the script. 

 

Script-Filter:
$vendor eq "Cisco"

########################################################################
Action:
Upgrade 4507s

Action-Commands:
ARCHIVE ($ipaddress-PRE): show log
SET:$ssomode = "no"
term mon
conf t
redundancy
main-cpu
auto-syn standard
end

show run | i router eigrp

Output-Triggers:
Find eigrp
##########################################################################
Trigger:
Find eigrp

Trigger-Variables:
$eigrp string

Trigger-Template:
[[$eigrp]]

Trigger-Filter:
$eigrp like /router eigrp/

Trigger-Commands:
config t
router $eigrp
nsf
end
############################################################################
Action:
Continue upgrading 4507

Action-Timeout:
600

Action-Commands:
redundancy reload peer \r
show mod | i Standby

Output-Triggers:
Determine SSO status
#############################################################################
Trigger:
Determine SSO status

Trigger-Variables:
$sso string

Trigger-Template:
[[$sso]]

Trigger-Filter:
$sso like /Standby Supervisor SSO Standby hot/

Trigger-Commands:
SET:$ssomode = "yes"
#############################################################################
Action:
Reload active supervisor

Action-commands:{$ssomode eq "yes"}
copy run start \r
redundancy force-switchover

 

Thanks in advance!

 

-Berland

Highlighted

Re: NetMRI Cisco upgrade script for dual sup devices

B_Lindor
Techie
Posts: 9
4094     1

Hi Folks, 

 

Nevermind on this request. I did some research and came across a scripting command in NetMRI referred to as SLEEP. 

 

"The SLEEP directive pauses script execution for a specified number of seconds. SLEEP can be used in Action-Command attributes and Trigger-Command attributes". 

Example

  1. Sleep for one minute sleep: 60

 

This command allowed my script to wait while the device reloaded its standby SUP and then continued after the sleep timer expired. 

 

Hope someone else finds this helpful!

 

-Berland

Showing results for 
Search instead for 
Do you mean 

Recommended for You