Tanguy Ropitault
2018-03-30 00:16:31 UTC
Hi,
I'm wondering if there may be some inconsistencies between SID definition
in draft-ietf-core-yang-cbor-05 and its usage in draft-ietf-core-comi-02.
The short version of the story is:
- draft-ietf-core-yang-cbor-05 defines SID as an unsigned integer "YANG
Schema Item iDentifier (SID): Unsigned integer used to identify different
YANG items."
- draft-ietf-core-comi-02 uses in some sections and examples SID with a
negative value (or to be sharp, use delta SID where SID should be normally
used)
Let's use an example for the long version of the story:
Section 2.3 of draft-ietf-core-comi-02 states that:
"When part of a payload, instance identifiers are encoded in CBOR based on
the rules defined in [I-D.ietf-core-yang-cbor] section 5.13.1"
Section 5.13.1 of draft-ietf-core-yang-cbor-05 states that:
"Single instance data nodes MUST be encoded using a CBOR unsigned integer
data item (major type 0) and set to the targeted data node SID."
*** Please note that I'm using the single instance identifier case for a
matter of clarity but the same applies for list instance identifier.
So according to the sentences above, a single instance identifier that is a
part of a payload can only be an unsigned int.
draft-ietf-core-comi-02 also states that FETCH request format must be:
"The FETCH request payload contains a list of instance-identifier encoded
based on the rules defined by Content-Format
application/yang-selectors+cbor in Section 2.5"
application/yang-selectors+cbor is defined in Section 2.5 as:
"represents a CBOR YANG document containing a list of data node selectors
(i.e. instance identifier)."
Moreover, Section 2.5 clearly recall this:
"YANG instance identifier, encoded based on the rules defined in [
I-D.ietf-core-yang-cbor
<https://tools.ietf.org/html/draft-ietf-core-comi-02#ref-I-D.ietf-core-yang-cbor>]
section 5.13.1
<https://tools.ietf.org/html/draft-ietf-core-comi-02#section-5.13.1>."
So the FETCH request payload can only be made of instance identifier which
are de-facto unsigned int (in the single instance identifier case) based on
Section 2.3 and 5.13.1. However, due to the usage of delta SID for
application/yang-selectors+cbor format, some instance identifier of a FETCH
request can be negative (as shown in FETCH example
in draft-ietf-core-comi-02). In fact, it seems that the sentence "When part
of a payload, instance identifiers are encoded in CBOR based on the rules
defined in [I-D.ietf-core-yang-cbor] section 5.13.1" is most of the time
superseded by DeltaSID usage.
So IMO, it's a little bit confusing and something may need to be added.
Tanguy Ropitault (Acklio)
I'm wondering if there may be some inconsistencies between SID definition
in draft-ietf-core-yang-cbor-05 and its usage in draft-ietf-core-comi-02.
The short version of the story is:
- draft-ietf-core-yang-cbor-05 defines SID as an unsigned integer "YANG
Schema Item iDentifier (SID): Unsigned integer used to identify different
YANG items."
- draft-ietf-core-comi-02 uses in some sections and examples SID with a
negative value (or to be sharp, use delta SID where SID should be normally
used)
Let's use an example for the long version of the story:
Section 2.3 of draft-ietf-core-comi-02 states that:
"When part of a payload, instance identifiers are encoded in CBOR based on
the rules defined in [I-D.ietf-core-yang-cbor] section 5.13.1"
Section 5.13.1 of draft-ietf-core-yang-cbor-05 states that:
"Single instance data nodes MUST be encoded using a CBOR unsigned integer
data item (major type 0) and set to the targeted data node SID."
*** Please note that I'm using the single instance identifier case for a
matter of clarity but the same applies for list instance identifier.
So according to the sentences above, a single instance identifier that is a
part of a payload can only be an unsigned int.
draft-ietf-core-comi-02 also states that FETCH request format must be:
"The FETCH request payload contains a list of instance-identifier encoded
based on the rules defined by Content-Format
application/yang-selectors+cbor in Section 2.5"
application/yang-selectors+cbor is defined in Section 2.5 as:
"represents a CBOR YANG document containing a list of data node selectors
(i.e. instance identifier)."
Moreover, Section 2.5 clearly recall this:
"YANG instance identifier, encoded based on the rules defined in [
I-D.ietf-core-yang-cbor
<https://tools.ietf.org/html/draft-ietf-core-comi-02#ref-I-D.ietf-core-yang-cbor>]
section 5.13.1
<https://tools.ietf.org/html/draft-ietf-core-comi-02#section-5.13.1>."
So the FETCH request payload can only be made of instance identifier which
are de-facto unsigned int (in the single instance identifier case) based on
Section 2.3 and 5.13.1. However, due to the usage of delta SID for
application/yang-selectors+cbor format, some instance identifier of a FETCH
request can be negative (as shown in FETCH example
in draft-ietf-core-comi-02). In fact, it seems that the sentence "When part
of a payload, instance identifiers are encoded in CBOR based on the rules
defined in [I-D.ietf-core-yang-cbor] section 5.13.1" is most of the time
superseded by DeltaSID usage.
So IMO, it's a little bit confusing and something may need to be added.
Tanguy Ropitault (Acklio)