Re: [core] CBOR Encoding of Data Modeled with YANG

Michel Veillette <Michel.Veillette@trilliantinc.com> Tue, 08 December 2015 17:01 UTC

Return-Path: <Michel.Veillette@trilliantinc.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 316BE1A0058 for <core@ietfa.amsl.com>; Tue, 8 Dec 2015 09:01:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.144
X-Spam-Level:
X-Spam-Status: No, score=-0.144 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTML_TAG_BALANCE_BODY=1.157, J_CHICKENPOX_42=0.6, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mv9xXvxuit9c for <core@ietfa.amsl.com>; Tue, 8 Dec 2015 09:01:15 -0800 (PST)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0128.outbound.protection.outlook.com [207.46.100.128]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 39DAE1A0052 for <core@ietf.org>; Tue, 8 Dec 2015 09:01:10 -0800 (PST)
Received: from BLUPR06MB1763.namprd06.prod.outlook.com (10.162.224.149) by BLUPR06MB1761.namprd06.prod.outlook.com (10.162.224.147) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 8 Dec 2015 17:01:07 +0000
Received: from BLUPR06MB1763.namprd06.prod.outlook.com ([10.162.224.149]) by BLUPR06MB1763.namprd06.prod.outlook.com ([10.162.224.149]) with mapi id 15.01.0337.015; Tue, 8 Dec 2015 17:01:07 +0000
From: Michel Veillette <Michel.Veillette@trilliantinc.com>
To: Andy Bierman <andy@yumaworks.com>, Alexander Pelov <a@ackl.io>
Thread-Topic: [core] CBOR Encoding of Data Modeled with YANG
Thread-Index: AdEtPHYWp5+Kr9OtQ0Oj//Irn0p12QDkrIIAAAzxqKAACR5VgAAAPE1QAAG37gAAAP5qIAAaFoAAAAGBWAAAAViEAAAAipUAAAF5AAAAArWAAAADiIAAAAGQp8A=
Date: Tue, 08 Dec 2015 17:01:06 +0000
Message-ID: <BLUPR06MB17639C65F2BDBB8E1795DDBEFE080@BLUPR06MB1763.namprd06.prod.outlook.com>
References: <20151207091044.GA59864@elstar.local> <BLUPR06MB1763ABFE8DE1E0E18F5F06A5FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151207194229.GA61491@elstar.local> <BLUPR06MB1763B7F9EBF812C06DB04252FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151207203826.GA61647@elstar.local> <BLUPR06MB1763E9AB0D1E4A0478D47C05FE090@BLUPR06MB1763.namprd06.prod.outlook.com> <20151208093350.GA62650@elstar.local> <5666AE1A.2040908@ackl.io> <20151208105530.GA62785@elstar.local> <64B950CF-863D-4440-AF7A-F8DF79C80409@telecom-bretagne.eu> <20151208115310.GA62928@elstar.local> <5666D6D4.3090006@ackl.io> <CABCOCHSWb1p65UjKNVnn4nPLMqhmLnGyuDSxYZYhT5S5HWjkSA@mail.gmail.com>
In-Reply-To: <CABCOCHSWb1p65UjKNVnn4nPLMqhmLnGyuDSxYZYhT5S5HWjkSA@mail.gmail.com>
Accept-Language: fr-CA, en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Michel.Veillette@trilliantinc.com;
x-originating-ip: [207.96.192.122]
x-microsoft-exchange-diagnostics: 1; BLUPR06MB1761; 5:TBBIqeflCDB0LK8SRl64tzbsF+oCuK0pNdGJ9xJFhUe9w8+1hDbEhsH47npxeG0/jzZZgnS5d/RGVS3SOHpaDxbnfNcQuGdI7ksA48wHQTh4iHMVJNPTmizch8aDVCjj; 24:b0wfa8R7estLcT2Zz61HcJkblXuRjj2Q2rB2ieAmvPhzqN5k1PT9PjH+EO8tgryq7Z7LPfHYvlCDWnQa9IUwmkdTqd+Wt8tGr2NEkI/j1QU=
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR06MB1761;
x-microsoft-antispam-prvs: <BLUPR06MB176116C27874A38A66D430F5FE080@BLUPR06MB1761.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:BLUPR06MB1761; BCL:0; PCL:0; RULEID:; SRVR:BLUPR06MB1761;
x-forefront-prvs: 0784C803FD
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(199003)(479174004)(377454003)(24454002)(51914003)(189002)(51444003)(2950100001)(101416001)(2900100001)(19580405001)(106356001)(19580395003)(77096005)(18206015028)(86362001)(19300405004)(87936001)(99936001)(105586002)(122556002)(19625215002)(40100003)(74316001)(97736004)(5002640100001)(33656002)(76176999)(5003600100002)(50986999)(76576001)(790700001)(92566002)(5008740100001)(93886004)(10400500002)(99286002)(54356999)(66066001)(81156007)(189998001)(5001770100001)(1220700001)(1096002)(5890100001)(6116002)(11100500001)(19617315012)(17760045003)(15975445007)(16236675004)(19627595001)(102836003)(586003)(5004730100002)(3846002)(5001960100002)(7099028)(781001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR06MB1761; H:BLUPR06MB1763.namprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:;
received-spf: None (protection.outlook.com: trilliantinc.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: multipart/mixed; boundary="_006_BLUPR06MB17639C65F2BDBB8E1795DDBEFE080BLUPR06MB1763namp_"
MIME-Version: 1.0
X-OriginatorOrg: trilliantinc.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Dec 2015 17:01:06.9887 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4f6fbd13-0dfb-4150-85c3-d43260c04309
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR06MB1761
Archived-At: <http://mailarchive.ietf.org/arch/msg/core/qxmcb5RRwvcGmUF1Qj6rW3nygjw>
Cc: Core <core@ietf.org>
Subject: Re: [core] CBOR Encoding of Data Modeled with YANG
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Dec 2015 17:01:25 -0000

Hi Andy

I'll try to answer you different interrogations / questions one by one.

About " Automatic numbering really means write a program that does the manual numbering"
Manual numbering means that somebody assign an ID to each object manually
(data node, notification, notification parameter, rpc, input parameter, output parameter).
This assignment is completely arbitrary. This is the approach implemented by LWM2M.

Automatic numbering means that IDs are assigned using an algorithm.
https://tools.ietf.org/html/draft-veillette-core-cool-00#section-6 defines such algorithm.
It might be possible to improve this algorithm if we identify what is wrong about it.

About "Only the relative order of nodes is maintained across revisions"
The proposed algorithm is based on this property to keep the same IDs between versions.

About "YANG allows new nodes to be added anywhere."
The proposed algorithm require that those data nodes are manually assigned if they affect
already assigned IDs. We always argue that the approach need to be friendly to constrained
devices and constrained network, not to people.

About "augment are not ordered at all and they can change order from 1 revision to the next"
Data nodes added using the "augment" statement are part of the namespace of the module
defining these data nodes and as such have no impacts on the IDs of the target module(s).
This is not different to how object names of these data nodes are defined in
draft-ietf-netmod-yang-json-06, see "barmod:bar": true in page 6.

About "If a grouping in an external module is extended, then all uses of the grouping will be extended"
This is why the cool:id extension is defined at the top level of the module instead of as leaf sub-statement.
The different data nodes impacted by the addition of a leaf within a group can be assigned individually.
An example of this scenario have been provided, see attachment.

About "If import without revision is used, then the specific external grouping
is not even knowable and it is impossible to number the expanded uses correctly."
If I understand correctly the rules defined in YANG section 10 (Updating a Module)
previous versions always define the same set or a subset of the data nodes.
If IDs of each of these versions are consistent, importing any of the revision
should not cause any impacts. The only constrain should be that module
importing other module(s) without revision contain an up to date list of cool:id extensions.

For example:
Module A with import module B version "20150101" is the base line, all objects are automatically generated.

Module A with import module B version "20150201" introduce two data nodes which need to be manually assigned.
cool:id "/container-a/leaf-b 500";
cool:id "/container-a/leaf-c 501";

Module A with import module B version "20160101" introduce one more data node which need to be manually assigned.
cool:id "/container-a/leaf-b 500";
cool:id "/container-a/leaf-c 501";
cool:id "/list-d/leaf-e 502";

The latest list of cool:id containing 3 entries can be applied to both module B version "20150201" and
version "20160101". The resulting IDs will be the same in both cases except that the third
entry won’t be used in the case of module B version "20150201".

About " If any module ever has more than 1024 objects, they will be ignored"
If this limit is a real life problem, we have multiple options:

·        Specify a range of module IDs supporting more objects.

·        Using a different data type for these jumbo modules (e.g. 64 bits unsinged integer)

Regards,

[cid:image001.jpg@01C868D8.BF0BB7E0]

Michel Veillette
System Architecture Director
Trilliant Inc.
Tel: 450-531-3109





From: core [mailto:core-bounces@ietf.org] On Behalf Of Andy Bierman
Sent: December-08-15 9:52 AM
To: Alexander Pelov <a@ackl.io>
Cc: Core <core@ietf.org>
Subject: Re: [core] CBOR Encoding of Data Modeled with YANG

Hi,

It is not clear to me how manual numbering of objects can be practical.
Automatic numbering really means "write a program that does the manual
numbering".  YANG allows new nodes to be added anywhere.
Only the relative order of nodes is maintained across revisions.
Some nodes, like "augment" are not ordered at all and they
can change order from 1 revision to the next.  If a grouping in an
external module is extended, then all "uses" of the grouping will be extended.
If "import without revision" is used, then the specific external grouping
is not even knowable and it is impossible to number the expanded "uses" correctly.
If any module ever has more than 1024 objects, they will be ignored,
since the numbering has a hard limit on objects per module.

These seem like significant issues that cannot be ignored.


Andy


On Tue, Dec 8, 2015 at 5:10 AM, Alexander Pelov <a@ackl.io<mailto:a@ackl.io>> wrote:
Dear Juergen,

Thanks for the great remarks! Indeed, we have had lots of lengthy discussions on the way structured data node IDs work, and there are several ways to handle the situations you describe.

We've reached a consensus to first detail the most demanded and least controversial part - the YANG-CBOR mapping. Having structured data node IDs allows for all existing designs to operate with this.

I've provided you with the baseline algorithm, which covers one aspect of the data node IDs. Structured data node IDs also allow for private module ID space, and for non-managed modules (e.g. as the example you provide). They also allow for having COMI-style hashes if you need them. The draft which will describe the full operation will come shortly after the YANG-CBOR draft.

I think that it would be nice if you can contribute, as your remarks can help clear the readability of the document and point on examples that must be provided to cover the full spectrum of YANG use-cases.

Best,
Alexander


Le 08/12/2015 12:53, Juergen Schoenwaelder a écrit :
On Tue, Dec 08, 2015 at 12:11:00PM +0100, Alexander Pelov wrote:
Dear Juergen,

See inline.
Le 8 déc. 2015 à 11:55, Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> a écrit :

On Tue, Dec 08, 2015 at 11:16:58AM +0100, Alexander Pelov wrote:
Dear Juergen,

The algorithm is straightforward - assign in increasing order a data
node ID to each element on the schema tree. If you have a revision of a
module, you do the diff between the old and the new tree, and add the
new data node IDs at the end of the numbering.
So I need access to the complete revision history in order to determine
data node IDs, correct?
It is not a must. You can manually indicate the node IDs of the newly added elements. If you want a completely automated allocation of IDs, then yes. The way I think this will work is - the publisher of a module will use the automatic tool to generate the statements, which will then be indicated in the YANG definition.
I want independently developed systems to interoperate. In general, I
can't assume modules have data node IDs (since a YANG module like lets
say ietf-interfaces simply does not define them).
What about imports without a revision (a nasty
source of ambiguity)?
There are two points in your question. The first is straightforward - Data node IDs make sense within the scope of a module. Changing a module does not affect the different modules which import it, with the possible exception of groupings, where the classical data node ID algorithm assignment kicks in (or manual ID assignment if the module author prefers so). In any case, I would refer you to RFC 6020, section 5.1.1. where the question of acceptability of imported modules is treated.
I am talking about imports _into_ a module that may be ambigous from
the viewpoint of the importing module. Section 5.1.1 is about import
by revision, my question was about what happens if there is an import
without revision. We had lengthy discussions in NETMOD what this means
for conformance and the outcome roughly is that this requires a
runtime lookup to find out which module revisions have been used by a
given implementation, that is, your algorithm would not only need the
complete revision history but also runtime information in order to
calculate unique data node ids.

There are alternate designs possible in the solution space. I like to
understand the trade-offs between them.

/js

_______________________________________________
core mailing list
core@ietf.org<mailto:core@ietf.org>
https://www.ietf.org/mailman/listinfo/core

--- Begin Message ---
As mentioned, data nodes added within the schema tree need to be manually assigned.



In the proposed example, If the “address-family” grouping is updated as follow:



    grouping address-family {

      description

        "This grouping provides a leaf identifying an address

       family.";

      leaf address-family {

        type identityref {

          base address-family;

        }

        mandatory true;

        description "Address family.";

      }



      leaf new-field {

        type uint8;

        mandatory false;

        description "Field added in this revision.";

      }

}  // grouping address-family



The following statements need to be added to the update YANG module to maintain the original IDs.



cool:id "/routing-state/routing-instance/default-ribs/default-rib/new-field 200";

cool:id "/routing-state/ribs/rib/new-field 201";

cool:id "/routing/routing-instance/default-ribs/default-rib/new-field 202";

cool:id "/routing/ribs/rib/new-field 203";

cool:id "/active-route/input/destination-address/new-field 204";



The resulting IDs for the new version of ietf-routing.yang will be:



ID            Data node

1              container /routing-state

2              list /routing-state/routing-instance

3              leaf /routing-state/routing-instance/name

4              leaf /routing-state/routing-instance/id

5              leaf /routing-state/routing-instance/type

6              leaf /routing-state/routing-instance/router-id

7              container /routing-state/routing-instance/default-ribs

8              list /routing-state/routing-instance/default-ribs/default-rib

9              leaf /routing-state/routing-instance/default-ribs/default-rib/address-family

200         leaf /routing-state/routing-instance/default-ribs/default-rib/new-field

10           leaf /routing-state/routing-instance/default-ribs/default-rib/rib-name

11           container /routing-state/routing-instance/interfaces

12           list /routing-state/routing-instance/interfaces/interface

13           leaf /routing-state/routing-instance/interfaces/interface/name

14           container /routing-state/routing-instance/routing-protocols

15           list /routing-state/routing-instance/routing-protocols/routing-protocol

16           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/name

17           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/type

18           container /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs

19           list /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib

20           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/rib-name

21           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/import-filter

22           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/export-filter

23           container /routing-state/ribs

24           list /routing-state/ribs/rib

25           leaf /routing-state/ribs/rib/name

26           leaf /routing-state/ribs/rib/id

27           leaf /routing-state/ribs/rib/address-family

201         leaf /routing-state/ribs/rib/new-field

28           container /routing-state/ribs/rib/routes

29           list /routing-state/ribs/rib/routes/route

30           leaf /routing-state/ribs/rib/routes/route/id

                choice /routing-state/ribs/rib/routes/route/next-hop-options

                case /routing-state/ribs/rib/routes/route/next-hop-options/special-next-hop

31           leaf /routing-state/ribs/rib/routes/route/next-hop-options/special-next-hop/special-next-hop

                case /routing-state/ribs/rib/routes/route/next-hop-options/simple-next-hop

32           leaf /routing-state/ribs/rib/routes/route/next-hop-options/simple-next-hop/outgoing-interface

                case /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list

33           container /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list

34           list /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop

35           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/id

36           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/outgoing-interface

37           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/priority

38           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/weight

39           leaf /routing-state/ribs/rib/routes/route/source-protocol

40           leaf /routing-state/ribs/rib/routes/route/last-updated

41           container /routing-state/ribs/rib/recipient-ribs

42           list /routing-state/ribs/rib/recipient-ribs/recipient-rib

43           leaf /routing-state/ribs/rib/recipient-ribs/recipient-rib/rib-name

44           leaf /routing-state/ribs/rib/recipient-ribs/recipient-rib/filter

45           container /routing-state/route-filters

46           list /routing-state/route-filters/route-filter

47           leaf /routing-state/route-filters/route-filter/name

48           leaf /routing-state/route-filters/route-filter/type

49           container /routing

50           list /routing/routing-instance

51           leaf /routing/routing-instance/name

52           leaf /routing/routing-instance/type

53           leaf /routing/routing-instance/enabled

54           leaf /routing/routing-instance/router-id

55           leaf /routing/routing-instance/description

56           container /routing/routing-instance/default-ribs

57           list /routing/routing-instance/default-ribs/default-rib

58           leaf /routing/routing-instance/default-ribs/default-rib/address-family

202         leaf /routing/routing-instance/default-ribs/default-rib/new-field

59           leaf /routing/routing-instance/default-ribs/default-rib/rib-name

60           container /routing/routing-instance/interfaces

61           list /routing/routing-instance/interfaces/interface

62           leaf /routing/routing-instance/interfaces/interface/name

63           container /routing/routing-instance/routing-protocols

64           list /routing/routing-instance/routing-protocols/routing-protocol

65           leaf /routing/routing-instance/routing-protocols/routing-protocol/name

66           leaf /routing/routing-instance/routing-protocols/routing-protocol/description

67           leaf /routing/routing-instance/routing-protocols/routing-protocol/enabled

68           leaf /routing/routing-instance/routing-protocols/routing-protocol/type

69           container /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs

70           list /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib

71           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/rib-name

72           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/import-filter

73           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/export-filter

74           container /routing/routing-instance/routing-protocols/routing-protocol/static-routes

75           container /routing/ribs

76           list /routing/ribs/rib

77           leaf /routing/ribs/rib/name

78           leaf /routing/ribs/rib/address-family

203         leaf /routing/ribs/rib/new-field

79           leaf /routing/ribs/rib/description

80           container /routing/ribs/rib/recipient-ribs

81           list /routing/ribs/rib/recipient-ribs/recipient-rib

82           leaf /routing/ribs/rib/recipient-ribs/recipient-rib/rib-name

83           leaf /routing/ribs/rib/recipient-ribs/recipient-rib/filter

84           container /routing/route-filters

85           list /routing/route-filters/route-filter

86           leaf /routing/route-filters/route-filter/name

87           leaf /routing/route-filters/route-filter/description

88           leaf /routing/route-filters/route-filter/type

89           rpc /active-route

90           container /active-route/input

91           leaf /active-route/input/routing-instance-name

92           container /active-route/input/destination-address

93           leaf /active-route/input/destination-address/address-family

204         leaf /active-route/input/destination-address/new-field

94           container /active-route/output

95           container /active-route/output/route

96           leaf /active-route/output/route/address-family

205         leaf /active-route/output/route/new-field

                choice /active-route/output/route/next-hop-options

98           case /active-route/output/route/next-hop-options/special-next-hop

97           leaf /active-route/output/route/next-hop-options/special-next-hop/special-next-hop

                case /active-route/output/route/next-hop-options/simple-next-hop

98           leaf /active-route/output/route/next-hop-options/simple-next-hop/outgoing-interface

                case /active-route/output/route/next-hop-options/next-hop-list

99           container /active-route/output/route/next-hop-options/next-hop-list/next-hop-list

100         list /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop

101         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/id

102         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/outgoing-interface

103         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/priority

104         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/weight

105         leaf /active-route/output/route/source-protocol

106         leaf /active-route/output/route/last-updated

107         rpc /route-count

108         container /route-count/input

109         leaf /route-count/input/rib-name

110         container /route-count/output

111         leaf /route-count/output/number-of-routes



I hope this example will help clarify the proposed solution.



Regards,



Michel Veillette
System Architecture Director

Trilliant Inc.
Tel: 450-375-0556 ext. 237
michel.veillette@trilliantinc.com<mailto:michel.veillette@trilliantinc.com>

www.trilliantinc.com<http://www.trilliantinc.com/>





From: Andy Bierman [mailto:andy@yumaworks.com]
Sent: 9 novembre 2015 18:47
To: Michel Veillette <Michel.Veillette@trilliantinc.com>
Cc: Carsten Bormann <cabo@tzi.org>; peter van der Stok <stokcons@xs4all.nl>; Alexander Pelov <alexander.pelov@telecom-bretagne.eu>; Turner, Randy <Randy.Turner@landisgyr.com>; Somaraju Abhinav <abhinav.somaraju@tridonic.com>
Subject: Re: CoMI / CoOL merge process



So what happens if an object is added to the grouping in the next release?

It renumbers your strings.  The old numbers after this uses-stmt expansion point

will all be changed.  YANG allows new objects to be added anywhere

in a new revision of a module.  Your auto-numbering only works for the first

revision of a module.





Andy





On Mon, Nov 9, 2015 at 3:37 PM, Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>> wrote:

   About “YANG allows objects to be added in groupings”



   draft-veillette-core-cool-00 section 6.2 say “When assigned automatically, data nodes are numbered based on their location in the schema tree.”

   The use of “schema tree” in this sentence should address your concerns about grouping and uses.



   If we take the YANG module http://www.netconfcentral.org/modules/ietf-routing/2014-05-24#router-id.236 as example.

   This module defines the following grouping:

   ·         grouping address-family

   ·         grouping state-entry-id

   ·         grouping router-id

   ·         grouping outgoing-interface

   ·         grouping special-next-hop

   ·         grouping next-hop-classifiers

   ·         grouping next-hop-content

   ·         grouping route-metadata



   The schema tree of this module is show below.

   Data node identifiers can be automatically assigned as follow.



   ID            Data node

   1              container /routing-state

   2              list /routing-state/routing-instance

   3              leaf /routing-state/routing-instance/name

   4              leaf /routing-state/routing-instance/id

   5              leaf /routing-state/routing-instance/type

   6              leaf /routing-state/routing-instance/router-id

   7              container /routing-state/routing-instance/default-ribs

   8              list /routing-state/routing-instance/default-ribs/default-rib

   9              leaf /routing-state/routing-instance/default-ribs/default-rib/address-family

   10           leaf /routing-state/routing-instance/default-ribs/default-rib/rib-name

   11           container /routing-state/routing-instance/interfaces

   12           list /routing-state/routing-instance/interfaces/interface

   13           leaf /routing-state/routing-instance/interfaces/interface/name

   14           container /routing-state/routing-instance/routing-protocols

   15           list /routing-state/routing-instance/routing-protocols/routing-protocol

   16           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/name

   17           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/type

   18           container /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs

   19           list /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib

   20           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/rib-name

   21           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/import-filter

   22           leaf /routing-state/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/export-filter

   23           container /routing-state/ribs

   24           list /routing-state/ribs/rib

   25           leaf /routing-state/ribs/rib/name

   26           leaf /routing-state/ribs/rib/id

   27           leaf /routing-state/ribs/rib/address-family

   28           container /routing-state/ribs/rib/routes

   29           list /routing-state/ribs/rib/routes/route

   30           leaf /routing-state/ribs/rib/routes/route/id

                   choice /routing-state/ribs/rib/routes/route/next-hop-options

                   case /routing-state/ribs/rib/routes/route/next-hop-options/special-next-hop

   31           leaf /routing-state/ribs/rib/routes/route/next-hop-options/special-next-hop/special-next-hop

                   case /routing-state/ribs/rib/routes/route/next-hop-options/simple-next-hop

   32           leaf /routing-state/ribs/rib/routes/route/next-hop-options/simple-next-hop/outgoing-interface

                   case /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list

   33           container /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list

   34           list /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop

   35           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/id

   36           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/outgoing-interface

   37           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/priority

   38           leaf /routing-state/ribs/rib/routes/route/next-hop-options/next-hop-list/next-hop-list/next-hop/weight

   39           leaf /routing-state/ribs/rib/routes/route/source-protocol

   40           leaf /routing-state/ribs/rib/routes/route/last-updated

   41           container /routing-state/ribs/rib/recipient-ribs

   42           list /routing-state/ribs/rib/recipient-ribs/recipient-rib

   43           leaf /routing-state/ribs/rib/recipient-ribs/recipient-rib/rib-name

   44           leaf /routing-state/ribs/rib/recipient-ribs/recipient-rib/filter

   45           container /routing-state/route-filters

   46           list /routing-state/route-filters/route-filter

   47           leaf /routing-state/route-filters/route-filter/name

   48           leaf /routing-state/route-filters/route-filter/type

   49           container /routing

   50           list /routing/routing-instance

   51           leaf /routing/routing-instance/name

   52           leaf /routing/routing-instance/type

   53           leaf /routing/routing-instance/enabled

   54           leaf /routing/routing-instance/router-id

   55           leaf /routing/routing-instance/description

   56           container /routing/routing-instance/default-ribs

   57           list /routing/routing-instance/default-ribs/default-rib

   58           leaf /routing/routing-instance/default-ribs/default-rib/address-family

   59           leaf /routing/routing-instance/default-ribs/default-rib/rib-name

   60           container /routing/routing-instance/interfaces

   61           list /routing/routing-instance/interfaces/interface

   62           leaf /routing/routing-instance/interfaces/interface/name

   63           container /routing/routing-instance/routing-protocols

   64           list /routing/routing-instance/routing-protocols/routing-protocol

   65           leaf /routing/routing-instance/routing-protocols/routing-protocol/name

   66           leaf /routing/routing-instance/routing-protocols/routing-protocol/description

   67           leaf /routing/routing-instance/routing-protocols/routing-protocol/enabled

   68           leaf /routing/routing-instance/routing-protocols/routing-protocol/type

   69           container /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs

   70           list /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib

   71           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/rib-name

   72           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/import-filter

   73           leaf /routing/routing-instance/routing-protocols/routing-protocol/connected-ribs/connected-rib/export-filter

   74           container /routing/routing-instance/routing-protocols/routing-protocol/static-routes

   75           container /routing/ribs

   76           list /routing/ribs/rib

   77           leaf /routing/ribs/rib/name

   78           leaf /routing/ribs/rib/address-family

   79           leaf /routing/ribs/rib/description

   80           container /routing/ribs/rib/recipient-ribs

   81           list /routing/ribs/rib/recipient-ribs/recipient-rib

   82           leaf /routing/ribs/rib/recipient-ribs/recipient-rib/rib-name

   83           leaf /routing/ribs/rib/recipient-ribs/recipient-rib/filter

   84           container /routing/route-filters

   85           list /routing/route-filters/route-filter

   86           leaf /routing/route-filters/route-filter/name

   87           leaf /routing/route-filters/route-filter/description

   88           leaf /routing/route-filters/route-filter/type

   89           rpc /active-route

   90           container /active-route/input

   91           leaf /active-route/input/routing-instance-name

   92           container /active-route/input/destination-address

   93           leaf /active-route/input/destination-address/address-family

   94           container /active-route/output

   95           container /active-route/output/route

   96           leaf /active-route/output/route/address-family

                   choice /active-route/output/route/next-hop-options

   98           case /active-route/output/route/next-hop-options/special-next-hop

   97           leaf /active-route/output/route/next-hop-options/special-next-hop/special-next-hop

                   case /active-route/output/route/next-hop-options/simple-next-hop

   98           leaf /active-route/output/route/next-hop-options/simple-next-hop/outgoing-interface

                   case /active-route/output/route/next-hop-options/next-hop-list

   99           container /active-route/output/route/next-hop-options/next-hop-list/next-hop-list

   100         list /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop

   101         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/id

   102         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/outgoing-interface

   103         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/priority

   104         leaf /active-route/output/route/next-hop-options/next-hop-list/next-hop-list/next-hop/weight

   105         leaf /active-route/output/route/source-protocol

   106         leaf /active-route/output/route/last-updated

   107         rpc /route-count

   108         container /route-count/input

   109         leaf /route-count/input/rib-name

   110         container /route-count/output

   111         leaf /route-count/output/number-of-routes



   About “It also allows objects to be added anywhere inline in a new revision of the module.”



   This question have been already answer in my email of 2015-11-04 13:53



   draft-veillette-core-cool-00 section 6.2<https://tools.ietf.org/html/draft-veillette-core-cool-00#section-6.2>, address this point specifically.

   “When a module is updated, old Data node IDs can be preserved by

   adding top level data nodes to the end of the module or by

   manually assigning new data nodes within the schema tree.”



   Similarly, RPCs or notifications can be added to the end.
   Since there order of these objects have no semantic meaning, manual assignment

   of Protocol operation ID and Notification ID is not required during a revision of the YANG module.



   Further clarifications have been provided in my email of 2015-11-04 14:09



   The text take into consideration the fact that “YANG is hierarchical”, this is why there is two cases.



   ·         For “top level data nodes”, added to the end

   ·         For non “top level data nodes”, manually assign



   So only non “top level data nodes” need to be manually assigned when added during a YANG module update.



   It is important to note that data nodes added using the augment statement have no effect since they are allocated using a different module ID.









Michel Veillette
System Architecture Director

Trilliant Inc.
Tel: 450-375-0556 ext. 237
michel.veillette@trilliantinc.com<mailto:michel.veillette@trilliantinc.com>

www.trilliantinc.com<http://www.trilliantinc.com/>





   From: Andy Bierman [mailto:andy@yumaworks.com<mailto:andy@yumaworks.com>]
   Sent: 9 novembre 2015 17:41
   To: Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>>
   Subject: Re: CoMI / CoOL merge process



   YANG allows objects to be added in groupings.

   It also allows objects to be added anywhere inline

   in a new revision of the module.





   Andy





   On Mon, Nov 9, 2015 at 2:35 PM, Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>> wrote:

      Can you provide at least one example where these rules doesn`t work.





Michel Veillette
System Architecture Director

Trilliant Inc.
Tel: 450-375-0556 ext. 237
michel.veillette@trilliantinc.com<mailto:michel.veillette@trilliantinc.com>

www.trilliantinc.com<http://www.trilliantinc.com/>





      From: Andy Bierman [mailto:andy@yumaworks.com<mailto:andy@yumaworks.com>]
      Sent: 9 novembre 2015 16:44
      To: Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>>
      Cc: Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>>; peter van der Stok <stokcons@xs4all.nl<mailto:stokcons@xs4all.nl>>; Alexander Pelov <alexander.pelov@telecom-bretagne.eu<mailto:alexander.pelov@telecom-bretagne.eu>>; Turner, Randy <Randy.Turner@landisgyr.com<mailto:Randy.Turner@landisgyr.com>>; Somaraju Abhinav <abhinav.somaraju@tridonic.com<mailto:abhinav.somaraju@tridonic.com>>
      Subject: Re: CoMI / CoOL merge process







      On Mon, Nov 9, 2015 at 1:25 PM, Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>> wrote:

         The only ID which need to be registered is the module ID.



         Section 6 of draft-veillette-core-cool-00 defines the rules to automatically assign IDs to the data nodes, RPCs, Input parameters, Output parameters, notification and notification parameters.





      these don't work.



         Data node IDs are based on the schema tree (see section 3 of RFC 6020 - The definition hierarchy specified within a module.). The schema tree is independent of the order the statements in YANG files and independent of the use of grouping and sub-modules.  Grouping can be introduce or remove without affecting the schema tree.



         Tools like http://www.netconfcentral.com/run_yangdump  (Great tool I’m sure you known very well) automatically output this schema tree.





Michel Veillette
System Architecture Director

Trilliant Inc.
Tel: 450-375-0556 ext. 237
michel.veillette@trilliantinc.com<mailto:michel.veillette@trilliantinc.com>

www.trilliantinc.com<http://www.trilliantinc.com/>





         From: Andy Bierman [mailto:andy@yumaworks.com<mailto:andy@yumaworks.com>]
         Sent: 9 novembre 2015 16:02
         To: Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>>
         Cc: Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>>; peter van der Stok <stokcons@xs4all.nl<mailto:stokcons@xs4all.nl>>; Alexander Pelov <alexander.pelov@telecom-bretagne.eu<mailto:alexander.pelov@telecom-bretagne.eu>>; Turner, Randy <Randy.Turner@landisgyr.com<mailto:Randy.Turner@landisgyr.com>>; Somaraju Abhinav <abhinav.somaraju@tridonic.com<mailto:abhinav.somaraju@tridonic.com>>
         Subject: Re: CoMI / CoOL merge process



         Hi,



         I don't think this will work.

         IMO manual numbering will be needed but missed or mismanaged.

         E.g., objects added to an external grouping get expanded at run-time.

         There is no way to number them in the "uses" statement.



         I don't see how the registry approach can possibly work.

         Also in order to support unregistered managed IDs, there needs

         to be a mapping between object ID strings and numbers.  If the server has to

         provide this, then why bother with registered numbers at all?



         And if the server provides any mapping whatsoever, then that means

         the numbers are not universal and maybe not even permanent.

         It also means the client has to store and understand all the strings, in order to

         resolve the numeric mappings.





         Andy





         On Mon, Nov 9, 2015 at 12:48 PM, Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>> wrote:

            IETF uses an automated system to register thousands of participants for each IETF meeting.

            Can we use the same type of system to register these Module IDs?

            Can we charge a reasonable fee (e.g. 20$) to pay for this infrastructure and avoid malicious peoples to starve the available ID space?





Michel Veillette
System Architecture Director

Trilliant Inc.
Tel: 450-375-0556 ext. 237
michel.veillette@trilliantinc.com<mailto:michel.veillette@trilliantinc.com>

www.trilliantinc.com<http://www.trilliantinc.com/>





            From: Andy Bierman [mailto:andy@yumaworks.com<mailto:andy@yumaworks.com>]
            Sent: 9 novembre 2015 05:22
            To: Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>>
            Cc: Michel Veillette <Michel.Veillette@trilliantinc.com<mailto:Michel.Veillette@trilliantinc.com>>; peter van der Stok <stokcons@xs4all.nl<mailto:stokcons@xs4all.nl>>; Alexander Pelov <alexander.pelov@telecom-bretagne.eu<mailto:alexander.pelov@telecom-bretagne.eu>>; Turner, Randy <Randy.Turner@landisgyr.com<mailto:Randy.Turner@landisgyr.com>>; Somaraju Abhinav <abhinav.somaraju@tridonic.com<mailto:abhinav.somaraju@tridonic.com>>
            Subject: Re: CoMI / CoOL merge process







            On Fri, Nov 6, 2015 at 3:07 PM, Carsten Bormann <cabo@tzi.org<mailto:cabo@tzi.org>> wrote:

               Andy Bierman wrote:
               > Hi,
               >
               > The CORE WG is very skilled at optimizing bytes on the wire,

               That is not the only objective; CoRE is also about reducing complexity
               at the constrained nodes.

               > but IMO there are some "forest" type questions that are unanswered,
               > like "what organization is going to register YANG module and object IDs?"

               Indeed, this is the most interesting question when we go to a registered
               appraoch.  Not just "which organization", but "what is the workflow" and
               "who ensures the stability of the code point space".





            It seems like a waste of time to develop a hard-wired numbering approach

            while ignoring this question.  IANA is going to be advised not to accept

            this new registry, not that they would accept it anyway.  Given the comments

            in the meeting that registrations doesn't work because about half the IDs

            will never get registered, it is not even clear that an IANA registry is sufficient.





            Andy





               > "if JSON is already required, it is a good idea to require CBOR as well"

               Who says JSON is required (on the constrained node)?

               > "If there are only 11 or so attributes everybody agrees on, then why
               > is a complex protocol and YANG language needed?"

               If you need 11 variables (is that what you mean?), OMA LWM2M is probably
               a good framework.  COMI is more about networks with specific management
               requirements (think LORA/LP-WAN), and about integrating network
               management, application management, and even some application semantics.

               > It seems everybody in the WG has a different view, depending
               > on their own use-cases (including me).

               Yes, we have to work on creating consensus wrt our assumptions and
               goals. Maybe writing a document (or more likely a section in one of the
               documents) would help.

               > But mostly, "If full RESTCONF is the goal, then why bother defining
               > a new protocol?

               Is it?  I think the "full" comes in where we want to allow a
               permissionless path to using variables from YANG modules that may not
               have been written with COMI in mind.  I don't think this will be a "full
               RESTCONF".

               > Isn't the HTTP to CoAP proxy translation good enough?

               The way RESTCONF is defined today (with XPath and all), no.
               That is what gives us the opportunity to go full way to a COMI/COOL-like
               appraoch.

               > I already have to implement a gateway because many RESTCONF clients
               > are not going to be rewritten just for CoMI.  If the native CoAP server
               > is way different then it will double the development effort.

               Ah, but then you can charge twice as much :-)
               Keeping the complexity down is still the main goal.  With a focus on the
               constrained node, but complexity on cross-protocol proxies also needs to
               be kept down.

               Grüße, Carsten











--- End Message ---