Subject: [lp-wan] yang feature

From: Laurent Toutain <[email-masked]>
Date: Mon, 17 May 2021 09:24:30 +0200

Hi SCHCers,

I have a question regarding the feature in Yang which made some portion of
the model conditional.
For instance:

  module syslog {
         ...
         feature local-storage {
             description
                 "This feature means the device supports local
                  storage (memory, flash or disk) that can be used to
                  store syslog messages.";
         }

         container syslog {
             leaf local-storage-limit {
                 if-feature local-storage;
                 type uint64;
                 units "kilobyte";
                 config false;
                 description
                     "The amount of local storage that can be
                      used to hold syslog messages.";
             }
         }
     }

I don't understand all the impacts, but the goal is to limit the
implementation of parts of the data model is some hosts. I don't think
splitting the protocols in features will have a big impact, it is just some
fields ID. So, a compression feature could be enough. In that case, we
dont need to have the compression rule format in the model.

For Fragmentation it is a little bit tricky, we can have a fragmentation
feature which remove the fragmentation rule format from the model. But may
be a device will only implement NoAck, and in that case, we don't need the
window field.

I think the simplest is the best and add in a model a compression and
fragmentation feature. Have you any opinion or advise for that?

Laurent