Re: [OPSAWG] [netmod] Question on how to design a Yang model to reflect auto-asignment of a give leaf

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Mon, 24 February 2020 21:13 UTC

Return-Path: <jason.sterne@nokia.com>
X-Original-To: opsawg@ietfa.amsl.com
Delivered-To: opsawg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 714993A134C; Mon, 24 Feb 2020 13:13:45 -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_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=nokia.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 ZG1b8Ths4Ysn; Mon, 24 Feb 2020 13:13:43 -0800 (PST)
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2103.outbound.protection.outlook.com [40.107.236.103]) (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 2535A3A134B; Mon, 24 Feb 2020 13:13:42 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jmh4kn7hvlHUVTMmGPhGm0Lj8WHaBm7lkS/e4bblYLWmT2RZPGGGCvbZHy39glDoU9Djn5gN8c8tV6dHZ25IBPNNZVzwj/CiyDoHD6CkJiXXbRxftEypHSiR5g1MrOYiYY7U87bP+W/WlPVhO8sNwk1ZYGr45Ch8uQkVZLLJ9/RJhyKEd1ie9N0J/63/45AsYOsr7/yPum7pAS/9z4kbCmjo1I+DQD6rPTwP/NURawzhZODilONTB1z8TX/tBtU0LIdzUdPRKmYzkjxuJVTLhGHcn37ljagf6lbXIm9Iylc/AddiJ4a5QllB/ODIrMYaKnAIDoQ3B4tEAgarprkY6A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NEm644lN7f2QWOXfxzjNvtNMjbAsTw59ya3BkVTlrVg=; b=JLZXSxDzQEcsJXfuziCpKAe0h+O9IHM+DEJaQ3G25kw16BMSUurJUdF4dBnZ9+1+rOrkDa9nY61a2wFAbR0Ih1hx+AeIy6TZGRRBvaPhja7kgL7CPByGY3lz/x/HvEfVvHf7pciyC6npXI0OyXdQvRl6hQ2xiMb2DHQwx2Y4oudAwUEdXkzaiJbz4nVbAafggYHDJskKrMzOnhV3SfYHc43UYoUbzDm3sJVBJySaIOF5U8bePDF+98QWMLayyTD6YHX9fUHhQVI+JaSiJk0uNyxVDL1x73rI33rrFp4SKu5yHJ5Q6F94rQFXRTmA0dZ8TtFTRAr7GjvWpKOOzDQqnw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NEm644lN7f2QWOXfxzjNvtNMjbAsTw59ya3BkVTlrVg=; b=wQPohwSXaabQz0YvCfkPLQYSqYF0EMGh9Y0SeGp6r++Z7MSfd1IA2cTFVUtCWRw0eABJmLKyxPd8KY6wCW+L3X1qumh7RMG68+fdBttZxUO0eX/AuRwqrWcj4iWpGrd1ljWidaBw4QerSaRo9Xz779wUqX0jm0Neav/YBuY47fQ=
Received: from DM5PR08MB2633.namprd08.prod.outlook.com (2603:10b6:3:ca::21) by DM5PR08MB3531.namprd08.prod.outlook.com (2603:10b6:4:64::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.17; Mon, 24 Feb 2020 21:13:40 +0000
Received: from DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::455:66cb:efa2:fabb]) by DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::455:66cb:efa2:fabb%9]) with mapi id 15.20.2750.021; Mon, 24 Feb 2020 21:13:40 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Martin Bjorklund <mbj@tail-f.com>, Oscar González de Dios <oscar.gonzalezdedios@telefonica.com>
CC: "opsawg@ietf.org" <opsawg@ietf.org>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Question on how to design a Yang model to reflect auto-asignment of a give leaf
Thread-Index: AQHV4Xjaema+meZLWk2xNgC8vQWlkqgq6sMQ
Date: Mon, 24 Feb 2020 21:13:40 +0000
Message-ID: <DM5PR08MB263323245AA83D8045A8400D9BEC0@DM5PR08MB2633.namprd08.prod.outlook.com>
References: <AM6PR06MB5653DFBCFC89E54F28E45AECFD180@AM6PR06MB5653.eurprd06.prod.outlook.com> <20200211.105956.997059335051594687.mbj@tail-f.com> <AM6PR06MB5653B347EE8C00708CBE7EC5FD180@AM6PR06MB5653.eurprd06.prod.outlook.com> <20200212.084745.340561451697677336.mbj@tail-f.com>
In-Reply-To: <20200212.084745.340561451697677336.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=jason.sterne@nokia.com;
x-originating-ip: [65.110.215.75]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: f8a2e9f3-efd3-48a1-2a95-08d7b96e6c26
x-ms-traffictypediagnostic: DM5PR08MB3531:|DM5PR08MB3531:
x-ld-processed: 5d471751-9675-428d-917b-70f44f9630b0,ExtAddr
x-microsoft-antispam-prvs: <DM5PR08MB3531F904D5869891E018C5299BEC0@DM5PR08MB3531.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 032334F434
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(376002)(396003)(136003)(366004)(346002)(39860400002)(189003)(199004)(5660300002)(81156014)(71200400001)(4326008)(9686003)(478600001)(26005)(6506007)(110136005)(53546011)(8936002)(52536014)(8676002)(81166006)(55016002)(33656002)(966005)(86362001)(66946007)(76116006)(54906003)(66446008)(2906002)(66574012)(66476007)(64756008)(186003)(7696005)(316002)(66556008); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR08MB3531; H:DM5PR08MB2633.namprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: C92kPSE79H+jlX+D3OKRcgt/TUTfdEB0mo4Ui+yzcfNPWFRx0vp+AeYpW2F2k5eezANOF/xMc/erQkMKxLIkDnPkcTPCtgbgeIvEIy/8wohvvNfEWMQAOWMI4U4RUbXZ2PlVCSEOPJZE/z+Z3bQd5xtt95rVkbEaAt2je6gGvR250+jjEWVZxtVbBWBqPvYbO2SNplMho4k15G0030ySLcuJzHCkXCBnnQ4kcLpN43/hJoiU5HHkp25TTT+6y2Knk9Bdhcw1ZIIilQMqi6+H5rghDzBBYKCrx1/AGZW2X8I5z2sD5ElotOTk4SeNp5NWIAanRbJ+AwdFb5B9CtylOteAahoM4SNylfXoOT8awbWBa4penhpVjrrKh1LbNXwx4Uko9cM+Hpn3qhFrONIk0TIEg7p6jK+z+V86AjiVbUIGJvejR9AxHwVBAnjZE9ppVJbKLs7xK804vjlRvoWbP/XOertp7uo5fmwWZgAMqGJzB9p61V5l28ZTpeXTxH70r41BFk/OTYcJy46UNiDwCw==
x-ms-exchange-antispam-messagedata: RRo+AOzaQu1qcHUIe7B47Aseoz+SQkXs/lESpv4kGK6jq7A/X5ZcBb6bJkx6rwgV9he7NYODda2gQ85oMv01tnfLXsCl4aQIggKAAaqAR87DeR5iBQWhgF4Px5VXIvRAuyH1oB08O7WMf/+tecU06A==
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f8a2e9f3-efd3-48a1-2a95-08d7b96e6c26
X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Feb 2020 21:13:40.5217 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: FsSltCYPNUTJ3t8W9XtKlztpmrnDAxEkkfppuAvwDwRg0Yjogwac69DnV2hayJ93DMyQcUuhFiUeY2ussaF8GA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR08MB3531
Archived-At: <https://mailarchive.ietf.org/arch/msg/opsawg/reFWxOsS76AHpkO9AtXcZQidxzU>
Subject: Re: [OPSAWG] [netmod] Question on how to design a Yang model to reflect auto-asignment of a give leaf
X-BeenThere: opsawg@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: OPSA Working Group Mail List <opsawg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/opsawg>, <mailto:opsawg-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/opsawg/>
List-Post: <mailto:opsawg@ietf.org>
List-Help: <mailto:opsawg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/opsawg>, <mailto:opsawg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Feb 2020 21:13:46 -0000

Agree that ideally we avoid (a) in running. Unfortunately I think we used (a) in ietf-interfaces though:

         leaf type {
           type identityref {
             base interface-type;
           }
           mandatory true;
           description
             "The type of the interface.

              When an interface entry is created, a server MAY
              initialize the type leaf with a valid value, e.g., if it
              is possible to derive the type from the name of the
              interface.

I do like (c) but note that it means the value calculated by the server may not be persistent (e.g. across reboot). It depends how the server calculates the value. If it is "allocated" from some sort of free list, then at reboot it may select a different value than the previously selected value.

Jason

> -----Original Message-----
> From: netmod <netmod-bounces@ietf.org> On Behalf Of Martin Bjorklund
> Sent: Wednesday, February 12, 2020 2:48 AM
> To: Oscar González de Dios <oscar.gonzalezdedios@telefonica.com>
> Cc: opsawg@ietf.org; netmod@ietf.org
> Subject: Re: [netmod] Question on how to design a Yang model to reflect auto-
> asignment of a give leaf
> 
> Oscar González de Dios <oscar.gonzalezdedios@telefonica.com> wrote:
> >
> >
> > -----Mensaje original-----
> > De: Martin Bjorklund <mbj@tail-f.com>
> > Enviado el: martes, 11 de febrero de 2020 11:00
> > Para: Oscar González de Dios <oscar.gonzalezdedios@telefonica.com>
> > CC: opsawg@ietf.org; netmod@ietf.org
> > Asunto: Re: [netmod] Question on how to design a Yang model to reflect
> > auto-asignment of a give leaf
> >
> > Hi,
> >
> > Oscar González de Dios <oscar.gonzalezdedios@telefonica.com> wrote:
> > > Dear OPSAWG and Netmod colleagues,
> > >
> > >                 During last IETF Opsawg meeting we raised a question (and
> > >                 there was some discussion during the meeting) that we have
> > >                 found yet no good answer and we would like to discuss it
> > >                 with
> > >                 operations and Yang experts.
> > >
> > >                 The use case is the following: We have a yang module which
> > >                 holds certain optional leafs. The behaviors that we would
> > >                 like
> > >                 to have (and distinguish between them) are:
> > >
> > >
> > > a) The user does not provide the value and such value is auto-assigned
> > > by the system (a device (if it is a device module) or a controller (if
> > > it is a network/service module)).
> >
> > I assume that this value not a static default value?
> >
> > [Oscar] True. Should the leaf have a default value, it implies that
> > "if the value is not set, the default value is taken".
> >
> > > b) The user does not provide a value and wants that such value IS NOT
> > > set by the system (as assigning a value has implications). That is,
> > > intentionally it is aimed at being left "empty" and should not be
> > > expanded. So, either the value is set or should remain empty
> >
> > Do you mean that you want (a) and (b) at the same time for the same
> > leaf?
> >
> > [Oscar] No. Depending on the leaf, we would like to specify behavior a
> > or behavior b. Behavior a is ok for most of the cases.  The problem is
> > that in some cases, assigning a value has way more implications and
> > the service will not work properly. Those case are the ones we wanted
> > to specifically tackle.
> 
> Ok.  See below.
> 
> > > What is the best way to model this behavior? I see that some yang
> > > modules have added an "auto-assignment" leaf to express if
> > > auto-assignment is desired or not. (hence, auto-assignment false, and
> > > leaf not set, would do not assign).
> > >
> > > Which is the "default" rule for a leaf that is not set? It is that the
> > > system is free to create it (via template or any means of
> > > auto-assignment) or should leave it as is, that is, empty?
> > >
> > > In NMDA, the system is allowed to expand a given configuration. This
> > > fact, in my personal view, implies that by "default" any system could
> > > implement the "auto-assignment" behavior being compliant with
> > > Neconf/Restconf/NMDA rules (but I am not sure if the interpretation is
> > > correct).
> >
> > There are (at least) three ways to interpret "auto-assign".  The
> > client writes to running, and then the server auto-assigns X:
> >
> >   (a) in running
> >   (b) in intended
> >   (c) in the operational state
> >
> > (c) is uncontroversial and simple to implement in all servers, and
> > simple to understand.
> > [Oscar] agree
> >
> > (b) is allowed by NMDA but requires more of the server implementation;
> > specifically it requires the server to support that intended is
> > different from running.
> > [Oscar] Agree . "Theoretically speaking" this is the behavior I would
> > consider strictly follows NMDA guidelines. Reality is implementations
> > are yet far from this...
> >
> > (a) is not recommended in general; running should be fully owned by
> > the client(s) and not modified by the server.
> > [Oscar] Agree.
> >
> > [Oscar] So... what would be the best way to specify the behavior?
> > Explicitly adding an auto-assign leaf to identify the behavior? Just
> > "obey" NMDA rules?
> 
> For your "auto-assignment" case, I would describe the behaviour in the
> description statement.  Something like: "If this leaf has not been
> configured, the server will calculate a value [... specify how ... ]
> and use that value operationally.  This calculated value is available
> in the operational state."
> 
> For your other case (the user really doesn't want a value) I also
> would document this in the description (unless it's obvious).
> 
> 
> 
> /martin
> 
> 
> 
> 
> 
> >
> >
> > /martin
> >
> >
> >
> > >
> > > Best Regards,
> > >
> > >                 Óscar
> > >
> > > ________________________________
> > >
> > > Este mensaje y sus adjuntos se dirigen exclusivamente a su
> > > destinatario, puede contener información privilegiada o confidencial y
> > > es para uso exclusivo de la persona o entidad de destino. Si no es
> > > usted. el destinatario indicado, queda notificado de que la lectura,
> > > utilización, divulgación y/o copia sin autorización puede estar
> > > prohibida en virtud de la legislación vigente. Si ha recibido este
> > > mensaje por error, le rogamos que nos lo comunique inmediatamente por
> > > esta misma vía y proceda a su destrucción.
> > >
> > > The information contained in this transmission is privileged and
> > > confidential information intended only for the use of the individual
> > > or entity named above. If the reader of this message is not the
> > > intended recipient, you are hereby notified that any dissemination,
> > > distribution or copying of this communication is strictly prohibited.
> > > If you have received this transmission in error, do not read it.
> > > Please immediately reply to the sender that you have received this
> > > communication in error and then delete it.
> > >
> > > Esta mensagem e seus anexos se dirigem exclusivamente ao seu
> > > destinatário, pode conter informação privilegiada ou confidencial e é
> > > para uso exclusivo da pessoa ou entidade de destino. Se não é vossa
> > > senhoria o destinatário indicado, fica notificado de que a leitura,
> > > utilização, divulgação e/ou cópia sem autorização pode estar proibida
> > > em virtude da legislação vigente. Se recebeu esta mensagem por erro,
> > > rogamos-lhe que nos o comunique imediatamente por esta mesma via e
> > > proceda a sua destruição
> >
> > ________________________________
> >
> > Este mensaje y sus adjuntos se dirigen exclusivamente a su
> > destinatario, puede contener información privilegiada o confidencial y
> > es para uso exclusivo de la persona o entidad de destino. Si no es
> > usted. el destinatario indicado, queda notificado de que la lectura,
> > utilización, divulgación y/o copia sin autorización puede estar
> > prohibida en virtud de la legislación vigente. Si ha recibido este
> > mensaje por error, le rogamos que nos lo comunique inmediatamente por
> > esta misma vía y proceda a su destrucción.
> >
> > The information contained in this transmission is privileged and
> > confidential information intended only for the use of the individual
> > or entity named above. If the reader of this message is not the
> > intended recipient, you are hereby notified that any dissemination,
> > distribution or copying of this communication is strictly
> > prohibited. If you have received this transmission in error, do not
> > read it. Please immediately reply to the sender that you have received
> > this communication in error and then delete it.
> >
> > Esta mensagem e seus anexos se dirigem exclusivamente ao seu
> > destinatário, pode conter informação privilegiada ou confidencial e é
> > para uso exclusivo da pessoa ou entidade de destino. Se não é vossa
> > senhoria o destinatário indicado, fica notificado de que a leitura,
> > utilização, divulgação e/ou cópia sem autorização pode estar proibida
> > em virtude da legislação vigente. Se recebeu esta mensagem por erro,
> > rogamos-lhe que nos o comunique imediatamente por esta mesma via e
> > proceda a sua destruição
> >
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod