Has anyone created a template for the 9300 switches?
Have been working on this for a couple days and came up with the following but having issues getting it to push to all switches. I took the template I had and modified it but have not had 100% success.
/*
.CHANGE_TEMPLATE_DESCRIPTION
This change script allows you to script IOS upgrades
.PLATFORM_DESCRIPTION
This runs on Cisco IOS devices for 9300 Switch
.PARAMETER_LABEL @ContextNode
NCM Node
.PARAMETER_DESCRIPTION @ContextNode
The node the template will operate on. All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
.PARAMETER_LABEL @IOS_FILENAME
The File Name of the new IOS Version.
.PARAMETER_DESCRIPTION @IOS_FILENAME
This should be a valid Cisco IOS File.No spaces are allowed, a script will not be generated for a Cisco IOS Filename that includes a space.
.PARAMETER_LABEL @change_Radius
Delete and Replace existing Radius.
.PARAMETER_DESCRIPTION @change_Radius
Enter "y" to replace existing Radius. Enter "n" to leave existing Radius Configuration.
.PARAMETER_LABEL @reloadWhenComplete
RELOAD device after transfer?
.PARAMETER_DESCRIPTION @reloadWhenComplete
Enter "y" to reload the device after upgrade. Enter "n" to only copy the bin files to flash.
*/
script UpgradeIOS (
NCM.Nodes @ContextNode,
string @IOS_FILENAME,
string @reloadWhenComplete)
{
string @CommandLine = 'copy tftp://x.x.x.x/' + @IOS_FILENAME + ' flash:'
if (@IOS_FILENAME contains ' ')
{}
else
{
foreach ( node in @ContextNode )
{
if ( node.Vendor == 'Cisco' )
{
CLI
{
@CommandLine
@IOS_FILENAME
request platform software package install switch all file flash:@IOS_FILENAME auto-copy
conf t
no boot system
boot system flash:@IOS_FILENAME
end
wr
}
if (@reloadWhenComplete contains 'y')
{
CLI
{
reload
!
}
}
}
}
}
}
Script will push to first switch but not going to all subsequent stack switches.
Chuck