Hi Lada,

On 31/01/2019 14:00, Ladislav Lhotka wrote:
Robert Wilton <rwil...@cisco.com> writes:

Hi Lada,

Thanks for the review and comments ...

I've added some thoughts inline ...

On 30/01/2019 14:50, Ladislav Lhotka wrote:
Hi,

I think it is a good start, here are my comments (some of them were
already raised by Jason):

- I like the fact that this work doesn't require any changes to YANG,
    except perhaps semver.
RW: OK.


- I think the augments to YANG library is a separate problem that should
    perhaps be addressed in a different document. Servers supporting
    multiple package revisions may not be that common.
RW:

I completely agree that servers supporting multiple package revisions
may not be that common, and I agree that any specification on how a
server could support multiple packages, and perform package selection
should be in a separate draft.

But the YANG library augmentations aren't there only to support this use
case.  My intention is to make it easier for devices to advertise a
package representing what each datastore schema is rather than having to
fetch the full contents of YANG library.

E.g. a server might implement 900+ modules/sub-modules for a given
release.  Different hardware will mostly implement the same modules, but
there might be some differences.  If bugs have been patched then there
might be some differences.  I'm aiming for a solution where a client
doesn't have to fetch the full list of YANG modules for each server to
figure out the schema for the device, which is probably the same as
another 1000 devices in the network.

Instead, I would like the vendor to publish a package for that
particular release, with variants depending on the hardware.  The device
can then advertise that it uses that base package, along with the small
set of differences (e.g. due to bug fixes).

OK, I missed this purpose. Perhaps one of the examples can be expanded
to illustrate this situation.

RW: Yes, that is a good suggestion.  I will try and make this more clear in the draft.



But doesn't it defeat the purpose of packages? Even if I know that my client
works with package X, it needn't be the case with the vendor's changes.

RW:

So packages cannot themselves magically help vendor devices more faithfully implement the standard YANG models.  I think that over time this will likely improve, but probably is somewhat hampered by having two competing sets of industry standard YANG models. But there are a couple of ways that I feel that packages that they can help:

1) They can help indicate what functionality a server is trying to conform to, better than just a flat list of modules.  E.g. through the package inclusion, the client could see that a vendor is attempting to implement ietf-l2vpn-pkg@v1.0.0.

2) The package definition should aim to make it more clear where the server deviates from the package.

On that second point, Jason was querying whether the package definition should list deviations for each module, but thinking about this a bit more, I wonder whether it would be helpful if when a package was imported, any deviations, or module version down revs, are explicitly listed at the point where the package import is defined.  I.e. to make the package deviations really explicit.


- I was expecting that a package could specify a range of revisions for
    some modules that may be used together with teh others. This doesn't
    seem to be the case. If so, it would be somewhat unwieldy because every
    combination of module revisions would require a separate package
    revision.
RW:

Yes, this is an interesting point.

My intention is that there is a roughly linear history of package
versions.  E.g. if there was a package of all IETF modules, then every
time a new version of an IETF module is published, the package
definition would be updated to a new version that includes the new
published module revision. I think that we need to try and somewhat
constraint the versions of modules that can sensibly be used together.

With semver, would it make sense to be able to specify only a major
version number of a module? The "yang-sem-ver" type requires the
complete version number.

So, I don't think that this would quite work, but the effective behavior might be what you desire anyway.

Consider the following:
  (i) module A, at version 1.0.0, defines some functionality.
  (ii )module A, at version 2.0.0, fixes some issues in version 1.0.0
  (ii) module A, at version 2.1.0, defines some new (backwards compatible) functionality.

If a package only listed module A's major version number (e.g. 2) then a client cannot know whether or not it can use the new functionality added in version 2.1.0 of the module, because it won't know whether the server implements it until is queries the module set in YANG library.

But, I think that listing exact versions is probably OK.
 - pkg-P, at version 1.0.0, uses module A@V2.0.0
 - pkg-P, at version 1.1.0, uses module A@V2.1.0

If the client requires pkg-P@V1.0.0 then it will work with a server that supports pkg-p@V2.0.0 or pkg-p@V2.1.0.

Further, if there is a third version of module A defined, e.g. 1.2.0, but that hasn't yet been included in an updated pkg-p revision, then the server can still indicate that it implements pkg-p@V1.1.0, but also indicate that is has updated module A to version 1.2.0.  The semver rules indicate that this is all OK and backwards compatible, and clients expecting to work with Pkg-P@1.0.0 or 1.1.0 would still work fine.

Finally, I also want to be able to build an exact schema from a package definition, and that is only possible if the exact module versions/revisions are known.

So, in summary, I think that package definitions should indicate precise version numbers of the modules defined by those packages, but the semver rules allow for newer backwards compatible implementations of the package, or newer backwards compatible implementations of some of the modules in the package.



- As Jason pointed out, there seems to be no use for the package
    namespace, as packages don't define any names on their own.
Yes, I will remove the text about namespaces.  Globally unique package
names should be sufficient.


- I would also prefer mandatory-features to be bundled with each
module.

- This draft nicely shows that there is really no need for any
    "yang-data" extensions. But I also don't see any benefit from using
    ietf-yang-instance-data in this case. It would IMO be perfectly fine
    to get rid of two levels of data hierarchy:

    { "ietf-yang-package:yang-package": {
        ...
      }
    }
That's an interesting point.  My thought is that all at rest YANG data
would be encoded in YANG instance data documents to make them more
easily machine parse-able.
I don't see how the two extra levels make the JSON more easy to parse.

So, my interpretation is that draft-ietf-netmod-yang-instance-file-format-01 is intended to be the standard way of representing YANG data at rest (which is what this YANG package definition is meant to be).  If we shouldn't use draft-ietf-netmod-yang-instance-file-format-01 for YANG packages, then when should it be used?



If we want to have some standard metadata for inclusion in standalone
instance document, it would be probably better to define the metadata as
a grouping that can be used right under
"ietf-yang-package:yang-package". In the DSDL schemas (RFC 6110) we used
Dublin Core metadata for a similar purpose.

OK, perhaps this issue should be discussed in the context of the YANG instance data draft.

But I will add this as an open issue.

Thanks,
Rob



Lada

Thanks,
Rob


Thanks, Lada


_______________________________________________
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