On Mon, 2005-09-19 at 11:01 -0700, Dipesh Gorashia wrote:

> Question:
> While proccessing varbinds "simultaneousluy", the
> above consistency check 
> 
> --> should be made for each variable in varbind only
> against existing configuration on the system?
> 
> --> should the variables in varbinds be validated for
> consistency also against each other?

I think this validation *MUST* take into account the
other varbinds in the assignment.  There could easily
be situations where both the initial and final
configurations are consistent - but any "partial
update" isn't.

For example, consider a SNMP-controlled (3-ball)
juggling robot, that can only hold one ball in each
hand, operating in a very confined space (so that only
one ball can be in the air at any one time!).

 That could be monitored and updated using SNMP commands
such as:

  $ snmpwalk juggler ballLocation
  ballLocation.1 = leftHand
  ballLocation.2 = rightHand
  ballLocation.3 = inTheAir

  $ snmpset juggler    ballAction.1 = throwFromLeft
                       ballAction.2 = passRightToLeft
                       ballAction.3 = catchInRight

  $ snmpwalk juggler ballLocation
  ballLocation.1 = inTheAir
  ballLocation.2 = leftHand
  ballLocation.3 = rightHand


That's a perfectly reasonable (if somewhat contrived!)
example - although the robot might have problems in
stopping cleanly :-).
  But if you checked the consistency of any of the three
updates individually against the previous configuration,
the SET request would be rejected as inconsistent.

It's only when all three updates are taken together,
that the assignment becomes acceptable.


The most common technique is probably to apply *all*
the assignments to some internal representation of the
system, then check the resulting configuration for
consistency.  If this check fails, then restore the
internal representation to its previous state.
If this check succeeds, then apply these changes to
the external system (if relevant).

This is not always possible, of course - but that's
a useful basic working principle.

Dave


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to