Re: [netmod] RPC input parameter definition order (uses augment)

Jernej Tuljak <jernej.tuljak@mg-soft.si> Mon, 04 April 2022 11:48 UTC

Return-Path: <jernej.tuljak@mg-soft.si>
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 2FCC23A20FA for <netmod@ietfa.amsl.com>; Mon, 4 Apr 2022 04:48:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.109
X-Spam-Level:
X-Spam-Status: No, score=-2.109 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mg-soft.si
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 3IK7LGFdsGxx for <netmod@ietfa.amsl.com>; Mon, 4 Apr 2022 04:48:47 -0700 (PDT)
Received: from galileo.mg-soft.si (gate.mg-soft.si [212.30.73.66]) by ietfa.amsl.com (Postfix) with ESMTP id 7580F3A2101 for <netmod@ietf.org>; Mon, 4 Apr 2022 04:48:46 -0700 (PDT)
Received: from [10.0.0.222] (tp-x61t.mg-soft.si [10.0.0.222]) by galileo.mg-soft.si (Postfix) with ESMTP id 782BDC401147; Mon, 4 Apr 2022 13:48:44 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 galileo.mg-soft.si 782BDC401147
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mg-soft.si; s=default; t=1649072924; bh=GWdFZtDH+Oo1AIciStXuDI5wQMQX+RWl3UwRAHAliD0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=k5it5CXPzQa92FydbIBDVDlu6CpqAKxUKm0y2cmP3S237y2SGJz7H6KOhiVzAqmdq BjCLsNhBBOnPS1l0RW2lI+9VAUxiZA8He1xddNlrXRp5QvgcE3SLuYMtIBI7mMTO+x /ppdDaFqdkfrRXvJLlV3vdqMdn40Ifl/RICDqHwIo3t4OnUa1Ne4WawZ3C4iGQDEs7 yZmF1Z17InidTWRiTQpsET9+nQA89tZ0r4aItJib9VyglctjpMGPmBOMafUZzZGCyY Ym90Q4uAOwzixkb2JErRgQaKGCePnCBRuaWcB9KDPNkD1awv8ewC5SYiJPPDMev4DJ JmldI209jCpJg==
Content-Type: multipart/alternative; boundary="------------NvVJ20g0040JW4w7nO05OtcQ"
Message-ID: <9a55de3d-c7bc-597a-e1c8-e11f58325049@mg-soft.si>
Date: Mon, 04 Apr 2022 13:48:43 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0
Content-Language: en-US
To: Andy Bierman <andy@yumaworks.com>, Kent Watsen <kent@watsen.net>
Cc: NETMOD Working Group <netmod@ietf.org>
References: <3740e8e7-5e90-f2e2-b252-0dd42690f71c@mg-soft.si> <0100017fe4dec66b-298dc5a9-2d75-4a10-b90b-d11553726957-000000@email.amazonses.com> <CABCOCHR4pGF8wouBkcZm9hJMtKN8TWNNAs8RRfUP-6fHtCPXnw@mail.gmail.com>
From: Jernej Tuljak <jernej.tuljak@mg-soft.si>
In-Reply-To: <CABCOCHR4pGF8wouBkcZm9hJMtKN8TWNNAs8RRfUP-6fHtCPXnw@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/vjwAVwangHFOEP9DRqPhuv4ZtKQ>
Subject: Re: [netmod] RPC input parameter definition order (uses augment)
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
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, 04 Apr 2022 11:48:53 -0000

On 01/04/2022 15:49, Andy Bierman wrote:
>
>
> On Fri, Apr 1, 2022 at 4:24 AM Kent Watsen <kent@watsen.net> wrote:
>
>
>     Hi Jernej,
>
>     > RFC7950, 7.14.4. says:
>     >
>     >    Input parameters are encoded as child XML elements to the rpc
>     node's
>     >    XML element, in the same order as they are defined within the
>     "input"
>     >    statement.
>     >
>     > For the following model:
>     >
>     > module b {
>     >   namespace "b:uri";
>     >   prefix b;
>     >
>     >   grouping params {
>     >     container params {
>     >       leaf x {
>     >         type string;
>     >       }
>     >     }
>     >   }
>     >
>     >   rpc foo {
>     >     input {
>     >       uses params {
>     >         augment params {
>     >           leaf y {
>     >             type string;
>     >           }
>     >         }
>     >       }
>     >     }
>     >   }
>     > }
>     >
>     > If both "leaf" data nodes are instantiated (XML encoding) as
>     part of <rpc> for "foo", does <x> come before or after <y> (in
>     document order)?
>
>     Augmented-in nodes come after other nodes.
>
>
>
> Maybe this is an implementation convention, but the RFC says they are 
> encoded in any order.
> https://datatracker.ietf.org/doc/html/rfc7950#section-7.17.2
>

You are referring to this:

    When a node is augmented, the augmenting child nodes are encoded as
    subelements to the augmented node, in any order.

This implies interleaving of augmenting and non-augmenting child nodes 
within "input" parameters for XML encoding?

Jernej

>
>     I’ve always wished there were a way to specify where they’re
>     placed, for readability, but it’s too inconsequential to raise as
>     an issue here.
>
>
> There is no canonical order defined for any schema nodes.
> There is no order at all defined for top-level or augmenting schema nodes.
>
>
>
>     > Jernej
>
>     Kent
>
>
> Andy
>
>     _______________________________________________
>     netmod mailing list
>     netmod@ietf.org
>     https://www.ietf.org/mailman/listinfo/netmod
>