RPCs and Notifications inside Lists in YANG Balazs
RPCs and Notifications inside Lists in YANG Balazs Lengyel, Ericsson IETF-72 Dublin 2008 July
Issue 1: Procedures in Objects • A good number of people do object oriented modeling – Assumption Objects will end up as lists • Objects contain procedures/Functions beside data • Solution: Define YANG RPCs inside lists
Issue 2: Similar Procedure for different management entities • Often the same management action is relevant for different managed entities • Restart: router, OSPF, Interface, file-transfer • Block: Interface, port, user • Today they can’t all have the simple intuitive name: e. g. restart due to naming clashes • Solution: Name should be scoped by a List i. e. place of definition in the model
Issue 3: RPCs in a Master-Subagent setup • Need to route the Netconf operations to individual subagents without understanding their meaning • Sub-agents usually handle a specific part of the global model e. g. a subtree • With RPCs defined on the top level, no easy way to select sub-agent without understanding the RPC • Solution: Allow RPCs on lower levels inside the model tree. The location of their definition can be used to choose the correct sub-agent
Solution: RPCs defined in Lists • The list will anchor the RPC to a specific place in the management tree • The list will scope the name of the RPC
RPC in List - YANG container mib-2 { list interface { key “if. Id”; leaf if. Id { type int 32; } rpc shut. Down { input { leaf mode { type enumeration { enum immediate; enum graceful; } } …
RPC in List - XML <rpc xmlns=“…" message-id="239"> <action> <mib-2> <interface> <if. Id>3</if. Id> <shut. Down> <mode>immediate</mode> </shut. Down> </interface> </mib-2> </action> </rpc> • Using a generic action RPC
RPC/Operation in List - XML <rpc message-id="101“ xmlns=“…"> <shut. Down calling. Point =“/mib-2/interface[‘if. Id=3’]”> <mode>immediate</name> </shut. Down> </rpc> • Adding the special attribute “calling. Point” to today’s YANG • All RPC names must be unique in a module (to allow DSDL mapping)
Notifications inside Lists • Would make YANG easier to use because: – Notifications always have a specific source, providing that is natural – It is nice to have the notification definition at the same place where the source entity is defined
Thank You
RPC in List – XML Unpreferred alternative <netconf: rpc xmlns=… message-id="239"> <shut. Down> <calling. Point> /mib-2/interface[“if. Id=3"] </calling. Point> <input> <mode>immediately</mode> </input> </shut. Down> </netconf: rpc> • Adding an extra element ad a wrapper for the input parameters
RPC in List - XML – Unpreferred alternative <netconf: rpc xmlns=… message-id="239"> <action. Name>shut. Down</action. Name> <calling. Point> /mib-2/interface[“if. Id=3"] </calling. Point> <input> <mode>immediate</mode> </input> </action> </netconf: rpc> • Using a generic action RPC
- Slides: 12