Quantcast
Channel: THWACK: Popular Discussions - Network Configuration Manager
Viewing all articles
Browse latest Browse all 4266

config change templates ios upgrade cisco flash

$
0
0

hy, I am trying to make a "generic IOS upgrade" template. there i work with the fallowing script:

 

script BaseChangeTemplate(

                            NCM.Nodes @ContextNode,

                            string @tftpserver,

                            string @iosfile

                          )

{

if (@iosfile contains ' ')

  {}

  CLI

  {

dir flash:

conf t

ip tftp source-interface Loopback 0

end

 

 

copy tftp: flash:

@tftpserver

@iosfile

 

 

 

dir flash:@iosfile

  }

}

 

 

 

now i am looking for a way to add some additional "if / else" statements like

- if the @iosfile" is already on the disk, do not upload it (maybe with @CiscoFlashFiles of the inventory??) but could not figure out in the documentation or thwack what the VARIABLE is

- if the @CiscoFlash "left size" is smaller then 10MB do not upload

- if there are more then one file on the CiscoFlash, check with is the "System image file is "flash:c880data-universalk9-mz.151-2.T1.old from the "show version" and delete all others

 

has anyone such scripts or can anyone help me here to generate one?

regards Pascal


Viewing all articles
Browse latest Browse all 4266

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>