Re: [Netconf] Advertisement of imported features

Martin Bjorklund <mbj@tail-f.com> Tue, 08 January 2019 20:17 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 693A0131024 for <netconf@ietfa.amsl.com>; Tue, 8 Jan 2019 12:17:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=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 zJ7e9rB_P9WD for <netconf@ietfa.amsl.com>; Tue, 8 Jan 2019 12:17:45 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 44E8A130F96 for <netconf@ietf.org>; Tue, 8 Jan 2019 12:17:45 -0800 (PST)
Received: from localhost (h-4-215.A165.priv.bahnhof.se [158.174.4.215]) by mail.tail-f.com (Postfix) with ESMTPSA id 3476B1AE02BB; Tue, 8 Jan 2019 21:17:44 +0100 (CET)
Date: Tue, 08 Jan 2019 21:17:44 +0100 (CET)
Message-Id: <20190108.211744.668138017756360782.mbj@tail-f.com>
To: muly_i@rad.com
Cc: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <AM6PR03MB45528D27D49E7F090012326BF98A0@AM6PR03MB4552.eurprd03.prod.outlook.com>
References: <AM6PR03MB45528D27D49E7F090012326BF98A0@AM6PR03MB4552.eurprd03.prod.outlook.com>
X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/XwZy31r-9FsIaGOv2mFVlHKvJyY>
Subject: Re: [Netconf] Advertisement of imported features
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Jan 2019 20:17:47 -0000

Hi,

Muly Ilan <muly_i@rad.com> wrote:
> Hi,
> 
> Not sure whether import of features from one module to the other is
> fully supported by YANG and NETCONF.
> 
> For example, with these modules:
> 
> module alpha {
>   namespace "http://example.com/alpha";
>   prefix "a";
> 
>   feature a-feature;
> 
>   leaf aoo {
>     if-feature a-feature;
>     type string;
>   }
> 
>   leaf a2 {
>     type string;
>   }
> 
> }
> 
> 
> module beta {
>   namespace "http://example.com/beta";
>   prefix "b";
> 
>   import alpha {
>     prefix a;
>   }
> 
>   leaf boo {
>     if-feature a:a-feature;
>     type string;
>   }
> 
>   leaf b2 {
>     type string;
>   }
> 
> }
> 
> The intension is re-use of the feature "a-feature" in the importing
> module "beta".

The statement

  if-feature a:a-feature;

means that the boo leaf if valid if the "a-feature" in module "a" is
supported in the server.

> Now, how should a server advertise the support of "a-feature" in
> module "beta"?

It doesnt; it should advertise module "alpha" with "a-feature", and
"beta" w/o any features.

> 
> 1.      YANG 1.0
> According to section 5.6.4 of RFC6020 the NETCONF <hello> message is
> used.
> So, I assume the <hello> should contain the following:
> <capability>
>   http://example.com/beta?module=beta&amp;features=a:a-feature
> </capability>
> 
> Is the above a valid capability?

No.  It should be:

 <capability>
   http://example.com/alhpa?module=alpha&amp;features=a:a-feature
 </capability>
 <capability>
   http://example.com/beta?module=beta
 </capability>

> 2.      YANG 1.1
> According to section 5.6.4 of RFC7950 the "ietf-yang-library" defined
> in RFC7895 must be implemented.
> 
> The relevant node definition from RFC7895:
> 
>        leaf-list feature {
>          type yang:yang-identifier;
>          description
>            "List of all YANG feature names from this module that are
>             supported by the server, regardless whether they are defined
>             in the module or any included submodule.";
>        }
> 
> But the pattern of the typedef "yang:yang-identifier" does not permit
> a prefix.
> 
> Can this be fixed in draft-ietf-netconf-rfc7895bis ?

As per above, this is not needed.


/martin

> 
> 
> Regards,
> 
> Muly
> 
> 
> [RAD.jpg]
> 
> Muly Ilan
> Senior System Architect
> M: +972-54-470-1004 | muly_i@rad.com<mailto:muly_i@rad.com>
> T:  +972-3-765-7035   | F: +972-3-644-0898
> 
> www.rad.com<http://www.rad.com> | Follow RAD on
> LinkedIn<http://www.linkedin.com/company/7369/> |
> Facebook<http://www.facebook.com/pages/RAD-Data-Communications/72479223117>
> | Twitter<http://twitter.com/raddatacomms> |
> YouTube<http://www.youtube.com/user/radwebmaster#g/u>
> 
> 
> 
> 
> 
> 
>