Re: [OPSAWG] [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> Tue, 11 February 2020 18:06 UTC

Return-Path: <oscar.gonzalezdedios@telefonica.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 5160F1209D0; Tue, 11 Feb 2020 10:06:00 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Level:
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=telefonica.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 g8PldaNWkO7k; Tue, 11 Feb 2020 10:05:56 -0800 (PST)
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50112.outbound.protection.outlook.com [40.107.5.112]) (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 DF7BD1209CF; Tue, 11 Feb 2020 10:05:54 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TQALk7dtcgFeI4e8pdZ7+i727OpkNTmvD35FG64ixukUqZXBz1EowoJg5C5RV7xkDjGBXYB5ZDlmgHgvcfeY5V87rpOex2o+zkOLgVBnMIFSK7OZ4zgSQyox/iWRUF4rgQvSZOXeGUQBEZSX7p+KJYFEwldvqdrh5IF4p53L+vnsgnn700xlAfwfBXdTtP/p5uDOVjFRPZQPvabRkHIC1QyJDEpHsRuG4JoE9D+A66Ya2lF3oryMkgsgU4gaWLIJrlHKU5Nvo9AgsiMwRqT4aoa0aCIX+6pEEqVW42Koj2etwqm5ZplAZTJYodagFpFXkhhgIgqKcvz649PXe/Fg6w==
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=hK0U7zuVGVqQ3cjbjBozd1EiiL0snhSVZ7PH8RAkQTI=; b=M5GeILG0pbL0xly23QcI5mlk7375BrI5tdVm3mxASaUtWFlNe+exnye0zPwfUUyP/unvPGwKD7ABzPBcsduQbPCJ56vkqsIqHCt8TaffR05W+jTR/W79de70ed5vg0s4DFCxn9xYXUBXvzCHXPaKE6VGLJNELCgKmH6/LGll925E5aQMqEYqqtK9jzrUY9TEIzig55g5h8thzurAwGcYmFTbyS/dBoxeRbg5skr+/kWJ8nV9WcJjXP35lCqBPuZQu3WknqvZ2Pm1TFUi4sFq/e6OkqSkeib2Xv7WDt6/OzilhFbu3mJk4j1o3fp1hMRsDK/E6yeXyTYoHmGYQRwacQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=telefonica.com; dmarc=pass action=none header.from=telefonica.com; dkim=pass header.d=telefonica.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telefonica.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hK0U7zuVGVqQ3cjbjBozd1EiiL0snhSVZ7PH8RAkQTI=; b=JLx20eFBh2LNuUKIUeRY0kxuPKRDSXNZGuEPw3eKOpxRh7yVjTuFRBzIAPm5t0NYGZf/ZNXMAHi0Nw6CUqv3abxM6dxFZjQhzgR+zWoQo7Lr+nudJBNfU84zYkkyhg+dANLOM3lbS4gryJy/5QxDZZb6aoZkPmT94+7W1L2UD24=
Received: from AM6PR06MB5653.eurprd06.prod.outlook.com (20.178.93.90) by AM6PR06MB5142.eurprd06.prod.outlook.com (20.177.191.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2707.23; Tue, 11 Feb 2020 18:05:52 +0000
Received: from AM6PR06MB5653.eurprd06.prod.outlook.com ([fe80::4d14:ef4b:8837:87c5]) by AM6PR06MB5653.eurprd06.prod.outlook.com ([fe80::4d14:ef4b:8837:87c5%7]) with mapi id 15.20.2707.030; Tue, 11 Feb 2020 18:05:52 +0000
From: Oscar González de Dios <oscar.gonzalezdedios@telefonica.com>
To: Martin Bjorklund <mbj@tail-f.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: AdXgf2dbJ6WUxXgzRxKVGs1XfT3HEwAQpvgAABBLyeA=
Date: Tue, 11 Feb 2020 18:05:51 +0000
Message-ID: <AM6PR06MB5653B347EE8C00708CBE7EC5FD180@AM6PR06MB5653.eurprd06.prod.outlook.com>
References: <AM6PR06MB5653DFBCFC89E54F28E45AECFD180@AM6PR06MB5653.eurprd06.prod.outlook.com> <20200211.105956.997059335051594687.mbj@tail-f.com>
In-Reply-To: <20200211.105956.997059335051594687.mbj@tail-f.com>
Accept-Language: es-ES, en-US
Content-Language: es-ES
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=oscar.gonzalezdedios@telefonica.com;
x-originating-ip: [2804:18:6c:d262:a978:9cf5:62a1:af4b]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: 37267b52-7b69-4401-cf5e-08d7af1d0820
x-ms-traffictypediagnostic: AM6PR06MB5142:
x-microsoft-antispam-prvs: <AM6PR06MB514268DA507FD9742EAAAAC4FD180@AM6PR06MB5142.eurprd06.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 0310C78181
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(4636009)(39860400002)(396003)(366004)(136003)(376002)(346002)(189003)(199004)(66574012)(81156014)(81166006)(4326008)(52536014)(66556008)(66446008)(66946007)(86362001)(66476007)(64756008)(5660300002)(71200400001)(76116006)(2906002)(8936002)(33656002)(8676002)(9686003)(6916009)(7696005)(186003)(54906003)(478600001)(6506007)(316002)(786003)(55016002)(9010500006); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR06MB5142; H:AM6PR06MB5653.eurprd06.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1;
received-spf: None (protection.outlook.com: telefonica.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: TxjJU9wlfvyX1cQ69fTGUEF1/tRVVk/ArFNzl2yKEv8qxEngysI8pjeXQVhqEjlp+mjEjEm+2EJ8JkNYxwi1JaJDXSrvgZaHpExhGKWQ7nH15RFF1pPBAKSzK0arOv/S+AmO7OxmwRcejDgR7cD+pQN0ccutiBnwvYRu584KWIEXgGIqgKWsSeYeq9mI1guURB2YAbzxHK4iXKLI4r7ch6RciXOzrKZ6VEBCGX8BXBao5ASDPY+lXi4z8EQz+xBypL8/JKVq3//aYR9fNExlKMFbDZ8Dock1ct96rti2fE5siJrpO+hcFwog+INvqJXY6jpuyVK5OQ/FNeztY4IxCp8GcYxJJrFeVy1843lSuwAEgawYr9/VtxOf653BHcv+vOJsAb+md9wWI5DyRibprcZmynX3ABQ5go29rMFo63kkAPn3VW776qh1Ni4mOV4wwi4kXB8/tQi0iCgcsBgbAaTU+IHTxsKLgofRIeBZAMqYZwTgEK9MKXqywgRqYTua
x-ms-exchange-antispam-messagedata: q+WTJLVGfBiWYmBMu5cQmbjo3HHzMYD49hUFgJ3jjfw9OqwJVv7gbGf5hxm766bs51i+HqOsYTg6PJRIfiLf3HHVHhm8F8hnNNw+ZSBtYgvM4VWDrtaJ7BUYYb9c32ZiZG+F563PwS7wQSnes9PTwMRcLxA2EoFiqdrifd2t+kN5Yhri13/WLED4tz7kXSPE1WPpYtmYh5HfhjLX2tphZw==
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: telefonica.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 37267b52-7b69-4401-cf5e-08d7af1d0820
X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Feb 2020 18:05:51.9156 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9744600e-3e04-492e-baa1-25ec245c6f10
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: QcRs3hTgRBGjAlTuOPrSZ2wGXRdJGIarF9qNAT6B9U2cXOCG+TIL/BQT/ZK6HzfC6ITW8XS4+baTm+zENZS+qq+Y5M5qkTQIvlI7HrySA27JzMnnL2yjqlpji79wNIKw
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR06MB5142
Archived-At: <https://mailarchive.ietf.org/arch/msg/opsawg/Twc7-7RGzx_Id0dIRDGjAotfyjs>
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: Tue, 11 Feb 2020 18:06:00 -0000


-----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.

> 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?


/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