On 30/11/2018 19:28, Juergen Schoenwaelder wrote:
I doubt it makes sense to carry an entire yang library schema with the
instance data. The modules are actually known via the namespaces.

Knowing the module name or namespace isn't sufficient to be able to parse the data:  - E.g. if the contents are in the format of RFC7895bis, but the client tries to parse it using the schema from RFC7895, then it will fail.  - Once NBC changes are allowed via YANG versioning it will become more necessary to know the revision or version of the modules to be able to parse the data.  E.g. not even just the latest module revision will necessarily work.   It is entirely plausible that different server revisions may be generating instance data using slightly different schema.

If the server has deviations then the client may also need to know those deviations to correctly parse the file.

So, I think that it is pretty clear that knowing the right schema is required to be able to correctly parse and interpret the instance data.

I think that there are 4 ways that this can be achieved:
 1) embedded the necessary schema information into the YANG instance data.
 2) put the necessary schema information online somewhere and have a URI reference to it.  3) some combination of (1) and (2), e.g. packages defined centrally, with deviations listed in the file.  4) the schema is determined using some out of bound mechanism, or possibly it is hard coded.

I don't think that there is a one size fits all answer here.  I think that that it depends on the use case.  Certainly, I think that facilitating 1 -3 is useful, but they should be optional rather than mandatory.  I.e. defining nodes for these doesn't seem to cost much if a server isn't obliged to populate them.

I do think that YANG packages (themselves defined in instance data documents) could be very helpful here.  I.e. rather than listing all the modules, instead list the packages + any deviations from that.  I'm presuming here that the definitions of the packages are available via a URI.


  If
you want to capture the schema, dump the relevant yang library into
another instance file.

That just means another file to carry around and manage.

Thanks,
Rob



/js

On Fri, Nov 30, 2018 at 07:07:03PM +0000, Robert Wilton wrote:
I also think that the instance data header needs to have a way of indicating
which modules (and versions/revisions) the instance data applies to.

It can be optional, so producers that know it is not required can leave it
out.  But I think that it is required, at least for situations where being
able to programmatically consume the instance data in a robust way is
important.

Thanks,
Rob


On 30/11/2018 17:48, Andy Bierman wrote:
Hi,

I don't see much standards value in this draft so far.
It seems the parser of the file needs to know the YANG library information
for the instance file data in some out-of-scope non-standard manner.
This is what we already have today just by naming the file in a specific
way.

Is the intent that the instance-data-set leafs will be used to determine
the module revisions, features, and deviations used in the children
or the 'data' node?

Andy



_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to