fixed yang model TELSDN-506: #close 36/2336/2
authorDavid Goldberg <david.goldberg@contextream.com>
Fri, 25 Oct 2013 03:35:11 +0000 (05:35 +0200)
committerDavid Goldberg <david.goldberg@contextream.com>
Fri, 25 Oct 2013 04:39:17 +0000 (06:39 +0200)
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
Change-Id: I61ef309c7e2bdc4b32eec1f0dcedf9eb2850e7b2
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
mappingservice/pom.xml
mappingservice/yangmodel/pom.xml [moved from mappingservice/lispyangmodule/pom.xml with 96% similarity]
mappingservice/yangmodel/src/main/yang/mappingservice.yang [moved from mappingservice/lispyangmodule/src/main/yang/mappingservice.yang with 57% similarity]

index afa8f0ab9f6b2aa3deabb84b3de57fce89d8764d..4ece4ba6989408babd6788750cb641a2a6532963 100644 (file)
@@ -18,7 +18,7 @@
                 <module>southbound</module>
                 <module>northbound</module>
                 <module>integrationtest</module>
-                <module>lispyangmodule</module>
+                <module>yangmodel</module>
         </modules>
        <dependencies>
                <dependency>
similarity index 96%
rename from mappingservice/lispyangmodule/pom.xml
rename to mappingservice/yangmodel/pom.xml
index dff8974c42e2d050bf1206617789c60a1766f1f6..7575314af4f9233db507a2d0fa9b905ca0205258 100755 (executable)
@@ -7,7 +7,7 @@
                <version>0.1.0-SNAPSHOT</version>
                <relativePath>../../commons/parent</relativePath>
        </parent>
-       <artifactId>lispyangmodule</artifactId>
+       <artifactId>yangmodel</artifactId>
        <packaging>pom</packaging>
 
        <build>
similarity index 57%
rename from mappingservice/lispyangmodule/src/main/yang/mappingservice.yang
rename to mappingservice/yangmodel/src/main/yang/mappingservice.yang
index 7c97f46514d43939ba865ac71ca3bf716f25c2be..91762636ab73230f3b40dfb408078c0631cbd0d6 100755 (executable)
         "mapping service";
     }
     
+    grouping LispAFIAddress {
+    leaf afi {
+               type int16;
+       }
+    }
+    
+    grouping LispPrimitiveAddress {
+       uses LispAFIAddress;
+       choice primitiveAddress {
+       case Ipv4 {
+       leaf Ipv4Address {
+               type inet:ipv4-address;
+               reference "https://tools.ietf.org/html/rfc3209#section-4.6.2.1";
+       }
+       }
+       case Ipv6 {
+               leaf Ipv6Address {
+               type inet:ipv6-address;
+       }
+       }
+       case MAC {
+       leaf MacAddress {
+               type int64;
+               // TBD change to standard MAC type 
+       }
+       }
+       case distName {
+               leaf distinguishedName {
+               type string;
+       }
+       }
+    }//choice
+    }//grouping
+    
+    grouping LispLcafAddress {
+    uses LispAFIAddress;
+       leaf LcafType {
+               type enumeration{
+                       enum Segment;
+                       enum SourceDest;
+                       enum TE;
+               }
+       }
+       leaf res2 {
+               type int8;
+       }
+    }
+    
+    grouping LcafSegment {
+       uses LispLcafAddress;
+       leaf instanceId {
+               type uint32{
+               range "0 .. 16777215";
+               }
+       }
+       container Address {
+               uses LispPrimitiveAddress;
+       }
+    }
+    
+    // Primitive Address or SegmentLCAF
+    grouping LispSimpleAddress { 
+       choice SegmentAddress {
+               case Primitive {
+                       uses LispPrimitiveAddress;
+               }
+               case Segment {
+                       uses LcafSegment;
+               }
+       }
+    }
+    
+    
+
+               grouping SourceDestLcaf {
+                uses LispLcafAddress;
+                       container srcAddress {
+                               uses LispSimpleAddress;
+                       }
+                       container dstAddress {
+                               uses LispSimpleAddress;
+                       }
+                      leaf srcMaskLength {
+                               type int8;
+                       }
+                       leaf dstMaskLength {
+                               type int8;
+                       }
+                       leaf reserved {
+                               type int16;
+                       }
+                       }
+
+       
+       grouping LispAddress {
+               choice Address {
+                       case simpleAddress {
+                               uses LispSimpleAddress;
+                       }
+                       case complexAddress {
+                               uses LispLcafAddress;
+                       }
+               } 
+       }
+    
+    
     typedef LispBaseAddress {
     type empty;
        description "an address in the mapping service";
     }
     
     grouping EidRecord {
-    leaf prefix {
-    type LispBaseAddress; 
+    container Prefix {
+    uses LispAddress; 
     }
     leaf mask {
     type int8;
     leaf routed {
     type boolean;
     }
-    leaf locator {
-    type LispBaseAddress; 
+    container Locator {
+    uses LispAddress; 
     }
     }
     
     leaf authoritative {
     type boolean;
     }
-    leaf prefix {
-    type LispBaseAddress; 
+    container Prefix {
+    uses LispAddress; 
     }
     list locatores {
     uses LocatorRecord;
     }leaf nounce {
     type int64;
     }
-    leaf sourceEid {
-    type LispBaseAddress; 
+    container SourceEid {
+    uses LispAddress; 
     }
     list itrRlocs {
-    leaf itrRloc {
-    type LispBaseAddress; 
+    container itrRloc {
+    uses LispAddress; 
     }
     }
     list eidRecords {