From afe81909af6d85790da81614cf6efef6f4b18563 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 25 Jan 2017 13:07:42 +0100 Subject: [PATCH] BUG-3128: make context reference mandatory It does not make quite sense to have an optional context reference: the RPC is either routed (action, with a reference) or not. If the leaf is not mandatory, there is is a mismatch between providers and consumers with regard to what is it that invoking an action as an RPC really means. Change-Id: I4f86acdc205192e3771fe9c480a71f38e1fe3e6f Signed-off-by: Robert Varga --- model/yang-ext/src/main/yang/yang-ext.yang | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/model/yang-ext/src/main/yang/yang-ext.yang b/model/yang-ext/src/main/yang/yang-ext.yang index 0fbe94ddc4..2d89e616b5 100644 --- a/model/yang-ext/src/main/yang/yang-ext.yang +++ b/model/yang-ext/src/main/yang/yang-ext.yang @@ -2,10 +2,10 @@ module yang-ext { yang-version 1; namespace "urn:opendaylight:yang:extension:yang-ext"; prefix "ext"; - + contact "Anton Tkacik "; - description + description "Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. This program and the accompanying materials are made available under the @@ -19,10 +19,10 @@ module yang-ext { // Augmentation name extension "augment-identifier" { - description - "YANG language extension which assigns an identifier to + description + "YANG language extension which assigns an identifier to augmentation. Augment identifier is used to identify - specific augment statement by name. + specific augment statement by name. The identifier syntax is defined formally defined by the rule 'identifier' in Section 12 of RFC 6020. @@ -37,7 +37,7 @@ module yang-ext { of YANG modules and it is suitable for code generation, where each augment statement is nicely identified by unique name instead of combination of augment target - and when condition. + and when condition. */ argument "identifier"; } @@ -46,17 +46,18 @@ module yang-ext { // Context-aware RPCs grouping rpc-context-ref { - description + description "A reference to RPC context."; leaf context-instance { type instance-identifier; description "Pointer to the context. "; + mandatory true; } } extension "rpc-context-instance" { description - "YANG language extension which defines enclosing (parent) + "YANG language extension which defines enclosing (parent) schema node as referencable context for RPCs. The argument is identity which is used to identify RPC context @@ -72,8 +73,8 @@ module yang-ext { extension "context-instance" { argument "context-type"; } - + extension "instance-target" { - argument "path"; + argument "path"; } } -- 2.36.6