Re: [netmod] Backward Compatibility Question
Andy Bierman <andy@yumaworks.com> Mon, 02 October 2017 16:45 UTC
Return-Path: <andy@yumaworks.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E43C7133039 for <netmod@ietfa.amsl.com>; Mon, 2 Oct 2017 09:45:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 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_LOW=-0.7, 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 Bnw3kK6i3f3z for <netmod@ietfa.amsl.com>; Mon, 2 Oct 2017 09:45:01 -0700 (PDT)
Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com [IPv6:2a00:1450:4010:c07::235]) (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 B571913234B for <netmod@ietf.org>; Mon, 2 Oct 2017 09:45:00 -0700 (PDT)
Received: by mail-lf0-x235.google.com with SMTP id m142so2924742lfg.8 for <netmod@ietf.org>; Mon, 02 Oct 2017 09:45:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6V5neIFTgOKIuMozg557bJcGAIYEi3adpbpwdtaQQmc=; b=RDrJShFLWIxrv5vfIRg7SPPn0yGqR9wYM+AHG2bmdfkthEeniTPk8RooOrCPkx0fWf IJ3H0pY1kZCrR0TdUXFZ7cvRl9Fw4da5me/iS0wjatvlrUPFIwenoVsDJ6V9VVsdKqoo YZc8d6ax+omXdLqq/XwtP+3va8BTK4g52ypWhbDNGq2lwZxVmxHWwq8T1ytNOmAAsEuM k0WPf6MtY5t6EUmRT5tLFch4zBmAfeGIfnBlB08GeVdl+8JbDfsIudDfToNVzcrNE+Kz yCjZ8ViMzZXjAMZBX7yCaGDpyN+po3TxKr6LG1p7mDiBvfd/L82Jrn9r+OfM5AEAGkVg vTvw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6V5neIFTgOKIuMozg557bJcGAIYEi3adpbpwdtaQQmc=; b=lKE7FyQJ0IdAGWGVqZ+AEnUZYoqaUuOG/YjdfkR30fHpz/FVgXylddsm+ANMEJV8ri mD2pKji3PJuDAzEUV6a/llbVT/bPYy/rZZr5VimIjcxSDOdxGt0GvUoFYlEcVBW9f5XH aOyafFeU55vrWTyxS2jIx5JBborcmhR9dlT9OQ1v58T6rIGEwgWKA5BPQ2HbldezZHXF zhq6K00jfTTPuX8rwJ4Wa41WfF4nQdyhJR85g2QPluAw4BNQVPP24C/hjx1m7zDSPte7 58RyDbaBu853BxFN8RQUluiECSgua7NvDDH4ZK/Edg5W/rhKFNzZR7hGZBHXOfnz4dOm cYyQ==
X-Gm-Message-State: AHPjjUj9oS6k0v7sdsZE4lI1bYczXmwV5Y+/v86lUygrYXWJPqEhX2Ua +Qk4AJysz0ZD6TQ6WPTZi1iNAASIpYFz608POmIW3Q==
X-Google-Smtp-Source: AOwi7QCnnI0erxU1SLWyrdiE3u7rsSbxun0YGnOUozvifnSymvDHbQtxl4VGmYullIOjAOqvRGN5KrfqAL2JRfNuJD8=
X-Received: by 10.46.4.154 with SMTP id a26mr7583477ljf.6.1506962698987; Mon, 02 Oct 2017 09:44:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.25.143.139 with HTTP; Mon, 2 Oct 2017 09:44:57 -0700 (PDT)
In-Reply-To: <F0EED155-D776-4B3A-9C95-6F7682244AD7@juniper.net>
References: <F0EED155-D776-4B3A-9C95-6F7682244AD7@juniper.net>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 02 Oct 2017 09:44:57 -0700
Message-ID: <CABCOCHQ-fOmV7v4ZjdYP9afCS7eTSFy1DQeoNNddikZSDzpx=w@mail.gmail.com>
To: Kent Watsen <kwatsen@juniper.net>
Cc: JOEY BOYD <joey.boyd@adtran.com>, "netmod@ietf.org" <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="94eb2c1ce05e5cff0b055a9318b5"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/sIV70DppxYFeVTsHK6LGjYDyAU4>
Subject: Re: [netmod] Backward Compatibility Question
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 16:45:05 -0000
Hi, It would change the schema node for an object if it was wrapped it in a choice. This affects augment and deviation statements that reference the old schema node. The 'uses' node is a special case since it never appears in a schema node identifier. Andy On Mon, Oct 2, 2017 at 9:31 AM, Kent Watsen <kwatsen@juniper.net> wrote: > Hi Joey, > > Your proposal looks fine to me, since it doesn't change the semantics of > the data model. Note that https://tools.ietf.org/html/rfc7950#section-11 > says: > > o Any set of data definition nodes may be replaced with another set > of syntactically and semantically equivalent nodes. For example, > a set of leafs may be replaced by a "uses" statement of a grouping > with the same leafs. > > Kent > > -- > > Hello, > > Does anyone have thoughts on this? > > Regards, > Joey > > -----Original Message----- > From: JOEY BOYD > Sent: Wednesday, September 27, 2017 9:06 AM > To: 'netmod@ietf.org' > Subject: Backward Compatibility Question > > Hi all, > > Suppose I had a published YANG model with the following leaf. > > > leaf thing1 { > type uint8; > description > "Thing 1."; > } > > Later, I realize that I wish I had modeled this in a choice as I now have > a mutually exclusive option to 'thing1' which I want to add to the model. > > leaf thing2 { > type empty; > description > "Thing 2."; > } > > This is a very simplified example but should be sufficient to demonstrate > the problem. > > If I look at the XML representation of 'thing1', it looks like this. > > <thing1>123</thing1> > > If I were to move 'thing1' into a choice with a single case, it would look > like this. > > choice things { > case thing1 { > leaf thing1 { > type uint8; > description > "Thing 1."; > } > } > } > > Looking to the XML representation, it looks the same as before. > > <thing1>123</thing1> > > To me, this means that taking a single node or set of nodes and moving > them under a case within a new choice statement is a backward compatible > change. This assumes, of course, any mandatory or default behavior is > preserved. I now can add 'thing2' to the existing model as an option to > 'thing1'. > > choice things { > case thing1 { > leaf thing1 { > type uint8; > description > "Thing 1."; > } > } > case thing2 { > leaf thing2 { > type empty; > description > "Thing 2."; > } > } > } > > Do you agree with this analysis or am I missing something? > > Best regards, > Joey > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://urldefense.proofpoint.com/v2/url?u=https-3A__www. > ietf.org_mailman_listinfo_netmod&d=DwICAg&c=HAkYuh63rsuhr6Scbfh0UjBXeMK- > ndb3voDTXcWzoCI&r=9zkP0xnJUvZGJ9EPoOH7Yhqn2gsBYaGTvjISlaJdcZo&m= > vi3qkFb6HjmIlHo1rXJ2EV-Px58aFLqNc_L6hFsiug4&s=RBiaGoEWCnihPqGVmD6nyVoG_- > 2vlalhOsqwUjsSRqg&e= > > > _______________________________________________ > netmod mailing list > netmod@ietf.org > https://www.ietf.org/mailman/listinfo/netmod >
- Re: [netmod] Backward Compatibility Question JOEY BOYD
- Re: [netmod] Backward Compatibility Question Martin Bjorklund
- Re: [netmod] Backward Compatibility Question Andy Bierman
- Re: [netmod] Backward Compatibility Question Kent Watsen
- Re: [netmod] Backward Compatibility Question Andy Bierman
- [netmod] Backward Compatibility Question JOEY BOYD