add a yang module for lisp address TELSDN-471: #close 44/2244/3
authorDavid Goldberg <david.goldberg@contextream.com>
Wed, 23 Oct 2013 08:40:23 +0000 (10:40 +0200)
committerDavid Goldberg <david.goldberg@contextream.com>
Thu, 24 Oct 2013 06:21:05 +0000 (08:21 +0200)
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
Change-Id: Iacd082a9e00b4d8a378d0a7c0b1c6a9c0cd7ef5f
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
commons/parent/pom.xml
mappingservice/lispyangmodule/pom.xml [new file with mode: 0755]
mappingservice/lispyangmodule/src/main/yang/mappingservice.yang [new file with mode: 0755]
mappingservice/pom.xml

index 1ec50f6ad6f818b5a2d251602f797e811fa2fb7e..e5a46a07ee4820065cd2e6a8830931bbbc7e3ac7 100644 (file)
                <projectinfo>2.6</projectinfo>
                <enunciate.version>1.26.2</enunciate.version>
                <build.suffix>0.1.0-SNAPSHOT</build.suffix>
+               <yangtools.binding.version>0.6.0-SNAPSHOT</yangtools.binding.version>
+               <yang.binding.version>0.6.0-SNAPSHOT</yang.binding.version>
+               <yang.version>0.5.9-SNAPSHOT</yang.version>
+               <yang.codegen.version>0.6.0-SNAPSHOT</yang.codegen.version>
        </properties>
 
        <repositories>
                        </snapshots>
                </repository>
        </repositories>
-
+       <pluginRepositories>
+               <pluginRepository>
+                       <id>opendaylight-release</id>
+                       <name>opendaylight-release</name>
+                       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.release/</url>
+               </pluginRepository>
+               <pluginRepository>
+                       <id>opendaylight-snapshot</id>
+                       <name>opendaylight-snapshot</name>
+                       <url>http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+               </pluginRepository>
+       </pluginRepositories>
        <distributionManagement>
                <!-- OpenDayLight Released artifact -->
                <repository>
                                <artifactId>clustering.services</artifactId>
                                <version>0.4.0-SNAPSHOT</version>
                        </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-binding</artifactId>
+                               <version>${yang.binding.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-common</artifactId>
+                               <version>${yang.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-data-api</artifactId>
+                               <version>${yang.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-model-api</artifactId>
+                               <version>${yang.version}</version>
+                       </dependency>
+                       <dependency>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-data-util</artifactId>
+                               <version>${yang.version}</version>
+                       </dependency>
+                       <dependency>
+                       <groupId>org.opendaylight.yangtools.model</groupId>
+                       <artifactId>ietf-inet-types</artifactId>
+                       <version>2010.09.24-SNAPSHOT</version>
+               </dependency>
+               
+
                        <dependency>
                                <groupId>org.opendaylight.controller</groupId>
                                <artifactId>sal</artifactId>
                                        <artifactId>maven-surefire-plugin</artifactId>
                                        <version>2.14.1</version>
                                </plugin>
+                               <plugin>
+                                       <groupId>org.opendaylight.yangtools</groupId>
+                                       <artifactId>yang-maven-plugin</artifactId>
+                                       <version>${yang.version}</version>
+                                       <executions>
+                                               <execution>
+                                                       <goals>
+                                                               <goal>generate-sources</goal>
+                                                       </goals>
+                                                       <configuration>
+                                                               <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+                                                               <codeGenerators>
+                                                                       <generator>
+                                                                               <codeGeneratorClass>
+                                                                                       org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+                                                                               </codeGeneratorClass>
+                                                                               <outputBaseDir>
+                                                                                       target/generated-sources/sal
+                                                                               </outputBaseDir>
+                                                                       </generator>
+                                                               </codeGenerators>
+                                                               <inspectDependencies>true</inspectDependencies>
+                                                       </configuration>
+                                               </execution>
+                                       </executions>
+                                       <dependencies>
+                                               <dependency>
+                                                       <groupId>org.opendaylight.yangtools</groupId>
+                                                       <artifactId>maven-sal-api-gen-plugin</artifactId>
+                                                       <version>${yang.codegen.version}</version>
+                                                       <type>jar</type>
+                                               </dependency>
+                                       </dependencies>
+                               </plugin>
+                               <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>
                                <plugin>
                                        <groupId>org.eclipse.m2e</groupId>
                                        <artifactId>lifecycle-mapping</artifactId>
diff --git a/mappingservice/lispyangmodule/pom.xml b/mappingservice/lispyangmodule/pom.xml
new file mode 100755 (executable)
index 0000000..dff8974
--- /dev/null
@@ -0,0 +1,39 @@
+<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>
+               <artifactId>lispflowmapping-commons</artifactId>
+               <groupId>org.opendaylight.lispflowmapping</groupId>
+               <version>0.1.0-SNAPSHOT</version>
+               <relativePath>../../commons/parent</relativePath>
+       </parent>
+       <artifactId>lispyangmodule</artifactId>
+       <packaging>pom</packaging>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.opendaylight.yangtools</groupId>
+                               <artifactId>yang-maven-plugin</artifactId>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.codehaus.mojo</groupId>
+                               <artifactId>build-helper-maven-plugin</artifactId>
+                       </plugin>
+               </plugins>
+       </build>
+       <dependencies>
+               <dependency>
+                       <groupId>org.opendaylight.yangtools</groupId>
+                       <artifactId>yang-binding</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.opendaylight.yangtools</groupId>
+                       <artifactId>yang-common</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.opendaylight.yangtools.model</groupId>
+                       <artifactId>ietf-inet-types</artifactId>
+               </dependency>
+       </dependencies>
+</project>
diff --git a/mappingservice/lispyangmodule/src/main/yang/mappingservice.yang b/mappingservice/lispyangmodule/src/main/yang/mappingservice.yang
new file mode 100755 (executable)
index 0000000..809ca4c
--- /dev/null
@@ -0,0 +1,218 @@
+  module mappingservice {
+
+    
+
+    namespace
+      "mappingservice";
+
+    prefix mappingservice;
+    
+    import ietf-inet-types {
+               prefix inet;
+               revision-date 2010-09-24;
+       }
+
+    organization "LISP Flow Mapping";
+
+    contact
+      "David Goldberg <david.goldberg@contextream.com>";
+
+    description
+      "YANG version of the mapping service.";
+
+    revision "2013-10-27" {
+      description
+        "mapping service";
+    }
+    
+    typedef LispBaseAddress {
+    type empty;
+       description "an address in the mapping service";
+    }
+    
+    grouping EidRecord {
+    leaf prefix {
+    type LispBaseAddress; 
+    }
+    leaf mask {
+    type int8;
+    }
+    }
+    
+    grouping LocatorRecord {
+    leaf priority {
+    type int8;
+    }
+    leaf weight {
+    type int8;
+    }
+    leaf multicastPriority {
+    type int8;
+    }
+    leaf multicastWeight {
+    type int8;
+    }
+    leaf localLocator {
+    type boolean;
+    }
+    leaf rlocProbed {
+    type boolean;
+    }
+    leaf routed {
+    type boolean;
+    }
+    leaf locator {
+    type LispBaseAddress; 
+    }
+    }
+    
+    grouping EidToLocatorRecord {
+    leaf recordTtl {
+    type int32;
+    }
+    leaf maskLength {
+    type int8;
+    }
+    leaf action {
+    type enumeration {
+    enum NoAction;
+    enum NativelyForward;
+    enum SendMapRequest;
+    enum Drop;
+    }
+    }
+    leaf authoritative {
+    type boolean;
+    }
+    leaf prefix {
+    type LispBaseAddress; 
+    }
+    list locatores {
+    uses LocatorRecord;
+    }
+    }
+    
+    grouping MapRegister {
+    leaf recordCount {
+    type int8;
+    }
+    leaf proxyMapReply {
+    type boolean;
+    }leaf wantMapNotify {
+    type boolean;
+    }leaf nounce {
+    type int64;
+    }
+    leaf keyId {
+    type int16;
+    }
+    leaf authenticationData {
+    type binary;
+    }
+    list eidToLocatorRecords {
+    uses EidToLocatorRecord;
+    }
+    }
+    
+    grouping MapNotify {
+    leaf recordCount {
+    type int8;
+    }
+    leaf proxyMapReply {
+    type boolean;
+    }leaf wantMapNotify {
+    type boolean;
+    }leaf nounce {
+    type int64;
+    }
+    leaf keyId {
+    type int16;
+    }
+    leaf authenticationData {
+    type binary;
+    }
+    list eidToLocatorRecords {
+    uses EidToLocatorRecord;
+    }
+    }
+    
+    grouping MapRequest {
+    leaf recordCount {
+    type int8;
+    }leaf irc {
+    type int8;
+    }
+    leaf authoritative {
+    type boolean;
+    }
+    leaf mapDataPresent {
+    type boolean;
+    }
+    leaf probe {
+    type boolean;
+    }
+    leaf smr {
+    type boolean;
+    }
+    leaf pitr {
+    type boolean;
+    }leaf smrInvoked {
+    type boolean;
+    }leaf nounce {
+    type int64;
+    }
+    leaf sourceEid {
+    type LispBaseAddress; 
+    }
+    list itrRlocs {
+    leaf itrRloc {
+    type LispBaseAddress; 
+    }
+    }
+    list eidRecords {
+    uses EidRecord;
+    }
+    
+    }
+    
+    grouping MapReply {
+    leaf recordCount {
+    type int8;
+    }
+    leaf probe {
+    type boolean;
+    }
+    leaf echoNonceEnabled {
+    type boolean;
+    }
+    leaf securityEnabled {
+    type boolean;
+    }
+    list eidToLocatorRecords {
+    uses EidToLocatorRecord;
+    }
+    
+    }
+    
+    container MapRegisterNotification {
+    container MapRegister {
+    uses MapRegister;
+    }
+    leaf address {
+    type inet:ip-address;
+    }
+    }
+    
+    container MapRequestNotification {
+    container MapRequest {
+    uses MapRequest;
+    }
+    leaf address {
+    type inet:ip-address;
+    }
+    }
+
+
+        }
+        
+        
index 8481144528e4c2b45535dc0f0078b1dd7f2a6f5a..afa8f0ab9f6b2aa3deabb84b3de57fce89d8764d 100644 (file)
@@ -18,6 +18,7 @@
                 <module>southbound</module>
                 <module>northbound</module>
                 <module>integrationtest</module>
+                <module>lispyangmodule</module>
         </modules>
        <dependencies>
                <dependency>