Reply

Policy Compliance - Device Filters for a Rule

Posts: 75
3977     0

Hi Guys,

 

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='='>
<Expr field='DeviceType'/>
<Expr value='Switch-Router'/>
</Expr>
</PolicyRuleLogic>

 

Any guidance would be greatly appreciated.

Thanks

Susan

Re: Policy Compliance - Device Filters for a Rule

Adviser
Posts: 472
3978     0

Try the following :

Config MGMT > Policy Design Center > Policies

 

Device Filter for Policy and add the Models you don't want to process.

 

Sif

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Policy Compliance - Device Filters for a Rule

Posts: 75
3978     0

Sif,

 

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?

 

Susan

Re: Policy Compliance - Device Filters for a Rule

Adviser
Posts: 353
3978     0

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.

 

 

Re: Policy Compliance - Device Filters for a Rule

Adviser
Posts: 472
3978     0

John is correct or use RegEx Smiley Happy

 

Model does not contains /3560G|2960|6509-E|4948/

 

Same for OS version Smiley Happy

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

https://sifbaksh.com

Re: Policy Compliance - Device Filters for a Rule

Posts: 75
3978     0

Hi Guys,

 

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.

 

Thoughts?

 

Susan

Showing results for 
Search instead for 
Did you mean: 

Recommended for You