Re: [netconf] Error to make a NETCONF action call without including an action node?

"Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com> Thu, 30 April 2020 21:46 UTC

Return-Path: <jason.sterne@nokia.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 7D68B3A1418 for <netconf@ietfa.amsl.com>; Thu, 30 Apr 2020 14:46:40 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level:
X-Spam-Status: No, score=-2.72 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H2=-0.82, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 qXvPhdZeDE0u for <netconf@ietfa.amsl.com>; Thu, 30 Apr 2020 14:46:29 -0700 (PDT)
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2103.outbound.protection.outlook.com [40.107.94.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B0E9F3A143C for <netconf@ietf.org>; Thu, 30 Apr 2020 14:46:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IDPGgXTbauEtJpnJmgeBLDgXfOymRQzY9uIyoIftXbN7dG93Zde/ISpBxoVwWQdVxntURaTIcseoufOu1imjfVsWOqqm2npqMYAVwqHHshoJZIasWS1pH4a6t9AOPQwsWtHD2nmKyVwMR1J9jCsLeCiEo9bHFwhJkVzYKYfeHRcUae/3mTNX5rd+HtLptuHXqwUdDr/JjSDxfdUVtD/0Incohel/IVO0Eo8u5EcXqZf77oz0Jq2zFYZL92yxzKQzpf4XfnFBWv5+LCWcbtvf9KQg651gTqAiyRECkJzz78yS8PP6rVlmZb3OfQcm1TBp8y5v+ICyj/SPeUq1lAqknA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fut/x7SX4oFsaNa65akGQkskMcZO9PAToye7WOGKFa8=; b=bnkU1/+WdATKPw6N6yuNVrQEtxr53Qd30QHzX8AJMpCmdKULxHE+4E7qAwrIPInO4k3Il6nrAh4Q3+sxY/Nf1WjJgmOaJKZi0tCTApkXpJQomFeetdCltrYTwUqKVONinuizkiw+Y1Ssa6Dy+EmgmfxL314qXfL+pXDfbLymaKZ69waM5b1yuWREer7xv/EE/7O0cptQrg7zVCabeNZabdNj8szao3paTWgb/1lpJDZSedRT4h9LwPs3WPbCimHJ5hJ/6lnpRjHq1xxMkfX5FVyyoaXbJlpdzrWn2ICBRAGuirDjr14PNz+R7bvuGNOpANLAempSpfxvtS8Wgy3/Ng==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fut/x7SX4oFsaNa65akGQkskMcZO9PAToye7WOGKFa8=; b=ScXD6/7i8B48Gy8yLM99Oc2O+Fp6AJSFLGROO2EWYe8dWHiJtLil6RWSoWCBsoeEyZk5/RUhrumK6BAirjPEltk3d4hAO0tmmNMvhAQuJWcjx2wO/+jAwKiHeClAOv9HctVKuF9GKIRGvFpaBzmeGgXGR6VaJGDQRF0YlUmfdII=
Received: from DM5PR08MB2633.namprd08.prod.outlook.com (2603:10b6:3:ca::21) by DM5PR08MB3339.namprd08.prod.outlook.com (2603:10b6:4:68::37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.22; Thu, 30 Apr 2020 21:46:25 +0000
Received: from DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::c00d:56c3:675e:ec63]) by DM5PR08MB2633.namprd08.prod.outlook.com ([fe80::c00d:56c3:675e:ec63%3]) with mapi id 15.20.2937.028; Thu, 30 Apr 2020 21:46:25 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: Andy Bierman <andy@yumaworks.com>
CC: "Reshad Rahman (rrahman)" <rrahman@cisco.com>, "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: [netconf] Error to make a NETCONF action call without including an action node?
Thread-Index: AQHWHwV/1g8NLxNBYU22z22Z2rt/MaiRzmFg///FAQCAAEaVEIAAGC+AgABBUYA=
Date: Thu, 30 Apr 2020 21:46:25 +0000
Message-ID: <DM5PR08MB2633540557CE27A44532CC719BAA0@DM5PR08MB2633.namprd08.prod.outlook.com>
References: <090A9D80-679C-4507-8BF9-BB82601B8260@cisco.com> <DM5PR08MB26331B8862F63FCE356632109BAA0@DM5PR08MB2633.namprd08.prod.outlook.com> <F231F702-1DB6-454D-95C8-8FD0F702E7ED@cisco.com> <DM5PR08MB2633108CDAB4602608749A7E9BAA0@DM5PR08MB2633.namprd08.prod.outlook.com> <CABCOCHSrx7Tyof6Qxag5gaTkwpDeJLJomDMgAgereE0U_JrPTw@mail.gmail.com>
In-Reply-To: <CABCOCHSrx7Tyof6Qxag5gaTkwpDeJLJomDMgAgereE0U_JrPTw@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: yumaworks.com; dkim=none (message not signed) header.d=none;yumaworks.com; dmarc=none action=none header.from=nokia.com;
x-originating-ip: [2607:fea8:e31f:da06:99fd:f37e:6bdf:374e]
x-ms-publictraffictype: Email
x-ms-office365-filtering-ht: Tenant
x-ms-office365-filtering-correlation-id: f24bc4b1-8688-4eba-b747-08d7ed4fee95
x-ms-traffictypediagnostic: DM5PR08MB3339:
x-microsoft-antispam-prvs: <DM5PR08MB3339B913225CDAE8D23B956E9BAA0@DM5PR08MB3339.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-forefront-prvs: 0389EDA07F
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR08MB2633.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(396003)(376002)(136003)(346002)(366004)(39860400002)(316002)(54906003)(53546011)(8676002)(7696005)(186003)(478600001)(966005)(6506007)(66446008)(66556008)(76116006)(4326008)(66476007)(86362001)(64756008)(66946007)(8936002)(52536014)(71200400001)(55016002)(5660300002)(6916009)(33656002)(2906002)(9686003); DIR:OUT; SFP:1102;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: FpkW5U1WSGYFKQriEZ+PQfi//2HP8H8Xwg7hDCl6nTMHOA3kmBUlMKIUQsJmhQs85mMbe8010b2wqtKl8KCIxE6K21axfWafgTmq7RpwIp7R2gspCafdR6+mU+Ke6cXLDldR5yv8OQsBxGBlVioc5CQ+gyHaiBN0BQF36gdsomxhUCpRqcUQhe+xIj1s6saOevWliV7Z5j903bV+OfS2aVNRKw/lic31+Qja4uzR9AG+TKyJ7GC+OmGIwHSAa1Vt5jgY1Jb7KO/odxgxnwhmSnK7cxU89T1O5NcU5e762SCEte6sQOVauJ6J5AbU1uKaBlqjXRRHWgNRQUs9664nlEdwOpr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OwWslrHboiXtlJxVPeKDG
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM5PR08MB2633540557CE27A44532CC719BAA0DM5PR08MB2633namp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f24bc4b1-8688-4eba-b747-08d7ed4fee95
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 21:46:25.4114 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: OTWAkJ7HL39iC84kZ+FHJZ3emFrcG3QYHKYOcPz/mdD2eCuBPtE7e5EXsewFNkCBgSsO5eLuIJGNpQOt92KEHg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR08MB3339
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/WyhE2GMClKQ8Y8trU-nvBn6oip0>
Subject: Re: [netconf] Error to make a NETCONF action call without including an action node?
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: Thu, 30 Apr 2020 21:46:48 -0000

Thx all.

From: Andy Bierman <andy@yumaworks.com>
Sent: Thursday, April 30, 2020 1:52 PM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>
Cc: Reshad Rahman (rrahman) <rrahman@cisco.com>; netconf@ietf.org
Subject: Re: [netconf] Error to make a NETCONF action call without including an action node?



On Thu, Apr 30, 2020 at 9:27 AM Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com<mailto:jason.sterne@nokia.com>> wrote:
No.  I meant this as my example (but Martin's reply clarified it). Sorry for the confusion of having those mandatory statements (although I don't think those are evaluated unless their action parent is requested, a bit like a presence container).

   module test {
       container foo {
         leaf bar { type uint8; }
         action reset {
           input {
             leaf reset-at {
               type yang:date-and-time;
              }
            }
            output {
              leaf reset-finished-at {
                type yang:date-and-time;
              }
            }
         } // action reset
       } // container foo
   } // module

Should NETCONF return an error (which one?) for this request or would the server simply do nothing an return "OK" (like doing a get-data on a non-existent list entry) ?

     <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1..0">
       <action xmlns="urn:ietf:params:xml:ns:yang:1">
         <foo xmlns="urn:example:test">
         </foo>
       </action>
     </rpc>



This should be an error




   The <action> element contains a hierarchy of nodes that identifies

   the node in the datastore.  It MUST contain all containers and list

   nodes in the direct path from the top level down to the list or

   container containing the action.  For lists, all key leafs MUST also

   be included.  The innermost container or list contains an XML element

   that carries the name of the defined action.  Within this element,

   the input parameters are encoded as child XML elements, in the same

   order as they are defined within the "input" statement.




Looks like the "operation-failed" error-tag unless "data-missing" can be used.


Andy




From: Reshad Rahman (rrahman) <rrahman@cisco.com<mailto:rrahman@cisco.com>>
Sent: Thursday, April 30, 2020 12:13 PM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com<mailto:jason.sterne@nokia.com>>; netconf@ietf.org<mailto:netconf@ietf.org>
Subject: Re: [netconf] Error to make a NETCONF action call without including an action node?

I just saw Martin’s response which points out that you’re missing the reset node. So your example should have the reset node but no reset-at input?

From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com<mailto:jason.sterne@nokia.com>>
Date: Thursday, April 30, 2020 at 11:45 AM
To: "Reshad Rahman (rrahman)" <rrahman@cisco.com<mailto:rrahman@cisco.com>>, "netconf@ietf.org<mailto:netconf@ietf.org>" <netconf@ietf.org<mailto:netconf@ietf.org>>
Subject: RE: [netconf] Error to make a NETCONF action call without including an action node?

I used a bad example.  Pretend the mandatory statement wasn't there. Is it an error?

From: Reshad Rahman (rrahman) <rrahman@cisco.com<mailto:rrahman@cisco.com>>
Sent: Thursday, April 30, 2020 11:39 AM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com<mailto:jason.sterne@nokia.com>>; netconf@ietf.org<mailto:netconf@ietf.org>
Subject: Re: [netconf] Error to make a NETCONF action call without including an action node?

Jason, my understanding is that an error should be returned since the input leaf has mandatory true.

Interestingly, the following text (for rpc) is missing from the action section. Oversight or on purpose?
https://tools.ietf.org/html/rfc7950#section-7.14.2
   If a leaf in the input tree has a "mandatory" statement with the
   value "true", the leaf MUST be present in an RPC invocation.

I’d expect this error:
https://tools.ietf.org/html/rfc6241#appendix-A
   error-tag:      missing-attribute
   error-type:     rpc, protocol, application
   error-severity: error
   error-info:     <bad-attribute> : name of the missing attribute
                   <bad-element> : name of the element that is supposed
                     to contain the missing attribute
   Description:    An expected attribute is missing.

Regards,
Reshad.

From: netconf <netconf-bounces@ietf.org<mailto:netconf-bounces@ietf.org>> on behalf of "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com<mailto:jason.sterne@nokia.com>>
Date: Thursday, April 30, 2020 at 11:06 AM
To: "netconf@ietf.org<mailto:netconf@ietf.org>" <netconf@ietf.org<mailto:netconf@ietf.org>>
Subject: [netconf] Error to make a NETCONF action call without including an action node?

Hi all,

If we have this YANG model (omitting some details):

   module test {
       container foo {
         leaf bar { type uint8; }
         action reset {
           input {
             leaf reset-at {
               type yang:date-and-time;
               mandatory true;
              }
            }
            output {
              leaf reset-finished-at {
                type yang:date-and-time;
                mandatory true;
              }
            }
         } // action reset
       } // container foo
   } // module

Should NETCONF return an error (which one?) for this request or would the server simply do nothing an return "OK" (like doing a get-data on a non-existent list entry) ?

     <rpc message-id="101"
          xmlns="urn:ietf:params:xml:ns:netconf:base:1..0">
       <action xmlns="urn:ietf:params:xml:ns:yang:1">
         <foo xmlns="urn:example:test">
         </foo>
       </action>
     </rpc>

Jason
_______________________________________________
netconf mailing list
netconf@ietf.org<mailto:netconf@ietf.org>
https://www.ietf.org/mailman/listinfo/netconf