Hi,

After implementation of CBOR encoding for YANG Push,
I have found some minor issues in
ietf-subscribed-notifications.yang (RFC 8639)

1) encode-cbor identity
An identity is needed that represents draft-ietf-core-yang-cbor-20
(RFC-to-be 9254) encoding. No such standard identity exists at this time.

Example:

  identity encode-cbor {
    base encoding;
    // if-feature "encode-cbor";
    description
      "Encode data using CBOR as described in RFC 9254.";
    reference
      "RFC 9254: CBOR Encoding of Data Modeled with YANG";
  }


2) configurable-encoding
IMO there is no real purpose for a separate data type
for configurable-encoding vs. encoding.  There is also no reason
for this normative text to speculate about future identities.
The configurable-encoding typedef


  identity configurable-encoding {
    description
      "If a transport identity derives from this identity, it means
       that it supports configurable encodings.  An example of a
       configurable encoding might be a new identity such as
       'encode-cbor'.  Such an identity could use
       'configurable-encoding' as its base.  This would allow a
       dynamic subscription encoded in JSON (RFC 8259) to request
       that notification messages be encoded via the Concise Binary
       Object Representation (CBOR) (RFC 7049).  Further details for
       any specific configurable encoding would be explored in a
       transport document based on this specification.";

3) encoding when-stmt is wrong
    The 'transport' leaf has identityref base 'transport' not
'configurable-encoding'.
    The identity base 'configurable-encoding' is not used anywhere
    in this module or ietf-yang-push.yang

    leaf encoding {

*  when 'not(../transport) or derived-from(../transport,
"sn:configurable-encoding")';*
      type encoding;
      description
        "The type of encoding for notification messages.  For a
         dynamic subscription, if not included as part of an
         'establish-subscription' RPC, the encoding will be populated
         with the encoding used by that RPC.  For a configured
         subscription, if not explicitly configured, the encoding
         will be the default encoding for an underlying transport.";
    }

4) configurable-encoding cannot be used for the 'encoding' leaf
The leaf has base 'encoding' which is mutually exclusive
from 'configurable-encoding', which should be derived from 'encoding'

    identity configurable-encoding {
         base encoding;     // missing from module
    }


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

Reply via email to