Re: [netconf] YANG attributes in a datastore
Andy Bierman <andy@yumaworks.com> Wed, 11 December 2019 20:49 UTC
Return-Path: <andy@yumaworks.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 C5BC3120232 for <netconf@ietfa.amsl.com>; Wed, 11 Dec 2019 12:49:10 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.898
X-Spam-Level:
X-Spam-Status: No, score=-1.898 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 1F0gd7bTiiMB for <netconf@ietfa.amsl.com>; Wed, 11 Dec 2019 12:49:08 -0800 (PST)
Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 739F6120808 for <netconf@ietf.org>; Wed, 11 Dec 2019 12:49:08 -0800 (PST)
Received: by mail-lj1-x236.google.com with SMTP id r19so25666261ljg.3 for <netconf@ietf.org>; Wed, 11 Dec 2019 12:49:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=m9WD1NnC/S+55evE2ETLbVbtqn08xdiQ0On/zZy1WaA=; b=Bx+7KcVgW8/yvb8KLTP8Rohgi1gALrYtYE9oTiWJKPaCDchKX3vzDbQxXzrIDwmi79 1mDhYzwLB8eR9czLgzctXp5jTyIHdfq4qXJTIMlEioRvW2sYasRyMHYUluS5Sfm3GqGN avFQf21OR3rMDgiqTUixvRs54NuG9iReDmCc1iskkH21n0b2vj+iupd9DPx5WxEKFq0Y AZID9LmicyXWo7Ea9VfOoJTRNKHmURc/ih4gIeRB6UksxmDBNP+Jw25fMl4fjEdiMNaF Cs9mmZ2X2vo9oM4PaAcZKPCFop2J604tk4pr3Pj/zKb0MBOEbXZdUJ9Lr13GQ9gdrIaw kk7g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m9WD1NnC/S+55evE2ETLbVbtqn08xdiQ0On/zZy1WaA=; b=VLzaTbWk5z8gFkvuZLiRtwZaOtAfpf1XCdyrOK2l82Q/hRhs4tlFlIqVqCgYG1h8D9 C5fRfqmlOhOINyQQGMzrH1oqg0PfmOE1Dauc2LXVrEDsmiMXBgMEmF8YvgDHr6LA+jjf bEeI4RQb76QUFwhHcoyoCixtgwWA+QtEcMUFr7wOAOtlnpXbSYPOP+1SxoCHGu0C+24q TRV0udf2oEdwQjL81Rrjc1TVugRO87/8Wv2qWECDgfBP6J8TJ/qTPRsVBpzBFa2/O5Yc tFfdWXv7oUot/8TfA69gqKRBG+vrZ4aJ0flfCE5RX6J2CNS+VNJ6hwV9YrqSqhzPg4Np +Cig==
X-Gm-Message-State: APjAAAXlVAbJoV8VNHy91gCCLS4DWs1MAj8Tcw8h58nfjYOxe2A0shfb cq4bRtEsg5E9fRtILDDC5cpNzksqKAOPgIqawjZozQ==
X-Google-Smtp-Source: APXvYqxNZ64tXy12aa8rxm4URC+E0XfQcLEqvNicg6BSLFD6NFsS1lCTYHEznSAmOq4TTnEB8DImr6ZIvPRzh9YBRQA=
X-Received: by 2002:a2e:9b55:: with SMTP id o21mr3546919ljj.147.1576097346698; Wed, 11 Dec 2019 12:49:06 -0800 (PST)
MIME-Version: 1.0
References: <5cce-5def9a00-11-66c7ce00@101566344> <20191210.150333.2171238725445540389.mbj@tail-f.com> <AM0PR0702MB3665FD1B4EFB1797333EE77DF05B0@AM0PR0702MB3665.eurprd07.prod.outlook.com> <514fe834eaa528c42f6dc31009399a3392b05dfe.camel@nic.cz> <CABCOCHSgZYDOVC7cj=1jaf4_N4pWc0B5vXPDmtm93vw5srrRkQ@mail.gmail.com> <677480c1606c027b43afda383378a5a9320b15dd.camel@nic.cz> <CABCOCHQsxzX3raf8FmbXCcQp3mdfFRrcGhSP5c88cumhdNJDVw@mail.gmail.com> <411dd6ee5c435cee7042d042ec481acd111a7f92.camel@nic.cz> <CABCOCHQfXSD8fr70Hcn9Epu+Dcs9_wA+-+7Y+kQqB9k5fKDsOQ@mail.gmail.com> <0100016ef0c6b0d8-cdbbe2ff-ac02-4692-b2c0-9f9b64ce4fc5-000000@email.amazonses.com> <7027e13e49a631ee06a8fe63ba3e2abf102963dc.camel@nic.cz> <CABCOCHQ2t6kiHpFrs67Zj0GyVfpMB6615vnZ4nyBFxpvf7ESVw@mail.gmail.com>
In-Reply-To: <CABCOCHQ2t6kiHpFrs67Zj0GyVfpMB6615vnZ4nyBFxpvf7ESVw@mail.gmail.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 11 Dec 2019 12:48:55 -0800
Message-ID: <CABCOCHTKB6VdAxC8bQN+ZG5dxQ5zrMEG1OhvnYdu7rQ3jWA1tA@mail.gmail.com>
To: Ladislav Lhotka <lhotka@nic.cz>
Cc: Kent Watsen <kent@watsen.net>, "netconf@ietf.org" <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000007b57d8059973c246"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/a3HqKdKCCi0bSVpiq7ivZgEuN20>
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: Wed, 11 Dec 2019 20:49:11 -0000
On Wed, Dec 11, 2019 at 12:35 PM Andy Bierman <andy@yumaworks.com> wrote: > > > On Tue, Dec 10, 2019 at 11:59 PM Ladislav Lhotka <lhotka@nic.cz> wrote: > >> On Tue, 2019-12-10 at 17:06 +0000, Kent Watsen wrote: >> > > OK, but there is no way to prevent "annotation zipcode", etc. >> > > The use of foo="value" to set and foo="" to delete seems fine, but >> not sure >> > > any new >> > > standards are needed for that. >> > >> > >> > Metadata is not data. Whilst syntacally possible, and some may attempt >> to >> > [mis-]use >> > it as such, we must hold the line that any IETF-defined >> metadata/annotations >> > do not >> > encode data. >> >> While I agree with this, the original question remains: how to edit such >> metadata in an interoperable way. Deleting the annotation with foo="" may >> not >> always work, and indicating deletion with a special magic value is also >> brittle >> because such a value is not specified in the annotation's definition. >> >> > I think empty string is the least worst solution for deletion. > It does not work for type 'empty' os an administrative string that > allows empty-string in the value-set. > > > RFC 7952 is under-specified wrt. data type encoding > > 1) it is not even clear that the type-stmt is a mandatory sub-statement of > the annotation-stmt. > There is no example showing this usage. > > I found the last-modified example so disregard comment (1) > 2) The data type encodings are not correct for the empty type > > The attribute value SHALL be encoded in the same way as the value > of a YANG leaf instance having the same type; see Section 9 of > [RFC7950] <https://tools.ietf.org/html/rfc7950#section-9>. > > > This does not work for 'empty' type which is encoded as an empty element > in XML and a null array in JSON. > This encoding cannot be used in an XML or JSON attribute. > > I assume the solution is constrained to only use valid XML, so inventing > some hack to identity the deletion operation > will not work (unless it is valid XML) > > > > Lada >> >> > Andy > > >> > >> > Kent // contributor >> > >> > >> -- >> Ladislav Lhotka >> Head, CZ.NIC Labs >> PGP Key ID: 0xB8F92B08A9F76C67 >> >>
- [netconf] YANG attributes in a datastore Michal Vaško
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Martin Bjorklund
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Martin Bjorklund
- Re: [netconf] YANG attributes in a datastore Balázs Lengyel
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Andy Bierman
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Kent Watsen
- Re: [netconf] YANG attributes in a datastore Andy Bierman
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Andy Bierman
- Re: [netconf] YANG attributes in a datastore Kent Watsen
- Re: [netconf] YANG attributes in a datastore Qin Wu
- Re: [netconf] YANG attributes in a datastore Qin Wu
- Re: [netconf] YANG attributes in a datastore Ladislav Lhotka
- Re: [netconf] YANG attributes in a datastore Martin Bjorklund
- Re: [netconf] YANG attributes in a datastore Kent Watsen
- Re: [netconf] YANG attributes in a datastore Kent Watsen
- Re: [netconf] YANG attributes in a datastore Andy Bierman
- Re: [netconf] YANG attributes in a datastore Andy Bierman