Re: [netconf] YANG attributes in a datastore

Andy Bierman <andy@yumaworks.com> Wed, 11 December 2019 20:35 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 75474120058 for <netconf@ietfa.amsl.com>; Wed, 11 Dec 2019 12:35:34 -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 N1k60NYQ19F1 for <netconf@ietfa.amsl.com>; Wed, 11 Dec 2019 12:35:32 -0800 (PST)
Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (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 1BB33120052 for <netconf@ietf.org>; Wed, 11 Dec 2019 12:35:32 -0800 (PST)
Received: by mail-lf1-x135.google.com with SMTP id y1so6426675lfb.6 for <netconf@ietf.org>; Wed, 11 Dec 2019 12:35:32 -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=HiJFvVAwBssppekkjgjvR+Wlbd+sd5E5zu1BRJ6Vku0=; b=bsBVXv+bZ0Sw99x4KhboeApcQsmlh34u0iR5bnuzksUW6D7rlyaR3pQiLW8o6l+ZWW nYmBEjmP0EuweE+RFn8oosY1Vfz7l9xkgmBUsUSIT1wMhwyv1FQGuBIB7Ug6XX66pDSk ByqiXxMOJLB0FDVSdN5fK21TSM31IoO+pEZJ5yt4Ql5l6etDxq0vavoqb5aIZPKQGraw MjtRQ7R8slq7tKfE6vuwQC79Fd8aUDENf+rDam4hjYSn2rA3dBiZG55Z6smXB8mswLg5 eZvv5qaGUp713K7Xn0ruBYMnTSxJpYRTY1S9FZfDYmq1w5bxefzD9vWJN1D3m+WBsjYO gxnw==
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=HiJFvVAwBssppekkjgjvR+Wlbd+sd5E5zu1BRJ6Vku0=; b=UXFsRS4Rhmb6xXxLvL4II82WTttHlpmxSr9QJhPYCyyOtTKI6PWIbPQurCn0/PAAkv 6Wf8d9bIpBBCdT7izO6PHVxY3+8KiQaN6UULbsdjRv9r6E5EeKkS0fe9gUi5KSG46fK9 v67na4SBQHhYZRVGH9Gsgesq2wGx7jyTeqWih5TMhwOdjDciPWzPPw1WRO0lWTQKDWxI EK7VSYUNsW6tX/luA/rTFPD0fYvXgu/GDNZU7tFdRnkyksxMBnsXVzxMuhLUwRQuBi3S +BgialT+B/YlgTOgUM4JLYRFuu9YDywc2SWx0v4D350EaACpvSrWimfnFAzplWHYf2n0 zmGQ==
X-Gm-Message-State: APjAAAXObVyLLF/O851tbdKaqGbd7sWHbeHs/kIDD+OWRnsvkflRbYEi Wt4EUeh7AGBTTIcHIhjqan1deRaD0+PyqajiJbxtFQ==
X-Google-Smtp-Source: APXvYqxGa+HZ0Qm4tTUlqMyEsh2LVRMJ8VtHT8TJhAuKsQGAXVd8XaV0r3fAM+7QUu3DcQBQ7k44cNbaZ4lAJFwQSpA=
X-Received: by 2002:a05:6512:15d:: with SMTP id m29mr3589056lfo.51.1576096530086; Wed, 11 Dec 2019 12:35:30 -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>
In-Reply-To: <7027e13e49a631ee06a8fe63ba3e2abf102963dc.camel@nic.cz>
From: Andy Bierman <andy@yumaworks.com>
Date: Wed, 11 Dec 2019 12:35:18 -0800
Message-ID: <CABCOCHQ2t6kiHpFrs67Zj0GyVfpMB6615vnZ4nyBFxpvf7ESVw@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="000000000000cec90a05997391a6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/1JPhS8tUQQr54lvj3WUwd-_sUFE>
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:35:34 -0000

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.

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