Hi There
I want to create a report to verify that the CLI for certain devices (Cisco WAEs) have the following configuration fragment. There are
- Exactly 15 statements;
- 15 Classnames;
- 9 AppNames
- The 15 statements may not always appear in the same order (This is what makes this difficult)
map basic
name AppName1 classifier ClassName1 action optimize full
name AppName2 classifier ClassName2 action optimize full
name AppName3 classifier ClassName4 action pass-through
name AppName3 classifier ClassName5 action pass-through
name AppName3 classifier ClassName6 action optimize full
name AppName3 classifier ClassName7 action pass-through
name AppName4 classifier ClassName8 action pass-through
name AppName5 classifier ClassName3 action optimize full
name AppName6 classifier ClassName4 action optimize full
name AppName6 classifier ClassName2 action pass-through
name AppName6 classifier ClassName3 action pass-through
name AppName7 classifier ClassName1 action optimize full
name AppName8 classifier ClassName2 action optimize full
name AppName9 classifier ClassName3 action optimize DRE
name AppName9 classifier ClassName4 action optimize full
exit
map other pass-through
To establish the presence and correct form of the 15 lines is easy.
15 stright forward string matches does the trick.
This leaves the question of checking that there are no extra definitions. Given the fact that the order may change (don't ask).
I was trying something complicated when I was evaluating ONCM but I crashed it. So any idea greatly appreciated.