12-11-2019 08:18 AM
Currently i am testing out the Compliance features of Cisco Prime and encounter some difficulties. The idea is to keep all the network devices up-to-date and complaint to the standard.
As testcase I created a template on our 3560 test switch and try to make a policy that is able to check for inconsistencies.
To make it even easier to fix inconsistencies I want to create a CLI fix to straighten it with a couple of button clicks.
That means that in some cases it should at add a command, but also remove commands.
Adding commands ins't a problem. The trouble begins when i try to remove commands. Especially those which has more options.
Take for example the command "access-session". After that there are multiple options. this command needs to be removed with for example "access-session closed"
I managed to remove the command by creating a sub-block (access-session .*) in the block (^template .*). after that i am unable to return to the template block to check for more inconsistencies within the block.
I tried using the "block end expression" but this also ends the template block, and not only the access-session block.
Does anyone know of a method where i haven't to create the template block every time i check for a multi option command?