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 16:27 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 1F9913A0BF0 for <netconf@ietfa.amsl.com>; Thu, 30 Apr 2020 09:27:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 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, 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 lLR9k2AtxJ9F for <netconf@ietfa.amsl.com>; Thu, 30 Apr 2020 09:27:29 -0700 (PDT)
Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on0724.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::724]) (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 2DDC53A0BDA for <netconf@ietf.org>; Thu, 30 Apr 2020 09:27:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cQYpRQkxCxzb/Zqb8+qw3wuLzZGY3EFjwfqhYKWmR2+Jjmhugm8GWFE7Q4ElrnzevTxJ2PrGqwWm9RvMlOqXcr6GI69e8J0HM76cFTVRx8OUUmaSfJIO0Esci5+szzjxGXT+CJYkwR6smC+lkoAh4A1J1wxwpslm25Tq1VuLsYtAD8X6nqE2X0d4W5bYjJsfbxRldS7WsF8wubkYgpE/9oG/HEaxEdJ/gjrNzWBzzxrlXALNcK5fx4gQhpHWL1efnvvhz4xvKCETi1Wpyt7twN9l3f8qbrgEXcDRZsDUccRzK40R5V255ZC1jVp/U8SQQ+uLrGRJkZ2KhL3OTOrgpQ==
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=NO2mH4FGejfaoI+Ha2PF633msy7B3lvHUf+6P6KoZzQ=; b=GMUcUspRP//RkJasWxbnvplnbDxaS5RKVonU0v6/dN1cWaakPCF0WT45DzwSZR0W7KfIILf6NTHzW4DMyLqtkRWuF30Jj65+sUC2Ix+T3UXlQXhfwhurUxGQKaxQs6yXfJXS8EUEitwmxPK9Z8Mul1f6ZjAH9CM0dPGYb3KVfqW3sQX0SaQTpxzgn4TzMzkWfqjgFtLkzK7p1r/nyzuRocCBAH1+IqgEPk72G6bp4u/6VIQNq+SNeJ6SF9ErNUH6EuDzxSEGT2kRXVT6Mq+Yw0PhlQG7gptG6H3tHnA5d8q/LMGMzWxm6awaAXsVq2bDPybIbTZgiU+akUbsRMFgmQ==
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=NO2mH4FGejfaoI+Ha2PF633msy7B3lvHUf+6P6KoZzQ=; b=r+gF4t5BjC5BRH6CiVb/Zrrgu/ybJpkLSdQfPye9IqOAGyRHysSobBOObGortjCCoBOeSzmgCnOiqupbxFqpfjqSf+iEOlu4mERFd9Y5qGGK9Knmad9QvBMNtZL46XFlNJ0CZJx8pi8UTyEuUeEdAqKr45czpCkjxIPjLLdtLCc=
Received: from DM5PR08MB2633.namprd08.prod.outlook.com (2603:10b6:3:ca::21) by DM5PR08MB3580.namprd08.prod.outlook.com (2603:10b6:4:6b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Thu, 30 Apr 2020 16:27:26 +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 16:27:26 +0000
From: "Sterne, Jason (Nokia - CA/Ottawa)" <jason.sterne@nokia.com>
To: "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///FAQCAAEaVEA==
Date: Thu, 30 Apr 2020 16:27:25 +0000
Message-ID: <DM5PR08MB2633108CDAB4602608749A7E9BAA0@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>
In-Reply-To: <F231F702-1DB6-454D-95C8-8FD0F702E7ED@cisco.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: cisco.com; dkim=none (message not signed) header.d=none;cisco.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: 688bc4b6-a9fb-43e6-5163-08d7ed235e86
x-ms-traffictypediagnostic: DM5PR08MB3580:
x-microsoft-antispam-prvs: <DM5PR08MB3580227DEDBE9A875AF310C59BAA0@DM5PR08MB3580.namprd08.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:8273;
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)(39860400002)(366004)(136003)(346002)(478600001)(8676002)(66946007)(52536014)(64756008)(66556008)(66476007)(966005)(5660300002)(8936002)(66446008)(6506007)(53546011)(2906002)(7696005)(186003)(110136005)(86362001)(9686003)(316002)(71200400001)(55016002)(33656002)(76116006); DIR:OUT; SFP:1102;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: WYu6ywURtNtncpwP0m/1+CvJsWnhRxySOPQ5YaDaJO6B38bz7aldDlR+CH4pNVEprhVWHXFuMWd+/JBG4mdGSG88Vqr4nFJaMtw+sowNWdNamkzcIqJcssWTZWA2MVRiTlpJ38q1CpkpVxhYirBo5VMeUDFk3aimFHnz53dpg0mmepezGSW//iAYJOePVa/5YI0THr+vSU1GBBbmH2cZNYhK7InIHfqIlTjbq6i0yaeHD6+at7+e57ZkB3x8obbKxfKmIl8BEgjd2vXGWBpIPZ5cfWY3TdxN1OQp47s2krPBwrPKi8cnHhuNpzIKpMSP0vSnSDeZUFLbCaU4eTrnlCwmW/HuEvKomn0YG1dNUtgu1IYInvC7VGUXAzIbbGzzWRZWXsIwGqYh9zt0NL/P5lskV3lmk0TZOtWGM9wyG6SPVtwfZeLCZTEAIVNmkL7Szi1Ht56cJZcd9T7U+mR+6YoIxf3ywLw04uCxfS2D42hqgWov/WrGDMb0Dnva4F6vG7LEAWUu1EfaJqZwv92ZMg==
x-ms-exchange-antispam-messagedata: eX54mNC5ci4ua+vEGOzaieJJGnsez3D8YjNVpLMsetxqlu3eo1q34GrpmdFKCzzMy6UE6TgsjgveEUSFVX3MkJHreUTVA3LAKczkAoTj7TyOZWrpMkavszI/Ta6z0CiR62f7yMLZVW+K2+smZUreOY8rfBz+79DYjEdOjKZNl4j9z+bHxpIplITqRPi/duhieDdMQ2wr6qoB6wOpwSTfIQqF37iHGU/3QMOorFs1cBjdPq/vK6NXDsjXMOhf66AL3f3w2pb9Z/RQfYA4w6m2fmAjFnBQVCU/mClDQm5wDD60IU4CNd88Wff9gKbnsa4aGWrXznIHD8pO1MgqF1oTPWxwu2IYbgV+8fSsVqzcj1aHq0K1OHCoiaUuKwxiXbRPOPcRTpyNMCHVC3HAxI8i1gKNE4hAkGLm8oQBi2g9uZZldHoF5jvqxdlI0iob9IBAe4zmTPaEjC2v0MHHuPNH9B3uDn8TiRPG5UTKotdELKKu/x5NE23PkLu/+3k29raKaE6rTlQViYh8GrRaKg4HLgSxbEEUHXySeNKp7+A5z4saU0KUudvMinlwtn0Njie6sI28T4ry+GP/NEtqrthWWvpp3+bspo/uJ/HQmCJ1NwktTAvPWnl72/may+9g6/U+Hgu89mKUz64RH5gtiWJ26zJpkYDIESJzCfuK9CR4q36PNMeOwTKNfOG+kbRRrNKcrq6jxGO67StjGQXY4EiROKlBGGMlWbreMZFc1A7t8gwrmE6XPQM2GwWP6A5nyc92wEqGF9jrwXZniwiG7SFkki8XXXkdUMswpBa5cap5zzEXAm7WXOzeQ6kXM6ouAaqEZc1XCXCrleXz5wMHReckHWWNC9abMFVXhXDXpDex12htaqWUbqgdcIAIuk9zWps7
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_DM5PR08MB2633108CDAB4602608749A7E9BAA0DM5PR08MB2633namp_"
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 688bc4b6-a9fb-43e6-5163-08d7ed235e86
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 16:27:26.0034 (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: 05MOdkh0a6d4kuDCrq6sKoWyemtyCIsB+Vnu2t/Jg5HjtB6C9deX7txTWWhYhnsVHag7dbS03XBvrB6D7Ok7rQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR08MB3580
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/4fU3tEUflmS09PNBgXsKSsajRIM>
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 16:27:34 -0000

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>


From: Reshad Rahman (rrahman) <rrahman@cisco.com>
Sent: Thursday, April 30, 2020 12:13 PM
To: Sterne, Jason (Nokia - CA/Ottawa) <jason.sterne@nokia.com>; 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