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

Andy Bierman <andy@yumaworks.com> Fri, 01 April 2022 13:49 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 F11DA3A0CDE for <netmod@ietfa.amsl.com>; Fri, 1 Apr 2022 06:49:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=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=yumaworks-com.20210112.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 5OppscEz5KJy for <netmod@ietfa.amsl.com>; Fri, 1 Apr 2022 06:49:48 -0700 (PDT)
Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) (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 18A9B3A0B64 for <netmod@ietf.org>; Fri, 1 Apr 2022 06:49:48 -0700 (PDT)
Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-2eb2fc29caeso2924227b3.4 for <netmod@ietf.org>; Fri, 01 Apr 2022 06:49:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Z3HUjxokP+NpvEv5V2GUG/R37YZ+baXtJ0QxNYmeWVw=; b=wa1ViSVDjB3R+YKvSUbPvtd5UG/5kjYbHCZZiunF/L3/yHhYDabTH3o48R1Xuh9huf uXSSGIakjrU/Hv6nU4j4d9QXqZZ3w7s4TPUmJNWujozdsquUBDlPaYi1RdDBZxTPZrsG mPbVmYO5S/EHL7Urw3Vs7sYPAtVWgM8t+SQKrF5CU6DWBLXeS0ZF/Smgg/+xnGApFPVv 9L0GA5ngWKHDhBtKAPIvjLz0G08zIXHnvNMfnb1l+YoGB2BEcxsaGB6ToVbBDpb8tzQk mpuHGzSjk3KBGusn4jdwsw5uDrBjQGs1x6W7wa+CCUWPdWzQ6hPUb3NaDrmRxHhIm2S7 uRMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Z3HUjxokP+NpvEv5V2GUG/R37YZ+baXtJ0QxNYmeWVw=; b=ficit7ccQ+zeZWb6Emwq8jyGCpEzbjLOMApZd5tOczw2D55+2wNEB33MrL9+gKmEuR u/viI9cWtfZ8/U3sexk38S0apm77FzguuwHbNrN+bxawkG9Z5nteRvXdFCeZ9dbXl6OP iyFPz5X/Vvgv3pWNNrWghs3kkkmCrLpDbUlPkNmGc+uyJLe+l2+RpIpet0gtpNmSTysv 3tSPotPWuTzly3MGKBgXqgz18t+YExFUBAF9LmOmh10llyQIUSMP7FWZY0uroFjw067s ffETPfxGmAbNayQ+vGajwA7j/qWmF21cEb1/yf/qEihTWhj7shtlMDTthhcJWM83q41Y +Vgg==
X-Gm-Message-State: AOAM5326agljH2u8G9oTnBDGnfn806FEEe3ivP8IMxeFuilpTRgwKhFX Mi8okHuGGuwpclSl9e813mm3qdoe6ux3KUedh4UCLoGpErGk4A==
X-Google-Smtp-Source: ABdhPJyoO1DMNu++XsBnCgdqw7f1JDgvH/v5C8z+ZtQ73bQn02zxUg3ZeFzLFuk3Iqc7goNmMeKj8ieiLqUqSy+9Cvc=
X-Received: by 2002:a81:60d6:0:b0:2e6:bba1:966c with SMTP id u205-20020a8160d6000000b002e6bba1966cmr9961090ywb.322.1648820986750; Fri, 01 Apr 2022 06:49:46 -0700 (PDT)
MIME-Version: 1.0
References: <3740e8e7-5e90-f2e2-b252-0dd42690f71c@mg-soft.si> <0100017fe4dec66b-298dc5a9-2d75-4a10-b90b-d11553726957-000000@email.amazonses.com>
In-Reply-To: <0100017fe4dec66b-298dc5a9-2d75-4a10-b90b-d11553726957-000000@email.amazonses.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Fri, 01 Apr 2022 06:49:36 -0700
Message-ID: <CABCOCHR4pGF8wouBkcZm9hJMtKN8TWNNAs8RRfUP-6fHtCPXnw@mail.gmail.com>
To: Kent Watsen <kent@watsen.net>
Cc: Jernej Tuljak <jernej.tuljak@mg-soft.si>, NETMOD Working Group <netmod@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000036c0e905db980d56"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/rqbKL1PY5ZitXdBVVkxy_Eaou6E>
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: Fri, 01 Apr 2022 13:49:53 -0000

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


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
>