From: Vratko Polak Date: Thu, 5 Oct 2017 11:29:37 +0000 (+0200) Subject: Add yang-ext to model-binding2 X-Git-Tag: release/oxygen~73 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=7510c83ffa202c0ef0c85aef206c5069bc937688;p=mdsal.git 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 --- diff --git a/common/artifacts/pom.xml b/common/artifacts/pom.xml index 6cccb68734..55d2f9468b 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.12.0-SNAPSHOT diff --git a/model-binding2/pom.xml b/model-binding2/pom.xml index 0aba518656..2d2e2d67d3 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.12.0-SNAPSHOT + ../../binding2/mdsal-model-binding2-parent + + + 4.0.0 + org.opendaylight.mdsal.model.binding2 + yang-ext + 2013.09.07.12.0-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"; + } +}