10-21-2015 08:13 AM
I have a poilcy that works great. It happens to be written in XML. What I need to to next is specify some very specific devices filters, and I am stuck creating what I need.
I want to the policy to be evaluated on all devices except:
Cisco 3560Gs running 12.2(58)SE2
Cisco 2960s running 12.2(44)SE6
Cisco 6509-Es running 12.2(33)SXJ4
ICisco 4948s running 12.2(25)EWA14
I am not seeing how to easily do this with the Device Filter for Rule in the Policy. I know I can do an If then statement, but I need 4 If then statements.
Is this something I should be tackling in XML within the policy itself? I saw the part belowi in the admin guide under Expression Attribute and Matching, but I don't see how to do multiple If then statements.
<PolicyRuleLogic expression='(1 and 2) or 3'>
<Expr label='1' field='RoutingInd'/>
<Expr label='2' field='SwitchingInd'/>
<Expr label='3' op='='>
Any guidance would be greatly appreciated.
10-21-2015 11:01 AM
Try the following :
Config MGMT > Policy Design Center > Policies
Device Filter for Policy and add the Models you don't want to process.
10-21-2015 11:08 AM
I agree. I am using the device filter. Where I am stuck is that I have 3 if then statements. The filter doesn't seem to allow me to create more than 1 if then statement. Am I missing something?
10-21-2015 01:16 PM
I think if you put in expressions that match each of those models, then you can put:
not (1 or 2 or 3 or 4)
in the expression part of the filter match.
10-22-2015 11:07 AM
John is correct or use RegEx
Model does not contains /3560G|2960|6509-E|4948/
Same for OS version
10-29-2015 09:47 AM
I agree with you, but I need to rule out a single model on a certain version. Then I need the policy applied to all the other versions on that same model. I feel like the regex will remove all models and versions, which isn't quite what I need.