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

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



"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);
    }

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