Re: [netconf] YANG attributes in a datastore

Balázs Lengyel <balazs.lengyel@ericsson.com> Tue, 10 December 2019 14:59 UTC

Return-Path: <balazs.lengyel@ericsson.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 AD4E41200B9 for <netconf@ietfa.amsl.com>; Tue, 10 Dec 2019 06:59:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.001
X-Spam-Level:
X-Spam-Status: No, score=-2.001 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, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.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 z0H3AjFNFd9Q for <netconf@ietfa.amsl.com>; Tue, 10 Dec 2019 06:59:03 -0800 (PST)
Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-ve1eur03on0604.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe09::604]) (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 0C6761200B6 for <netconf@ietf.org>; Tue, 10 Dec 2019 06:59:02 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VX91+ZEzsDL+H/KHFRemfUywuWp4TG99EM1cPMYRJtWRiSGePLgY12DTyRdI4H5Eg3R2IasdjxSTr/3cIZgLIfsEy1Ec78PTvBCFwCU2wRF8Dx7Yebm0yKIa+ULq0+WhHt3f1IqZaZjBrGZjhMJtH0jmHaU6314Urfl3eRUAXl1DMvpNUyxQlDCQMubz08BciVbPd0V91Tj8rQcTnKBO4FqcOIyUbDOI3DgwU7aCEeLXUuCC+bmVeh5DbElI8wKYCwZ3lnsm4bvLy52r4X/Krs+yEz8pEEUGn/nJlapsvgQ88lBbTwwi2VmZMd1VJJ23/Z/WjmS5qGWXmbYdPGKcVA==
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=XLIhFm1oxXwJA/kxRcvAXZPIney4ZVkGkG0QvDe8IjU=; b=HfvGKkxH5J++XMRZEq0kjZ6+WnlhVoGecNJ1avH/w63SWN31Ov198OzCVBrLi2PbH26FNyIo03mTnhnyhQcboIJgLWqO5FGvgQB0VRsMFJb4PX+3kCXWZq/2bYSJZaSOMuN96efF2T4xxLl7aQUztSDRWI/6SYXj7ve2arp9Wx9GjxYIPq/aiwyjekS5x3viuig96vgkcG4jGmq1wCtfHQHdvSWzMVDoNhZ3L59QNVYxGKJ7tCG6zzBxSEHevGm4n6h+XfzzWAflvI8Wd5XoH/d0TMkzQ4LU9GYtU44xcggJRyqiS8kVJdz7vdXJZdrqeanAX8LTTQLaT9ynw6NAvQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XLIhFm1oxXwJA/kxRcvAXZPIney4ZVkGkG0QvDe8IjU=; b=XQz6iQ8nhFGYLjZBFzhIGzbP6UH9MZNoDhwBfvHWjQzxCu79n6DPJYzwGL4podDC+1L2kgd0Vk/8CJRQA+CyvjdlEVucw5oFkyw7lOllfmgHodGqv1CJ2bqPHLVw7u4DtWeMG+t/ghZlvbgEqL3ZrWrExTkBCTRPT3E+atBqxbU=
Received: from AM0PR0702MB3665.eurprd07.prod.outlook.com (52.133.47.21) by AM0PR0702MB3666.eurprd07.prod.outlook.com (52.133.43.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.4; Tue, 10 Dec 2019 14:59:00 +0000
Received: from AM0PR0702MB3665.eurprd07.prod.outlook.com ([fe80::2469:3d61:7557:b60c]) by AM0PR0702MB3665.eurprd07.prod.outlook.com ([fe80::2469:3d61:7557:b60c%7]) with mapi id 15.20.2538.012; Tue, 10 Dec 2019 14:59:00 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Martin Bjorklund <mbj@tail-f.com>, "mvasko@cesnet.cz" <mvasko@cesnet.cz>
CC: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] YANG attributes in a datastore
Thread-Index: AQHVr1uSMMXUkQL3AEKzrrll/BetbKezZoCAgAANmtA=
Date: Tue, 10 Dec 2019 14:58:59 +0000
Message-ID: <AM0PR0702MB3665FD1B4EFB1797333EE77DF05B0@AM0PR0702MB3665.eurprd07.prod.outlook.com>
References: <5cce-5def9a00-11-66c7ce00@101566344> <20191210.150333.2171238725445540389.mbj@tail-f.com>
In-Reply-To: <20191210.150333.2171238725445540389.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [89.135.192.225]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 33763b2f-baf0-457a-3ff3-08d77d817d31
x-ms-traffictypediagnostic: AM0PR0702MB3666:
x-microsoft-antispam-prvs: <AM0PR0702MB3666009630AC96D1FE7FADEBF05B0@AM0PR0702MB3666.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02475B2A01
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(136003)(366004)(376002)(39860400002)(346002)(13464003)(199004)(189003)(8936002)(2906002)(8676002)(55016002)(9686003)(64756008)(81156014)(81166006)(110136005)(53546011)(52536014)(6506007)(186003)(26005)(316002)(66556008)(66946007)(66446008)(66616009)(66476007)(76116006)(71200400001)(478600001)(966005)(4326008)(33656002)(66574012)(5660300002)(7696005)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0702MB3666; H:AM0PR0702MB3665.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: mHW4gutMIBIDdtqY121J1hjxXYB3i43BASlh1fgxOKv8WCkbg+Vx9zCtEp1U9dFOm1Y4mpEOvzwwaFhcSdC3FGl7GiAVT2NPUaVwnW1oNOKxTHGDdF4wHKbPjMmPr0cgqJI+gG6AcPL2fLJtLq/8lCJnzofSIfSvPbGL0E4ZO34bKUiil1J2jLRisAdjFDaQv/96+qvUtR2IXxB22yn0An9ntzYxXR24lW6BKK+q2NYkQyX72RFB6UBrXdRolUogsyyVfm8A+pCGoiagMaiqw08iHYJrPNZ7k2RiEDwv7mqk0RQT+JPOCfsU5NCPY9j00fyibblSStZOoreZ5s07HEGLC8065BQk1rA/kiuBCPdjE5KlRZK30V+KlwEjl9NnvAXIVwNERREmZicL/eA0NWaWIQJppXpbremq0etoiSknHE2uqUeMv0S3dcpx+/MPJPHpNZ1/dKDLnDZj9lRvkZZIYxFxAQAWGyFPMUEUgezjnsprnsogyfkwUVY8LJOz5w5ORR/+8H8KvlaHBObLHF1Euvswz6wdyDOzxNETxbk=
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0420_01D5AF72.BB9563C0"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 33763b2f-baf0-457a-3ff3-08d77d817d31
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2019 14:58:59.8998 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: KBE+Wnk0IorJ9ldyzyIH6W8bN3VXFmihjomsLnZONNHQNM5brC99xDyE20K/tT5nCIl8wTIAAPl1aJVLwGvWLidQO0woX0FoSNTmzZawcmg=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0702MB3666
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/oaFsqNsi4KlnWHoBM7-nevjNack>
Subject: Re: [netconf] YANG attributes in a datastore
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG 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, 10 Dec 2019 14:59:07 -0000

Hello,
If we try to standardize editing metadata, we will face a number of issues
that need to be clarified:

- Will you model whether the attribute (metadata) is writable?  Config is
not an allowed substatement in https://tools.ietf.org/html/rfc7952#section-3
- Can a metadata have other additional properties? (mandatory, cardinality,
uniqueness of some kind?)
- If it is modified, will it be subject to validation, error-messages? Will
a bad metadata result in a failed error-config?

Regards Balazs

-----Original Message-----
From: netconf <netconf-bounces@ietf.org> On Behalf Of Martin Bjorklund
Sent: 2019. december 10., kedd 15:04
To: mvasko@cesnet.cz
Cc: netconf@ietf.org
Subject: Re: [netconf] YANG attributes in a datastore

Hi,

Michal Vaško <mvasko@cesnet.cz> wrote:
> Hello,
> we are thinking about adding support for arbitrary attributes [1] in 
> our YANG/NETCONF datastore. To my knowledge, only the representation 
> in XML or JSON is defined and standardized but there are no guidelines 
> for editing (CRUD) these attributes.
> 
> So, my question is a rather general one, regarding implementations 
> that support editing these attributes, would you mind sharing some 
> basic ideas or principles used? Or is this outside any consensus and 
> each implementation is free to handle this completely in its own 
> fashion? Thanks for any input.

I think this depends on the attribute defintion.  Some attributes are
read-only from the northbound's protocol point of view.  Internally in the
server you may need some API to set/change them of course.  Some other
attributes are read-write.

In our implementation we support a few read-write attributes (and some
read-only).  Here's a simple example (in an edit-config):

  <foo annotation="hello"/>

This would set/change the "annotation" attribute's value to "hello",
regardless of its previous value.

To delete an annotation, you would do:

  <foo annotation=""/>

Each of our attributes has a special value that means "delete" (in most
cases it is the empty string.


/martin




> 
> Regards,
> Michal
> 
> [1] https://tools.ietf.org/html/rfc7952
> 
> _______________________________________________
> netconf mailing list
> netconf@ietf.org
> https://www.ietf.org/mailman/listinfo/netconf
> 
_______________________________________________
netconf mailing list
netconf@ietf.org
https://www.ietf.org/mailman/listinfo/netconf