Re: [YANG] Usage of rpc under container or list statement

"Romascanu, Dan (Dan)" <dromasca@avaya.com> Sun, 21 July 2013 12:28 UTC

Return-Path: <dromasca@avaya.com>
X-Original-To: yang@ietfa.amsl.com
Delivered-To: yang@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1220421E8091 for <yang@ietfa.amsl.com>; Sun, 21 Jul 2013 05:28:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.366
X-Spam-Level:
X-Spam-Status: No, score=-103.366 tagged_above=-999 required=5 tests=[AWL=0.232, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wcK4CIw4X3A0 for <yang@ietfa.amsl.com>; Sun, 21 Jul 2013 05:27:53 -0700 (PDT)
Received: from de307622-de-outbound.net.avaya.com (de307622-de-outbound.net.avaya.com [198.152.71.100]) by ietfa.amsl.com (Postfix) with ESMTP id 3837A11E80D9 for <yang@ietf.org>; Sun, 21 Jul 2013 05:27:50 -0700 (PDT)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AnYFAPbS61GHCzI1/2dsb2JhbABagkIjITVQwC+BFxZ0giQBAQEBAxIbXAIBCA0EBAEBCx0HMhQJCAIEARIIGoduAZpomxAXjmSBATcBBoMKbgOeI4sHgxKBcTk
X-IronPort-AV: E=Sophos; i="4.89,713,1367985600"; d="scan'208,217"; a="17265054"
Received: from unknown (HELO p-us1-erheast.us1.avaya.com) ([135.11.50.53]) by de307622-de-outbound.net.avaya.com with ESMTP; 21 Jul 2013 08:27:47 -0400
Received: from unknown (HELO AZ-FFEXHC04.global.avaya.com) ([135.64.58.14]) by p-us1-erheast-out.us1.avaya.com with ESMTP; 21 Jul 2013 08:21:35 -0400
Received: from AZ-FFEXMB04.global.avaya.com ([fe80::6db7:b0af:8480:c126]) by AZ-FFEXHC04.global.avaya.com ([135.64.58.14]) with mapi id 14.02.0328.009; Sun, 21 Jul 2013 08:27:45 -0400
From: "Romascanu, Dan (Dan)" <dromasca@avaya.com>
To: Kedar Gaonkar <kedargaonkar@gmail.com>, "yang@ietf.org" <yang@ietf.org>
Thread-Topic: [YANG] Usage of rpc under container or list statement
Thread-Index: AQHOhg05xlRmGdOrnkaf8Z1SgxhjL5lvDqwg
Date: Sun, 21 Jul 2013 12:27:44 +0000
Message-ID: <9904FB1B0159DA42B0B887B7FA8119CA1287A840@AZ-FFEXMB04.global.avaya.com>
References: <CAN=5dVwdrfz1T1RXRQF8pTH5v6qVjWSJ-rpXVpY_3ZK9AYzvSg@mail.gmail.com>
In-Reply-To: <CAN=5dVwdrfz1T1RXRQF8pTH5v6qVjWSJ-rpXVpY_3ZK9AYzvSg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [135.64.58.46]
Content-Type: multipart/alternative; boundary="_000_9904FB1B0159DA42B0B887B7FA8119CA1287A840AZFFEXMB04globa_"
MIME-Version: 1.0
Subject: Re: [YANG] Usage of rpc under container or list statement
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 21 Jul 2013 12:28:00 -0000

Hi Kedar,

We are not using this mail list for a number of years. Actually I thought that it was closed until your message arrived. I suggest that you send your message again to netmod@ietf.org<mailto:netmod@ietf.org>.

Regards,

Dan



From: yang-bounces@ietf.org [mailto:yang-bounces@ietf.org] On Behalf Of Kedar Gaonkar
Sent: Wednesday, July 17, 2013 11:49 PM
To: yang@ietf.org
Subject: [YANG] Usage of rpc under container or list statement

Greetings,

Can I have an rpc statement under a container or a list? RFC 6020 doesn't mention 'rpc' under section 7.5.2 (container substatements) or 7.8.1 (list substatements).

In my data model, I have a list defined for access points. The key for this list is the mac-address of access point. Along with all the leaves, I wanted to define an rpc under this list that enables or disables the LED of access-point. Since this rpc has meaning only for access-points, I was wondering if I could logically group it under the list, or is it mandatory that all rpcs have to be defined globally outside of containers?

container access_point {
                config false;
                list ap {
                                key "mac_address";
                                leaf mac_address  { type yang:mac-address; }

                                <some-other-leaves..>

                                rpc set_led {
                                                config false;
                                                input {
                                                                leaf on { type boolean; }
                                                }
                                }
                }
}

Thanks,
Kedar