0 Replies Latest reply on Oct 25, 2016 10:01 AM by cmplx79

    NCM Scripts Responding to Device Outputs


      I am trying to figure out, if the NCM Config Change Templates can somehow be triggered based upon the response of a command issued as part of the script.


      A very basic example is this:


      We need to upgrade the IOS image on a switch. The config change script copies the image to the flash, verifies the image, and then sets the boot record.


      What I would like to have happen, is if the verify command doesn't execute successfully, and/or the image verification fails, the script actually errors out instead of saying it was successful. Or, if that is not possible within NCM, then at least have the script verify the image, and if verification fails, retry the download and verification process, until the image is copied correctly, or a set amount of retries have passed.

      Since the output of a verify command is clearly visible in the 'Show Script Results' output from running a template, I'm hoping there's a way to "grab" that information and make the script trigger off of it... in the case of IOS verification, I would want the script to look for '%Error verifying flash:c800-universalk9-mz.SPA.154-3.M6.bin' for instance, and then make a decision based upon that.


      I appreciate everyone's input on this matter.