bloxHub

www.infoblox.com/community
3 posts / 0 new
CCS Continue on Error

I have a few cases where I think I would ike to have a CCS script continue even where there is an error reported by the device.  Here is the example...

One of the core VPN routers has changed IP addresses (thank you Frontier).  I now have to cleanup route and crypto statements on all the routers.  However there a few out there that have already had some of the items removed.  If I do a batch script on all of them they will error and not continue to run the rest of the commands.  

Please let me know your thoughts if this can be done, and is there a good reason not to do so.

 

Thank You 

+1
+2
-1
Tags
NetMRI,batch script,ccs,command script
Re: CCS Continue on Error

Jeff, I see that noone responded to this and by now you've probably solved it some way.   But FWIW, I'll throw in my suggestion.

Regarding your main subject, the ability for CCS to treat device output other than a hostname prompt, as expected, was requested around 3-4 years ago.  Although it was not implemented, in most cases there is another way to write the flow of the script to work around that.  If I understand your requirement, it seems like you can do the following:

Action: issue "show running | include <line_that_should_not_exist>"
Trigger: match on the unwanted statement
Trigger-Output: Call Trigger_to_remove_statement

So the removal step will conditionally execute only when required.

Similarly, you could test for the existence of the correct statements.  Toggle a variable at the next higher scope level if found.
Follow that with an Action that conditionally adds the missing statement.

I've used this approach to remove invalid syslog destinations, SNMP trap destinations, etc.; and add back any correct ones that were missing.

HTH,

- Marty

+1
+1
-1
Re: CCS Continue on Error

Thanks Marty.

I was hoping themake something like the Ad Hoc one so it would be easy to update with anychange/clean being done.  I will lookinto writing something this way. 


 

+1
0
-1