IMO it should be treated like any other protocol error.
Which means that an ideal client will report an error - but in practice they'll 
end up ignoring the constraint violation because it's easier to not do 
validation.

This problem isn't specific to YANG - what happens if I make a request to an 
HTTP server ("GET / HTTP/1.1") and the server sends back nonsense 
("FOOBAR/-1.3i xyz Didn't feel like it")?
A good client will report that there was an error parsing the response; a bad 
client might call atoi on the second field (recording the status code as 0) and 
ignore the other fields.
Is there anything we can do about that? I don't think there is.

Alex

________________________________________
From: netmod <[email protected]> on behalf of Juergen Schoenwaelder 
<[email protected]>
Sent: Friday, 13 January 2017 7:44 a.m.
To: Andy Bierman
Cc: Netconf; [email protected]
Subject: Re: [netmod] [Netconf] Decision on the Intended Status of the Revised 
DS Draft WAS:RE: :candidate, :writable-running and RESTCONF edits

On Thu, Jan 12, 2017 at 09:38:46AM -0800, Andy Bierman wrote:
> On Thu, Jan 12, 2017 at 9:34 AM, Juergen Schoenwaelder <
> [email protected]> wrote:
>
> > On Thu, Jan 12, 2017 at 09:19:54AM -0800, Andy Bierman wrote:
> > >
> > > YANG statements:
> > >    - It is not possible to define these statements so they are different
> > > for config and oper
> > >       - must
> > >       - when
> > >       - unique
> > >       - key
> > >       - min-elements
> > >       - max-elements
> > >       - leafref (path)
> > >       - if-feature
> > >       - deviation
> > >       - type (or any sub-statements of type-stmt)
> > >       - status
> > >       - description
> > >       - reference
> >
> > Considering statements that constraint 'values', it is not entirely
> > clear to me what they mean for state nodes. If a server has
> > operational state that violates a must or range or ... constraint in
> > the YANG model, what is the server expected to do?
> >
>
> The client uses the YANG validation to check on what the server is sending.
> The server is buggy if it is sending data that violates YANG constraints.
> If any of these statements need to be different for config and oper
> then the old style YANG has to be used instead.
>

OK. So the client does the validation. What does the client do if the
operational state it got is not valid according to the YANG constraints?

/js

--
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to