<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">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>yang-prototype</artifactId>
- <version>0.5-SNAPSHOT</version>
- </parent>
- <version>0.5.3-SNAPSHOT</version>
- <artifactId>yang</artifactId>
- <packaging>pom</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>yang-prototype</artifactId>
+ <version>0.5-SNAPSHOT</version>
+ </parent>
+ <version>0.5.3-SNAPSHOT</version>
+ <artifactId>yang</artifactId>
+ <packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Version of all child artifacts -->
</properties>
- <modules>
- <module>yang-common</module>
- <module>yang-data-api</module>
- <module>yang-data-util</module>
+ <modules>
+ <module>yang-common</module>
+ <module>yang-data-api</module>
+ <module>yang-data-util</module>
<module>yang-data-impl</module>
- <module>yang-model-api</module>
- <module>yang-model-util</module>
- <module>yang-binding</module>
- <module>../code-generator/yang-model-parser-api</module>
- <module>../code-generator/yang-model-parser-impl</module>
- <module>../code-generator/maven-yang</module>
- <module>../code-generator/maven-yang-plugin</module>
- <module>../code-generator/maven-yang-plugin-it</module>
- </modules>
+ <module>yang-model-api</module>
+ <module>yang-model-util</module>
+ <module>yang-binding</module>
+ <module>yang-ext</module>
+ <module>../code-generator/yang-model-parser-api</module>
+ <module>../code-generator/yang-model-parser-impl</module>
+ <module>../code-generator/maven-yang</module>
+ <module>../code-generator/maven-yang-plugin</module>
+ <module>../code-generator/maven-yang-plugin-it</module>
+ </modules>
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0</version>
- <inherited>true</inherited>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.8.1</version>
- <configuration>
- <stylesheet>maven</stylesheet>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>aggregate</goal>
- </goals>
- <phase>site</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>2.4.0</version>
- <configuration>
- <effort>Max</effort>
- <threshold>Low</threshold>
- <goal>site</goal>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jdepend-maven-plugin</artifactId>
- <version>2.0-beta-2</version>
- </plugin>
- </plugins>
- </reporting>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0</version>
+ <inherited>true</inherited>
+ <configuration>
+ <source>1.7</source>
+ <target>1.7</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8.1</version>
+ <configuration>
+ <stylesheet>maven</stylesheet>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <phase>site</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.4.0</version>
+ <configuration>
+ <effort>Max</effort>
+ <threshold>Low</threshold>
+ <goal>site</goal>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
--- /dev/null
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>yang</artifactId>
+ <version>0.5.3-SNAPSHOT</version>
+ </parent>
+ <artifactId>yang-ext</artifactId>
+ <version>2013.09.07-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>yang-maven-plugin</artifactId>
+ <version>0.5.3-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate-sources</goal>
+ </goals>
+ <configuration>
+ <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+ <codeGenerators>
+ </codeGenerators>
+ <inspectDependencies>false</inspectDependencies>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>maven-sal-api-gen-plugin</artifactId>
+ <version>0.5.3-SNAPSHOT</version>
+ <type>jar</type>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>target/generated-sources/sal</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--This plugin's configuration is used to store Eclipse
+ m2e settings only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.opendaylight.controller
+ </groupId>
+ <artifactId>
+ yang-maven-plugin
+ </artifactId>
+ <versionRange>
+ [0.5,)
+ </versionRange>
+ <goals>
+ <goal>
+ generate-sources
+ </goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore></ignore>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
\ No newline at end of file
--- /dev/null
+module yang-ext {
+ yang-version 1;
+ namespace "urn:opendaylight:params:ns:yang:extension:yang-ext";
+ prefix "ext";
+
+ contact "Anton Tkacik <ttkacik@cisco.com>";
+
+ 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";
+ }
+}
\ No newline at end of file