From e9c9a0bbd4bfa440117b97213be5fcbe17ecbe03 Mon Sep 17 00:00:00 2001 From: Vratko Polak Date: Thu, 5 Oct 2017 13:23:37 +0200 Subject: [PATCH] Add yang-ext to model-binding2 - add yang-ext to resolve denpendency of odl-mdsal-binding2-base Change-Id: Ie02a799b795a2b38009721339f2ff831694f5b51 Signed-off-by: Jie Han Signed-off-by: Vratko Polak --- common/artifacts/pom.xml | 2 +- model-binding2/pom.xml | 3 + model-binding2/yang-ext/pom.xml | 45 +++++++++++ .../yang-ext/src/main/yang/yang-ext.yang | 78 +++++++++++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 model-binding2/yang-ext/pom.xml create mode 100644 model-binding2/yang-ext/src/main/yang/yang-ext.yang diff --git a/common/artifacts/pom.xml b/common/artifacts/pom.xml index fcab394936..26fe34f6bf 100644 --- a/common/artifacts/pom.xml +++ b/common/artifacts/pom.xml @@ -214,7 +214,7 @@ org.opendaylight.mdsal.model.binding2 yang-ext - 2013.09.07.10.2-SNAPSHOT + 2013.09.07.11.1-SNAPSHOT diff --git a/model-binding2/pom.xml b/model-binding2/pom.xml index e20edf8139..11f2f14c7a 100644 --- a/model-binding2/pom.xml +++ b/model-binding2/pom.xml @@ -24,6 +24,9 @@ ${project.artifactId} ${project.artifactId} + + yang-ext + + + + + + + + org.opendaylight.mdsal + mdsal-model-binding2-parent + 0.11.1-SNAPSHOT + ../../binding2/mdsal-model-binding2-parent + + + 4.0.0 + org.opendaylight.mdsal.model.binding2 + yang-ext + 2013.09.07.11.1-SNAPSHOT + ${project.artifactId} + ${project.artifactId} + bundle + + + ${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/ + + + + opendaylight-site + ${nexus.site.url}/${project.artifactId}/ + + + + diff --git a/model-binding2/yang-ext/src/main/yang/yang-ext.yang b/model-binding2/yang-ext/src/main/yang/yang-ext.yang new file mode 100644 index 0000000000..f8452737f5 --- /dev/null +++ b/model-binding2/yang-ext/src/main/yang/yang-ext.yang @@ -0,0 +1,78 @@ +module yang-ext { + yang-version 1; + namespace "urn:opendaylight:yang:extension:yang-ext"; + prefix "ext"; + + contact "Anton Tkacik "; + + description + "Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v1.0 which accompanies this distribution, + and is available at http://www.eclipse.org/legal/epl-v10.html"; + + revision "2013-07-09" { + description ""; + } + + // Augmentation name + + extension "augment-identifier" { + description + "YANG language extension which assigns an identifier to + augmentation. Augment identifier is used to identify + specific augment statement by name. + + The identifier syntax is defined formally defined by the rule + 'identifier' in Section 12 of RFC 6020. + + All augment identifiers defined in a namespace MUST be unique. + The namespace of augment identifiers is shared by module and + its submodules."; + + /* + Discussion: + This extension allows for ease of development / debug + 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. + */ + argument "identifier"; + } + + // Context-aware RPCs + + grouping rpc-context-ref { + description + "A reference to RPC context."; + leaf context-instance { + type instance-identifier; + description "Pointer to the context. "; + } + } + + extension "rpc-context-instance" { + description + "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 + type."; + + argument "context-type"; + } + + extension "context-reference" { + argument "context-type"; + } + + extension "context-instance" { + argument "context-type"; + } + + extension "instance-target" { + argument "path"; + } +} -- 2.36.6