Re: [netmod] Y34 - root node

"Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com> Mon, 10 August 2015 09:30 UTC

Return-Path: <einarnn@cisco.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A59801B33B4 for <netmod@ietfa.amsl.com>; Mon, 10 Aug 2015 02:30:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -13.31
X-Spam-Level:
X-Spam-Status: No, score=-13.31 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, J_CHICKENPOX_15=0.6, J_CHICKENPOX_34=0.6, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_DKIM_WL=-7.5] autolearn=ham
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 osz9YDNYvFVl for <netmod@ietfa.amsl.com>; Mon, 10 Aug 2015 02:29:54 -0700 (PDT)
Received: from alln-iport-4.cisco.com (alln-iport-4.cisco.com [173.37.142.91]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8A7AB1B33B3 for <netmod@ietf.org>; Mon, 10 Aug 2015 02:29:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=37236; q=dns/txt; s=iport; t=1439198994; x=1440408594; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=aIdmBeD6wHswE7HihUotLItQnBYz8pM1uchmex8/8JM=; b=ENkh/VNwWhxc2OzsvP9YUzmhepFAhoXGNst4dMWvFy3yDaBWibEMJEyK kET2BJIHjuhR0i4u7n7t8s+kL4LAg6GXHxbFOxOvye80DYYzmU1qKFAOp f+y897z0NjUIkHnoeH9LY6u8u8Dy2cQ/eqxYbkAvZhpEu37lKzCfuYW1D M=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0A5CgBtbshV/5xdJa1dgk5NVGkGgx6qJI9Cgi0BCYUvSgIcgRM8EAEBAQEBAQGBCoQjAQEBAwEBAQEgSwQHBQcEAgEIEAEEAQEBFQsHAwICAiULFAkIAgQOBRkCiAsIDbgYlWEBAQEBAQEBAQEBAQEBAQEBAQEBAQEXik6BA4Q+MBcEBwYEgl8vgRQFjFQBiDYBhQGCaYR4gUlGhnaNEoNmERWCDhyBU3EBgUeBBAEBAQ
X-IronPort-AV: E=Sophos;i="5.15,644,1432598400"; d="scan'208,217";a="177138850"
Received: from rcdn-core-5.cisco.com ([173.37.93.156]) by alln-iport-4.cisco.com with ESMTP; 10 Aug 2015 09:29:52 +0000
Received: from XCH-ALN-013.cisco.com (xch-aln-013.cisco.com [173.36.7.23]) by rcdn-core-5.cisco.com (8.14.5/8.14.5) with ESMTP id t7A9TqXl004641 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 09:29:52 GMT
Received: from xch-aln-013.cisco.com (173.36.7.23) by XCH-ALN-013.cisco.com (173.36.7.23) with Microsoft SMTP Server (TLS) id 15.0.1104.5; Mon, 10 Aug 2015 04:29:51 -0500
Received: from xhc-aln-x13.cisco.com (173.36.12.87) by xch-aln-013.cisco.com (173.36.7.23) with Microsoft SMTP Server (TLS) id 15.0.1104.5 via Frontend Transport; Mon, 10 Aug 2015 04:29:51 -0500
Received: from xmb-aln-x15.cisco.com ([169.254.9.148]) by xhc-aln-x13.cisco.com ([173.36.12.87]) with mapi id 14.03.0248.002; Mon, 10 Aug 2015 04:29:51 -0500
From: "Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com>
To: Jonathan Hansford <jonathan@hansfords.net>
Thread-Topic: [netmod] Y34 - root node
Thread-Index: AQHQzfwQ7zjuRBGFiEyMX11aiFLAyp36tNgA//+74pCAAFbtgIAAz0+UgADCtACABfPGAIAC/I6AgAAMEQA=
Date: Mon, 10 Aug 2015 09:29:50 +0000
Message-ID: <B638E6EC-24C3-4819-8107-4C97EF366833@cisco.com>
References: <e30a7cae98788842423d1a1ad5760d81077a8ed1@webmail.hansfords.net>
In-Reply-To: <e30a7cae98788842423d1a1ad5760d81077a8ed1@webmail.hansfords.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [173.36.7.29]
Content-Type: multipart/alternative; boundary="_000_B638E6EC24C3481981074C97EF366833ciscocom_"
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/netmod/N4gnqKtG4P93nVixI7r1ICEOy9g>
Cc: NETMOD Working Group <netmod@ietf.org>
Subject: Re: [netmod] Y34 - root node
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 10 Aug 2015 09:30:01 -0000

As someone sharing responsibilities for guiding a number of development teams both defining new models and implementing to some already defined models in this area, I can only agree with this addition to what I said earlier.

Cheers,

Einar

On Aug 10, 2015, at 9:46 AM, Jonathan Hansford <jonathan@hansfords.net<mailto:jonathan@hansfords.net>> wrote:

 And it is not just end users who need help to better understand YANG models and how to use them. For those still on the edge, looking to finally take the plunge and use NETCONF/YANG to configure their devices, help is also required to determine how best to structure their YANG models, make use of the existing ones, etc. For those who have "grown up" with the developments in NETCONF and YANG, much of this is probably second nature. But coming to it cold (in the sense of compiling/writing a first set of YANG models for a device; I've been following the netconf/netmod WGs for 3+ years), it still feels very much like a dark art! It is not just the individual modules, it is how to put them together to best manage a device (let alone a system).

Jonathan



----- Original Message -----
From:
"Einar Nilsen-Nygaard (einarnn)" <einarnn@cisco.com<mailto:einarnn@cisco.com>>

To:
"Andy Bierman" <andy@yumaworks.com<mailto:andy@yumaworks.com>>
Cc:
"NETMOD Working Group" <netmod@ietf.org<mailto:netmod@ietf.org>>
Sent:
Sat, 8 Aug 2015 11:10:15 +0000
Subject:
Re: [netmod] Y34 - root node


Andy,

I agree that there is a need for organization of models, but I don’t have a firm position on draft-openconfig-netmod-model-structure/draft-rtgyangdt-rtgwg-device-model or draft-bierman-netmod-yang-package. But we absolutely need *something* to help end-users of the models comprehend the overall structure of models, their relationship and how to use them.

Cheers,

Einar

On Aug 4, 2015, at 5:16 PM, Andy Bierman <andy@yumaworks.com<mailto:andy@yumaworks.com>> wrote:



On Tue, Aug 4, 2015 at 2:34 AM, t.petch <ietfc@btconnect.com<mailto:ietfc@btconnect.com>> wrote:
----- Original Message -----
From: "Andy Bierman" <andy@yumaworks.com<mailto:andy@yumaworks.com>>
To: "t.petch" <ietfc@btconnect.com<mailto:ietfc@btconnect.com>>
Sent: Monday, August 03, 2015 5:17 PM

> ----- Original Message -----
> From: "Andy Bierman" <andy@yumaworkscom<mailto:andy@yumaworks.com>>
> To: "t.petch" <ietfc@btconnect.com<mailto:ietfc@btconnect.com>>
> Sent: Monday, August 03, 2015 4:10 PM
>
> > ----- Original Message -----
> > From: "Andy Bierman" andy@yumaworks.com<mailto:andy@yumaworks.com>
> > Sent: Saturday, August 01, 2015 7:05 PM
> > On Sat, Aug 1, 2015 at 9:51 AM, Acee Lindem (acee) <acee@cisco.com<mailto:acee@cisco.com>>
> >
>>> On 8/1/15, 2:51 AM,  j.schoenwaelder@jacobs-university.de<mailto:j.schoenwaelder@jacobs-university.de>> wrote:
>>>
>>> Section 1.1 in
>>>
> https://www.ietf.org/id/draft-openconfig-netmod-model-structure-00.txt
>>> lists the goals of a generic model structure that will accommodate
>> most
>>> modern network devices. I guess you don’t agree that these are
>> desirable?
> >
> > The only objection I have to this draft is the insertion of a
top-level
> > root
> > called "device".  (Might as well be called "self").
> > There are no sibling nodes planned or intended for
> > this node, so it serves as an extra document root.
> >
> > <tp>
> > One aspect of YANG I have never grasped is what a root means, if
> > anything.
> >
> > I understand that it is needed for NETCONF (filters) and for YANG
> > (augments, constraints) and so must be somewhere and must be
> relatively
> > stable, but has it any other significance in the data model?
> >
> > As you may recall, I was involved with SMI first, where the root is
> > somewhere up in the sky and life only becomes interesting some six
> > levels down the hierarchy and that may colour my thinking.
> >
>
> YANG does a poor job of defining the root for YANG data nodes.
> It is sometimes called a datastore (in the abstract).
> Technically, YANG borrows the definition from XPath.
> YANG just defines top-level data nodes and the parent of
> these nodes is the document root
>
> There is no protocol or encoding neutral definition,
> only an XML-specific definition.
>
> <tp>
>
> Thanks for that.
>
> It seems to me that much of the extensive discussion on Y34 (all of
> which I have read) is as much political as technical, that is SMI is
> hierarchical, top down, perhaps befitting its origins in ISO, whereas
> YANG is bottom up. IETF-like.  YANG could have had a single tree, but
> doesn't.  So when I read
>
> https://www.ietf.org/id/draft-openconfig-netmod-model-structure-00.txt
>
> I see a plea for a more hierarchical organisation, and when I read
>
> draft-bjorklund-netmod-openconfig-reply-00
>
> I see a response that says we are not like that.
>
> If so, I doubt that there ever will be a technical solution.
>
> And I am mindful that when I configure routing in a (Cisco) router, I
> have to do some of it under the interface definitions and some of it
> under the definition of the routing protocol.  Which is life, never
> wholy interface-centric and never wholy routing protocol-centric!

Are you saying the job would be easier if the
path was /device/interfaces/interface instead
of just /interfaces/interface?  Are you saying
that /protocols/routing could not also be defined?
Clearly edit-config and copy-config allow both
subtrees to be accessed in the same operation,
so I don't understand your concern.

I have been trying to get the root node to be better defined
in the protocols that use YANG (i.e., ncx:root, Y34-04).
IMO this is a better approach than defining a YANG module
with a special container that all other modules are expected
to augment.  YANG is designed such that each vendor or SDO
is not dependent on other vendors or SDOs in order to
define data nodes.

<tp>

Andy

I am agreeing with you that adding 'device' brings no technical benefit,
rather that the motivation is the opposite of technical (which I
referred to as political). I am also agreeing with the current declared
consensus on Y34.

And yes, YANG is going to give us a large number of modules, some
tightly coupled (augments) some loosely so (how many do you need to
configure OSPF?) and work in this area will be of benefit now and
probably essential in a few years time.  That said, I am unsure what
such work would be like; I am looking (in despair) at 50 routing area
YANG models and wondering how a user will ever get a coherent picture of
how to do what they want to do.



The "YANG Land Grab" gives a false sense of progress.
Reaching WG consensus on every single leaf is hard work.

I don't think a collection of 100s of YANG modules is ever
going to to be easy to understand.  Operators will not examine
a NETCONF <hello> message, look at 150 module URIs,
and say "I know exactly what this device supports".
I guess it is up to client tools to do that

I wrote a draft that defines YANG Packages, which can provide
a higher level of organization for YANG modules.

http://datatracker.ietf.org/doc/draft-bierman-netmod-yang-package/

You and I are apparently in the minority, since the official status
is that there is no problem with the current approach, and no need
to organize individual YANG modules into any larger abstractions.



 Tom Petch



Andy

Andy

> Andy
>
> > The well-specified XPath and YANG root (/) can be
> > accessed by all protocol operations, exactly the same
> > as a node called 'device'.  The actual node name will
> > depend on the RPC function (e.g. 'data' or 'config').
> >
> > This is more than redundant however.  It introduces a "super-module"
> > into YANG that every other module is expected to augment.
> > YANG is intended to be more loosely coupled than that.
> > This introduces an extra node and namespace declaration
> > in all protocol messages, increasing message sizes.
> >
> > It also assumes all existing YANG models will get rewritten to
> > account for "/device" in all path and XPath expressions.
> > This is highly disruptive to existing deployments.
> > Also, multiple data models to edit the same thing causes lots
> > of extra complexity in the server (supporting both old
> > location and new location).
> >
> > IMO a resource directory approach is much more realistic.
> > The /device tree can contain all the organized NP containers.
> > Instead of all the actual data nodes, this tree just has pointers
> > to the real location of the resource. (like 301 Moved Permanently)
> >
> > > Acee
> > >
> > Andy


** Solution Y34-02

  Keep 'anyxml'.  Introduce 'anydata' as above but without the
  'format' substatement.

  'anyxml' would still be used to represent unrestricted XML, as is
  done in NETCONF.

  'anydata' would be an unknown chunk of data that can be modelled
  with YANG.  Can be encoded as xml or json.

  For example:

    #+BEGIN_EXAMPLE
    anydata data;
    #+END_EXAMPLE

** Solution Y34-05

   Same as Y34-02 plus two guidelines adopted from Y34-04:

   - Keep 'anyxml' unchanged as it is defined in YANG 1.0. This
     ensures backward compatibility.
   - Introduce a new 'anydata' statement that represents an unknown
     chunk of data that can be modeled with YANG
   - Document that implementations MAY have restrictions for anyxml and
     that anyxml is not necessarily interoperable; data model writers
     should use anydata whenever possible.
   - The guidelines document should say that YANG Doctors will review
     each use of anyxml in IETF modules when YANG 1.1 is adopted to
     avoid its use whenever possible.


>


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