Re: [Netconf] YangPush now

Kent Watsen <kwatsen@juniper.net> Thu, 19 July 2018 22:58 UTC

Return-Path: <kwatsen@juniper.net>
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 DF9C6130EE8 for <netconf@ietfa.amsl.com>; Thu, 19 Jul 2018 15:58:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 IaLJzwoJ7xOf for <netconf@ietfa.amsl.com>; Thu, 19 Jul 2018 15:58:12 -0700 (PDT)
Received: from mx0b-00273201.pphosted.com (mx0b-00273201.pphosted.com [67.231.152.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1205B130DD2 for <netconf@ietf.org>; Thu, 19 Jul 2018 15:58:11 -0700 (PDT)
Received: from pps.filterd (m0108160.ppops.net [127.0.0.1]) by mx0b-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6JMsQrm015330; Thu, 19 Jul 2018 15:58:11 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=u4ixWOh+tcnSeKs5Rh8Y4q517UcJNvln4qN6x8QtOfg=; b=zrBSem9v0JnGS9xtRS1aEotjhgDwXUNIc63Lo/eEreHW1acXcDAx/cl+YNhLjehcuNud idOvcMY/wg1hnEJjswIxDF1bHJQWiGkXxr/EYCpP9cjnx6mtdnuiCI1Y1pu+O55Urblr zGmRpkFAowbOqDx8XdFYoY2hIkVR2C9UzzSnZk/PtVC3ZuMa4EXAOEY8tAg/8/BK8X2F Z/NJBoSGY87Q3DTEmspZ3bsarqs894zFSEGw9fLg7etyQYdl99n5RHEAuh3fvf6glat7 5d2T9fk19zq6FvOi1Y1NHsYd56DKqs7WXDqGC+GJ0Jpk65fLiuhsG7nluqqD2cs6s69J Og==
Received: from nam02-cy1-obe.outbound.protection.outlook.com (mail-cys01nam02lp0053.outbound.protection.outlook.com [207.46.163.53]) by mx0b-00273201.pphosted.com with ESMTP id 2kayyvre4d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 19 Jul 2018 15:58:11 -0700
Received: from BYAPR05MB4230.namprd05.prod.outlook.com (52.135.200.153) by BYAPR05MB4392.namprd05.prod.outlook.com (52.135.202.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.14; Thu, 19 Jul 2018 22:58:09 +0000
Received: from BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::9006:fad3:993d:25fe]) by BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::9006:fad3:993d:25fe%2]) with mapi id 15.20.0973.016; Thu, 19 Jul 2018 22:58:09 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Andy Bierman <andy@yumaworks.com>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [Netconf] YangPush now
Thread-Index: AQHUHVo97/1MCRrcckGjuypYd3RC86SS6W4AgAB92YCAAEL3AIAAPuOAgABuioCAADVFAIACBUCA///mfwCAAE9FgIAAIjQA
Date: Thu, 19 Jul 2018 22:58:08 +0000
Message-ID: <D379474E-639A-47B4-B46C-485916BE9440@juniper.net>
References: <2E1BAD12-EFF2-4E35-B232-57A4C4490989@cisco.com> <20180717055030.7bmzlychtznf3mso@anna.jacobs.jacobs-university.de> <18622ABD-DB9F-406C-836F-64649F3D8FF6@cisco.com> <20180717172036.hhuoq6fzs7ctblpf@anna.jacobs.jacobs-university.de> <CABCOCHS8cfqKLaQe9M4tu-2zkZ5=6-a2FEv+idJwZiW_btx_Zw@mail.gmail.com> <a54850668bfb4483b89f4c2b15bf5f44@XCH-RTP-013.cisco.com> <CABCOCHSxTh7J1Kys1B+sNC2dWuJKr_L7cJgO9T+E+-_+k9H-6w@mail.gmail.com> <5366188A-111C-49ED-95AF-82A5171750CC@cisco.com> <85CBFD6B-CBEE-47C5-83ED-FD37007B78A3@juniper.net> <CABCOCHRRGjZSjWOEj_XXGQLAOeRhiO9avuhShh_xpLk_=CZZ3g@mail.gmail.com>
In-Reply-To: <CABCOCHRRGjZSjWOEj_XXGQLAOeRhiO9avuhShh_xpLk_=CZZ3g@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.13]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BYAPR05MB4392; 6:gk+hGmbg7ZNPZKieAH1cESGpG8svxSGG0OlBmi1n91ozbxYTEMb6ajDfjcAG3LzlNuJNLTNQ4FGTecwRA3YHF2/XgRhUCmdZwLqK7DTumfRGEQX6AltQrqaTllPd/W8fT3W2M4sXiKsdsgkCecBX2k9pNZxEUw3ivpCw62LUBL2XQBs5cpD2zwyv65v3UwUncr3TVpQxQRv80Y7RT99UAkvvzESdw/vlMKVvuzyQy8W4M/emNABtf7m5+9VLl33Y7XYG84/8HLpmndiCc11matICmiTDAbE5YVpypcrNUq8lROqLhSk8EYl9d6FXMI7AwgnLFS1j3p2nCMkJSKF9v1OKeYsjmaoTYaRNucnGDe5WUczazct/S7HE7djNUAln57D1g9N/0tEGC3ouL7Vsj9wDIxwixeuonf3pLc2OKReXrddXfmef4GwfGs8cg8ztOqjs3MoJg1+MbqdhC/tVtg==; 5:LvjW/iKJ3GQJQOtqfQ82KA1vVIgYVBSKM2D5eWocwiPzCf5iQK1gOre3Nw/Pd0OPFxHj02pguoZMkpah9OvW9S9XOEe06/33MLonF95tc/3OYkTALn7zlsYe0x0/9V0r4eTcpX/3c8liJf3Gs7U06iHr2i5v7sajRQmGz16RMgE=; 7:korr754jXxv0BIvfW3DCWJ6MzEwO3h6FSIQqoby9/PvrE7YRateHybAOjbQqi6ptnzCV384rI1N6RAFo12LMsmHWTjOjJ/XWuUcNbePdhbxr1OArWaz3SS1sRqUE6OF2xcGH777eirval4XKRXJJzHhceO3RV1+IT1D65wtxmzuhgP/WLYfgVVFSYFMpgQ8PQKS47qUIuA1T0UGvZvcc2L9PJxKCpruY+tvc4zKBp5OFQG+cuyS6FJM0GO8g64ci
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-correlation-id: 1b1d267f-5dba-4df8-5684-08d5edcb18ad
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600067)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:BYAPR05MB4392;
x-ms-traffictypediagnostic: BYAPR05MB4392:
x-microsoft-antispam-prvs: <BYAPR05MB43926C3E73394CE7ECD9E2FDA5520@BYAPR05MB4392.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863);
x-ms-exchange-senderadcheck: 1
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:BYAPR05MB4392; BCL:0; PCL:0; RULEID:; SRVR:BYAPR05MB4392;
x-forefront-prvs: 0738AF4208
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(366004)(39860400002)(396003)(346002)(376002)(189003)(199004)(33656002)(86362001)(4326008)(99286004)(2906002)(58126008)(93886005)(26005)(76176011)(106356001)(53936002)(478600001)(11346002)(6246003)(102836004)(186003)(446003)(316002)(5660300001)(105586002)(83716003)(6916009)(81156014)(81166006)(6506007)(256004)(8676002)(36756003)(66066001)(97736004)(6512007)(8936002)(25786009)(6436002)(6486002)(68736007)(2900100001)(229853002)(5250100002)(486006)(82746002)(7736002)(6116002)(14454004)(305945005)(476003)(3846002)(2616005); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB4392; H:BYAPR05MB4230.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: 5/14ePH+GkmfMshF4qL5rAhW9D+0sPIVc8W3eLqhbGSyUakcvgrI/twMdoaaQrlGBxdttGTHHGb28BwdGshQOMaa2TBaQ84X7tMMJgDwh8B+GVGjp+4P7pibzjpmsdGPpruk9Y4PGCtweBqmsFk4pAvDwQfiLI8/kJ+g+lnw2ryKY3rqnXeMQ1+Q9U2LhWKiQrgrT9JcHdXzl5XjGu71GEWmux13VhmPfTIN/b7UDgUBSAAr/tEwy4duCEWYcvBHkEkkJZIUOia2+1fGKOAPQMF/9nUK40bW8dsJYOTcwjr/kJQzFz39aNJ0k8SiL2oHiS8XG09UJKeAaARnu95w3C/RD+9QqobQMlu8lwL+cTU=
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <C18EAB0D3846584C82D618811E463363@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 1b1d267f-5dba-4df8-5684-08d5edcb18ad
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2018 22:58:08.9231 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4392
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-07-19_08:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1807190238
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/uN77cPsolVvbrX2ta_ezUDcYHT8>
Subject: Re: [Netconf] YangPush now
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.27
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: Thu, 19 Jul 2018 22:58:16 -0000


>>1. make the augmentation of a "notif" model mandatory (see the '+' lines
>>   below), to ensure that there is always something more than just a name
>>   being configured per receiver.
>>
>>      container receivers {
>>        list receiver {
>>          key "name";
>>          min-elements 1;
>>          leaf name {
>>            type string;
>>          }
>>   +      choice transport {
>>   +        mandatory true;
>>   +        description
>>   +          "Defines the transport-specific configuration data
>>   +           for the selected transport.";
>>   +      }
>
> The notion of an empty mandatory choice really stretches the definition
> of YANG Conformance.  This says you cannot possible implement the SN
> module without some other module augmenting it.

Correct.


> Yet there is no way in YANG (besides import) to say the module bar
> needs to be present if module foo is present.

Why is this a problem?  Servers will do the right thing, and the draft
is clearer for it.


>> 2. modify netconf-notif to augment-in the ietf-netconf-server grouping:
>>
>>  module ietf-netconf-notifications {
>>    prefix nn;
>>    import ietf-netconf-server { prefix ncs; }
>>    import ietf-subscribed-notifications { prefix sn; }
>>
>>    // define a *local* netconf-server instance
>>    container "netconf-server" {
>>      uses "ncs:netconf-server-grouping" {
>>        // prune out the "listen" subtree
>>        refine "listen" {
>>          if-feature "never-supported-feature";
>>        }
>>        // disable dependency on the "call-home" feature
>>        refine "call-home" {
>>          if-feature "true"; // needed? (see 7950, s7.20.2, P3)
>>                             // valid? (unsure)
>>        }
>>      }
>>    }
>
> The use of constant (true or false) values for if-feature are 
> not supported

Wasn't sure about that. Is there another way to achieve the same?


> and the use of dummy features that are always supposed to be a
> constant value seems to abuse the intent of YANG features.

This was discussed on the NETMOD list in the last few days.  See
the "removing a node from a grouping" thread.  I agree that it's
not ideal, but it appears to be legal.   Just filed yang-next#48
to track this for future improvement.


> Refactoring the groupings would be the cleanest solution.

Not always possible, such as in this case.

 
>>    // add leafref to above locally-configured call-home instances
>>    augment "/sn:subscriptions/sn:subscription/sn:receivers/sn:receiver" {
>>      leaf netconf-endpoint {
>>        type leafref {
>>          path "/nn:netconf-server/nn:call-home/nn:netconf-client/nn:name";
>>        }
>>      }
>>    }
>>  }
>>
>>
>> 3. do the identical thing to the restconf-nofif draft:
>>
>>  module ietf-restconf-notifications {
>>    prefix rn;
>>    import ietf-restconf-server { prefix rcs; }
>>    import ietf-subscribed-notifications { prefix sn; }
>>
>>    // define a *local* restconf-server instance
>>    container "restconf-server" {
>>      uses "rcs:restconf-server-grouping" {
>>        // prune out the "listen" subtree
>>        refine "listen" {
>>          if-feature "never-supported-feature";
>>        }
>>        // disable dependency on the "call-home" feature
>>        refine "call-home" {
>>          if-feature "true"; // needed? (see 7950, s7.20.2, P3)
>>                             // valid? (unsure)
>>        }
>>      }
>>    }
>>
>>    // add leafref to above locally-configured call-home instances
>>    augment "/sn:subscriptions/sn:subscription/sn:receivers/sn:receiver" {
>>      leaf restconf-endpoint {
>>        type leafref {
>>          path "/rn:restconf-server/rn:call-home/rn:netconf-client/rn:name";
>>        }
>>      }
>>    }
>>  }
>
>
> The problem with identityref leafs is that the client has no clue 
> what the server will support. The problem gets much worse for the
> client dealing with a mandatory empty choice.

How so?  If the server implements the notif module, the augment
shows up, right?


> Andy

Kent // contributor