Re: [Netconf] Advertisement of imported features

Muly Ilan <muly_i@rad.com> Tue, 08 January 2019 20:39 UTC

Return-Path: <muly_i@rad.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 6580813113A for <netconf@ietfa.amsl.com>; Tue, 8 Jan 2019 12:39:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=rad365.onmicrosoft.com
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 mXPLqABd1Sp3 for <netconf@ietfa.amsl.com>; Tue, 8 Jan 2019 12:39:40 -0800 (PST)
Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 569031310E6 for <netconf@ietf.org>; Tue, 8 Jan 2019 12:39:40 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rad365.onmicrosoft.com; s=selector1-rad-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FPt3lnNA5HB2y4bZDKKFsUDDfkEJYbdkbteA9Xym1Hk=; b=YaYTIFyUBw8ysfdDMOno5ENAuxYGbDr1aVaumNEmEktUDWmWHTbkFCQHpMrnrFwxrCk+qcdve6UV94vujNonrSxahBOcgqRfQ+f6l3vOoDKcRM4dCTHeevf4ndj4OS+q7iut/NI52rjelysiUX0Ra4hrRNQIvVZfLjlVH2pzvk4=
Received: from AM6PR03MB4552.eurprd03.prod.outlook.com (20.177.34.27) by AM6PR03MB4150.eurprd03.prod.outlook.com (20.177.32.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1495.9; Tue, 8 Jan 2019 20:39:37 +0000
Received: from AM6PR03MB4552.eurprd03.prod.outlook.com ([fe80::f0b1:7a5e:6586:3baa]) by AM6PR03MB4552.eurprd03.prod.outlook.com ([fe80::f0b1:7a5e:6586:3baa%3]) with mapi id 15.20.1495.011; Tue, 8 Jan 2019 20:39:37 +0000
From: Muly Ilan <muly_i@rad.com>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] Advertisement of imported features
Thread-Index: AdSnjQMY5eKp8OomTrui8VBeVcm7yQAAjOUAAAAvi6A=
Date: Tue, 08 Jan 2019 20:39:37 +0000
Message-ID: <AM6PR03MB455233DEEA7ED4870B10872BF98A0@AM6PR03MB4552.eurprd03.prod.outlook.com>
References: <AM6PR03MB45528D27D49E7F090012326BF98A0@AM6PR03MB4552.eurprd03.prod.outlook.com> <20190108.211744.668138017756360782.mbj@tail-f.com>
In-Reply-To: <20190108.211744.668138017756360782.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=muly_i@rad.com;
x-originating-ip: [37.142.37.251]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; AM6PR03MB4150; 6:WYy5SLJvjqL58EncwVpTuIJAmCQXTBYYL8j123RcvAqBa6HZmPrw2VzL2ebw8W1VSKIfamIvf1rUR2zJbdeaUg8PW+O/CVctQ0e5lL9h/g5IWov103EE3uV9XNImblN4zWS2yAvDhybCHwDTN1+V+iWWWvmdMJM1js3MC12k3lq/p2f6mfJpEF7MnyngGwJEC1fiLw05fOJG682+XdyTejNo2fEqAej2AkXOWbBpjhY0GxG7VOF4w+eBEBhY0k8m2CA2BzBTxIRSnXTz2zBW0aDXbDGp01GkMK4KEyoUMGzxcouo/tXc+u01dwGYO2NA4JBZAIkICwOuoIwkcdExur63zfEvUzbXvW5UvoDEwzE5o0uSZ9HoAu4ZxG+HMPIHsED/M9tBnsBImj2XwdCbk9Vg9/G9AtUaf5M7zLFjqvxpvz96/rpfMl6/AW2N8CuwI0JAX/Jg/BFd5GRxk/ocvw==; 5:HgLgRkwsPtOxlNZsReg0ClbeTETHVuzlC1c+Hscpp/+/3Gaj4UNo0phm1OWY0CP4kRDBsOYvXHlmQJ85lb+IcpiuERIDPrJVG5P9avQyRhq8yaUFgbXZQFmpqjom5XgNxnIF4wje4B6NlIrdUfQqSceteTDJ6nXS/7XzHXjyHySRgH2L0NnaTAzTlnuiYIu3L6z6p4M1oSqS3XY18tY7MA==; 7:QIaJY/qTYr7Aa4PX35Kp6b1E++biMVa77FdZyz1aQkEa1/Trkef5eca1Gskml+23DIsBbCnJK5U4UC1JPqaPsaz+Y391to2jYs8vEtVnXsvwDJxzCYi00zBHIJ2UtcAT8LiIQ09lSxR4EeEWSe6KeA==
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 0ddaceac-365b-45fc-c52f-08d675a967de
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR03MB4150;
x-ms-traffictypediagnostic: AM6PR03MB4150:
x-microsoft-antispam-prvs: <AM6PR03MB415003BF6C1FA47C254DE59FF98A0@AM6PR03MB4150.eurprd03.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(8220060)(2401047)(8121501046)(3002001)(3231475)(944501520)(4982022)(52105112)(93006095)(93001095)(10201501046)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:AM6PR03MB4150; BCL:0; PCL:0; RULEID:; SRVR:AM6PR03MB4150;
x-forefront-prvs: 0911D5CE78
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(346002)(39860400002)(376002)(189003)(199004)(13464003)(575784001)(316002)(55016002)(26005)(6506007)(256004)(86362001)(102836004)(53546011)(6916009)(7736002)(6306002)(229853002)(53936002)(186003)(97736004)(25786009)(6246003)(4326008)(486006)(74316002)(5660300001)(9686003)(6116002)(3846002)(76176011)(7696005)(11346002)(476003)(66066001)(446003)(2906002)(106356001)(33656002)(71200400001)(71190400001)(14454004)(966005)(8676002)(81156014)(81166006)(8936002)(478600001)(68736007)(45080400002)(99286004)(6436002)(305945005)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR03MB4150; H:AM6PR03MB4552.eurprd03.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: rad.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam-message-info: +T3fRPb7gtQ346ObiGQAw0HDaFxd9MCU2aYgVcaGJsLULH1kOokKcq8FGCGPo+yCwO6s/7zmJQiwfOrneALScIPOQlXCBhLExoeiElMwQlIkzc11KI0dDpCR08NG7SS34iVHprvXXFOWn4gSYmAGqVLIaa6FY+dIzUi9iQVGMfAUfJiqX+FE0DuFImcJ3xZfIMrAkRqu2rj+sQ6KfnQikzTc0LGaqBrgQhVeJCuoy8C7xdp2aSMT+bZXuRqe82ph770RKqDryZjWlmSx+CWmfFcHGNG7qez4bsSY1AL1Srp/1OnVjzGiFYh4jqobypH3
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: rad.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0ddaceac-365b-45fc-c52f-08d675a967de
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2019 20:39:37.0278 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: f9047108-cc2c-4e48-97a3-43fad1b3bf9d
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR03MB4150
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/58-ISvYLHP-I6U57Zra0elZJZ9M>
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:39:43 -0000

Hi Martin,


-----Original Message-----
From: Martin Bjorklund [mailto:mbj@tail-f.com] 
Sent: 08/01/2019 22:18
To: Muly Ilan
Cc: netconf@ietf.org
Subject: Re: [Netconf] Advertisement of imported features

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 "https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Falpha&amp;data=01%7C01%7Cmuly_i%40rad.com%7C5b4c4319f5f2434a332408d675a6599c%7Cf9047108cc2c4e4897a343fad1b3bf9d%7C1&amp;sdata=QEesCuMPU6YgQYnpuhAidhLe7nq2ywAV2BjKPn%2BHcV8%3D&amp;reserved=0";
>   prefix "a";
> 
>   feature a-feature;
> 
>   leaf aoo {
>     if-feature a-feature;
>     type string;
>   }
> 
>   leaf a2 {
>     type string;
>   }
> 
> }
> 
> 
> module beta {
>   namespace "https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Fbeta&amp;data=01%7C01%7Cmuly_i%40rad.com%7C5b4c4319f5f2434a332408d675a6599c%7Cf9047108cc2c4e4897a343fad1b3bf9d%7C1&amp;sdata=8GyM2bkXE0E0YbSfFWYgxRZUsiRFnN%2BPEzpaKX0fX8M%3D&amp;reserved=0";
>   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.

[Muly Ilan]
This was what I initially thought.
But it didn't work with NSO version 4.7 (the leaf "boo" in module "beta" was not available).

Then I carefully read, again, section 5.6.4.2 of RFC 6020:

"
Servers indicate the names of supported features via the <hello>
message. In <hello> messages, the features are encoded in the
"features" parameter within the URI. The value of this parameter is
a comma-separated list of feature names that the device supports for
the specific module.
"

My understanding of the last sentence is that per module, feature support should be declared.
In this example "a-feature" is supported by both modules.


> 
> 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>
>   https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Fbeta%3Fmodule%3Dbeta%26features%3Da%3Aa-feature&amp;data=01%7C01%7Cmuly_i%40rad.com%7C5b4c4319f5f2434a332408d675a6599c%7Cf9047108cc2c4e4897a343fad1b3bf9d%7C1&amp;sdata=rDlo2oLhLyQGP6rihXuPCWCXbMHFPiL74ULx9X6401E%3D&amp;reserved=0
> </capability>
> 
> Is the above a valid capability?

No.  It should be:

 <capability>
   https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Falhpa%3Fmodule%3Dalpha%26features%3Da%3Aa-feature&amp;data=01%7C01%7Cmuly_i%40rad.com%7C5b4c4319f5f2434a332408d675a6599c%7Cf9047108cc2c4e4897a343fad1b3bf9d%7C1&amp;sdata=AXq7oIC7VNUlUtAAGQdAI%2B3%2FpKpQqUF03Y9r2mCTGlg%3D&amp;reserved=0
 </capability>
 <capability>
   https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Fbeta%3Fmodule%3Dbeta&amp;data=01%7C01%7Cmuly_i%40rad.com%7C5b4c4319f5f2434a332408d675a6599c%7Cf9047108cc2c4e4897a343fad1b3bf9d%7C1&amp;sdata=PrczrfDxzOypK5VASbbDtrJrdYLYlg5pCfgprSRuIBw%3D&amp;reserved=0
 </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
> 
> 


[Muly Ilan] 
Best,

Muly