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

Re: I-D draft-weijing-netconf-interface-01.txt



At 03:04 PM 9/7/2003, Phil Shafer wrote:
>"Chen, Weijing" writes:
>>Explicit vs. implicit
>>Option is explicitly stated by XML schema.
>>Operating.XSD
>>Vs. option is implicitly inferred from URL.
>> <capabilities>
>>       <capability>http://ietf.org/xmlconf/1.0/base</capability>
>>       <capability>http://ietf.org/xmlconf/1.0/base#lock</capability>
>>       <capability>http:/example.net/router/2.3/core#cool-feature</capability>
>> </capabilities>
>
>So I'm still confused about why this is a good thing.  I'd _much_
>rather write code that looks like:
>
>
>   if (device.hasCapability(CAP.COOL_FEATURE)) {
>       req = buildFooRequest();
>       device.sendRequest(req);
>   }
>
>than code that looks like:
>
>    req = buildFooRequest();
>    if (device.getXSD.isValid(req)) {
>        device.sendRequest(req);
>    }

I completely agree.  IMO the capability-based code is much cleaner.

There is another reason that this way is better -- XSDs will likely be
generalized (like MIBs).  It is very likely that an XSD published
or supported by a vendor will act as the generic template of
conformance.  We have no fine grain conformance documentation
mechanism in XML, like the AGENT-CAPABILITIES macro in SMIv2,
except the capabilities exchange in netconf.  Since the
capabilities list can represent arbitrarily granular feature
conformance (and it can contain vendor-specific capabilities),
it will be easier for implementations to advertise their
precise feature list, rather than construct and export
implementation-specific XSDs.

Andy


>That is, I'd rather know that the device supports the particular
>feature I'm attempting to use directly, instead of assuming that
>if the request isn't schema-valid for the particular device, it
>must be because the device does not support the feature.
>
>The code that is trying to invoke an operation has to know that
>operation specifically. It cannot learn it via XSD. Even if the
>application can fetch the device schema and the schema has explicit
>details about the devices locking capabilities, the application
>cannot suddenly spawn code that knows how to invoke those capabilities.
>There has to be some semantic understanding on the application
>developers part that understands locking and wants to invoke it.
>Short of that, how will the application ever know what those bits
>of xsd do?
>
>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/> 


--
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/>