[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: snmpconf #4: Code reuse



>>>>> On 02 Apr 2001 11:28:23 -0700, Wes Hardaker <wes@hardakers.net> said:

Wes> Options as I see it (I'm not going to describe how each one
Wes> "could" be done, as this message would get far too long.  If
Wes> feedback (consensus) is given that one should be explored more,
Wes> I'd be happy to elaborate on an item at that time):

I should have mentioned in my previous post that I've also not liked
the way that the pmPolicyFilter and pmPolicyAction numbers are not
writable and are assigned for you.  This would be one method of
promoting reuse: if actions and filters could be reused it would make
things easier to maintain.  As is, the filter has to account for every
possible test it might want to do.  It'd be easier to have multiple
"compartmentalized" filters that may all point to the same action
giving you OR type semantics within the policy Table itself and allows
you to more easily determine where errors are (separate error
counters per row).

Currently my filters/actions would be something like this:

  if (serivce is GOLD
      OR interface is local office subnet
      OR interface is 100Mb)
     set special QoS

Writing it like: 

  if (serivce is GOLD)
     set special QoS
  if (interface is local office subnet)
     set special QoS
  if (interface is 100Mb)
     set special QoS

Provides *some* reuse, realizing of course that the "set special QoS"
action may be called more than once.  It does, however, provide me to
apply the second filter during a scheduled time or temporarily
(rowstatus = volatile) but the others are more permanent.

Yet more thoughts,
-- 
Wes Hardaker
NAI Labs
Network Associates