Add yang-ext to model-binding2 59/63859/5
authorVratko Polak <vrpolak@cisco.com>
Thu, 5 Oct 2017 11:29:37 +0000 (13:29 +0200)
committerVratko Polak <vrpolak@cisco.com>
Thu, 5 Oct 2017 11:29:37 +0000 (13:29 +0200)
- add yang-ext to resolve denpendency of odl-mdsal-binding2-base

Change-Id: Ie02a799b795a2b38009721339f2ff831694f5b51
Signed-off-by: Jie Han <han.jie@zte.com.cn>
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
common/artifacts/pom.xml
model-binding2/pom.xml
model-binding2/yang-ext/pom.xml [new file with mode: 0644]
model-binding2/yang-ext/src/main/yang/yang-ext.yang [new file with mode: 0644]

index 6cccb687349bf2dba25e20c03bdfbc6452042c6c..55d2f9468b393f5e6eac7523e064aa476f534403 100644 (file)
             <dependency>
                 <groupId>org.opendaylight.mdsal.model.binding2</groupId>
                 <artifactId>yang-ext</artifactId>
-                <version>2013.09.07.10.2-SNAPSHOT</version>
+                <version>2013.09.07.12.0-SNAPSHOT</version>
             </dependency>
 
             <dependency>
index 0aba5186566654a9c73db9d6683587b4c336fbb9..2d2e2d67d36bf9390fb49b69b7002c165d6df87f 100644 (file)
@@ -24,6 +24,9 @@
     <name>${project.artifactId}</name>
     <description>${project.artifactId}</description>
 
+    <modules>
+        <module>yang-ext</module>
+    </modules>
   <!--
       Maven Site Configuration
 
diff --git a/model-binding2/yang-ext/pom.xml b/model-binding2/yang-ext/pom.xml
new file mode 100644 (file)
index 0000000..c289997
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2017 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
+  -->
+
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <parent>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>mdsal-model-binding2-parent</artifactId>
+        <version>0.12.0-SNAPSHOT</version>
+        <relativePath>../../binding2/mdsal-model-binding2-parent</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.opendaylight.mdsal.model.binding2</groupId>
+    <artifactId>yang-ext</artifactId>
+    <version>2013.09.07.12.0-SNAPSHOT</version>
+    <name>${project.artifactId}</name>
+    <description>${project.artifactId}</description>
+    <packaging>bundle</packaging>
+
+  <!--
+      Maven Site Configuration
+
+      The following configuration is necessary for maven-site-plugin to
+      correctly identify the correct deployment path for OpenDaylight Maven
+      sites.
+  -->
+  <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
+
+  <distributionManagement>
+    <site>
+      <id>opendaylight-site</id>
+      <url>${nexus.site.url}/${project.artifactId}/</url>
+    </site>
+  </distributionManagement>
+
+</project>
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 (file)
index 0000000..f845273
--- /dev/null
@@ -0,0 +1,78 @@
+module yang-ext {
+    yang-version 1;
+    namespace "urn:opendaylight:yang:extension:yang-ext";
+    prefix "ext";
+
+    contact "Anton Tkacik <ttkacik@cisco.com>";
+
+    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";
+    }
+}