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

Re: merge/replace selection criteria



I think we're all in agreement that to eliminate the ambiguity of the edit-config operations, either (1) an implicit agreement (perhaps via the schema) must exist between the managed device and the managing device as to which elements and attributes are identifiers, or (2) the identifiers must be explicitly indicated in the rpc call (using key="key" or some similar mechanism).

I have no experience with Junoscript but from what I gather it uses the first (implicit) approach. It also appears that most people had already made the assumption that netconf would follow suit. However I see nowhere in the netconf draft document where this issue is even mentioned so I didn't make that assumption.

Both Phil Shafer and David Perkins raised an excellent point that the relative processing efficiency at the managed device can be much worse if the second (explicit) approach is used. I also agree that an implicit agreement must also exist between the managed and managing devices as to the configuration document's metadata (schema), so the identifiers are just a part of that metadata. Together,I think that's a pretty good justification for the implicit approach.

Probably all that is needed is to add a statement to the netconf draft to the effect that the implicit agreement on identifiers is required, and to clarify in the examples which elements are assumed to be identifiers. Phil stated it pretty well: "The management tool has to take one of two positions. It can either understand the nature of the data that it's manipulating, implying that understands the nature of the identifying elements; or it can be generic, in which case it should learn the identifying elements from the meta-data (the schema) not from the data itself."

Paul

At 08:33 PM 8/25/2003, Phil Shafer wrote:
Paul Sangree writes:
>Actually since the operator="replace" is on the <user> element, I think at
>most one <user> would be replaced.

But which user? In picking one, you've implied knowledge
about the identifying nature of the <name> element.

>(1) The code that processes an edit-config operation can be generic for a
>given configuration document format.  For example, the same code could edit
>any XML document.

The code on the device parsing the xml _has_ to know which
elements are identifiers. This data isn't opaque to the device.

>(2) The management tool that generates the edit-config request does not
>have to know which fields are valid keys, since any element or attribute
>can be used as a key,

The management tool has to take one of two positions. It can either
understand the nature of the data that it's manipulating, implying
that understands the nature of the identifying elements; or it can
be generic, in which case it should learn the identifying elements
from the meta-data (the schema) not from the data itself.

>(3) Depending on the desired result, different fields can be used as
>keys.  Referring to the user list example, either <address> or <name> could
>be used as the key depending on the requestor's intent.

Supporting lookups using non-identifying elements (well, non-natively
identifying elements) can be expensive. The lookup mechanism as
spec'd is not that generic. The device (via the schema) can say
what the identifier are and limit lookups to just those elements.

>One partial solution that comes to mind is to put a key="key" attribute on
>each element to be used as a selection key.

Yup, this is the mechanism that I was referring to that we used in
junoscript (junos:key="key"), but it was whacked because it seemed
confuse some developers (who thought they could add the junos:key
element to anything and make it an identifier) and because it's a
bit unseemly to mix data and metadata. It was turned off by default
starting in junos-5.6.

Thanks,
 Phil

--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>