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

From: Balazs Lengyel <[email-masked]>
Date: Tue, 23 Jul 2013 11:26:06 +0200

Hello Kedar,

This was planned, but never maid it to the RFC. However both Tail-F
and Ericsson is using such a thing. We are considering writing an
RFC about it at some point.

regards balazs

From:
[email-masked] [mailto:[email-masked]]
On Behalf Of Kedar Gaonkar

Sent: Wednesday, July 17, 2013 11:49 PM

To: [email-masked]

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

--
Balazs Lengyel Ericsson Hungary Ltd.
System Manager
ECN: 831 7320 Tel: +36-1-437-7320
Mobile: +36-70-330-7909 email: [email-masked]

---

From: Andy Bierman <[email-masked]>
Date: Tue, 23 Jul 2013 08:48:37 -0700

I think it didn't make it in because YANG is not OO. Placing an rpc inside a data node does not change that.

Andy

Sent from my iPhone

On Jul 23, 2013, at 2:26, Balazs Lengyel <[email-masked]> wrote:

> Hello Kedar,
> This was planned, but never maid it to the RFC. However both Tail-F and Ericsson is using such a thing. We are considering writing an RFC about it at some point.
> regards balazs
> 
> 
> From: [email-masked] [mailto:[email-masked]] On Behalf Of Kedar Gaonkar
> 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 {
> 
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod