Merge branch 'master' into topic/ietf_yang 88/28288/1
authorLorand Jakab <lojakab@cisco.com>
Mon, 12 Oct 2015 14:10:24 +0000 (17:10 +0300)
committerLorand Jakab <lojakab@cisco.com>
Mon, 12 Oct 2015 14:15:53 +0000 (17:15 +0300)
Change-Id: I489ceff034e498cff459393c7284370710dc12c6
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
14 files changed:
.gitreview
artifacts/pom.xml
distribution-karaf/pom.xml
features/pom.xml
features/src/main/features/features.xml
mappingservice/api/src/main/yang/mappingservice.yang
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModule.java [new file with mode: 0644]
mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModuleFactory.java [new file with mode: 0644]
mappingservice/lisp-proto/pom.xml
mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java [new file with mode: 0644]
mappingservice/lisp-proto/src/main/yang/lisp-address-types.yang [new file with mode: 0644]
mappingservice/lisp-proto/src/main/yang/lisp-proto.yang
mappingservice/pom.xml
pom.xml

index d0232291e0bab89ed45101bff347c8340cd09657..f87eb95d7a4b77c6371741f8c63670c9fa184c8d 100644 (file)
@@ -2,4 +2,4 @@
 host=git.opendaylight.org
 port=29418
 project=lispflowmapping.git
-defaultbranch=master
+defaultbranch=topic/ietf_yang
index 6df17f7b57507fa5e3b51cb660603dfe965b0280..e58207adbd6d2f180eb539bfc45f7b563d877406 100644 (file)
@@ -22,6 +22,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <artifactId>mappingservice.api</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <!--
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>mappingservice.implementation</artifactId>
@@ -47,16 +48,19 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <artifactId>mappingservice.southbound</artifactId>
         <version>${project.version}</version>
       </dependency>
+      -->
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>mappingservice.lisp-proto</artifactId>
         <version>${project.version}</version>
       </dependency>
+      <!--
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>lispflowmapping-ui-bundle</artifactId>
         <version>${project.version}</version>
       </dependency>
+      -->
       <dependency>
         <groupId>${project.groupId}</groupId>
         <artifactId>features-lispflowmapping</artifactId>
index e847669183f26f9c883c95549a0d6ff6b7adf16d..ad9e21be26b4dff3e720fa9934e00aefe5e7fc38 100644 (file)
@@ -26,7 +26,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   </prerequisites>
 
   <properties>
-    <karaf.localFeature>odl-lispflowmapping-msmr</karaf.localFeature>
+    <!-- <karaf.localFeature>odl-lispflowmapping-msmr</karaf.localFeature> -->
+    <karaf.localFeature>odl-lispflowmapping-models</karaf.localFeature>
   </properties>
 
   <dependencyManagement>
index 00b91d5b5b5b7fba3748bb89dbb3308abe82e123..dfaa8230dd6ad32de2c4d9e5a35c2a1ce0b78169 100644 (file)
@@ -35,6 +35,8 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <mdsal.model.version>0.8.0-SNAPSHOT</mdsal.model.version>
     <neutron.version>0.6.0-SNAPSHOT</neutron.version>
     <restconf.version>1.3.0-SNAPSHOT</restconf.version>
+    <!-- Temporary -->
+    <skipTests>true</skipTests>
   </properties>
 
   <dependencyManagement>
@@ -89,6 +91,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
+    <!--
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mappingservice.implementation</artifactId>
@@ -113,11 +116,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <classifier>config</classifier>
       <type>xml</type>
     </dependency>
+    -->
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mappingservice.api</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <!--
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mappingservice.inmemorydb</artifactId>
@@ -140,11 +145,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>mappingservice.shell</artifactId>
       <version>${project.version}</version>
     </dependency>
+    -->
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>mappingservice.lisp-proto</artifactId>
       <version>${project.version}</version>
     </dependency>
+    <!--
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>lispflowmapping-ui-bundle</artifactId>
@@ -157,5 +164,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <classifier>features</classifier>
       <type>xml</type>
     </dependency>
+    -->
   </dependencies>
 </project>
index b0dd72832fc6a59df93fae6e6330bcee1166540b..40c1169877e4e7e173f7b2c704572b445f1fafaf 100644 (file)
@@ -21,6 +21,7 @@
     <repository>mvn:org.opendaylight.neutron/features-neutron/${neutron.version}/xml/features</repository>
     <repository>mvn:org.opendaylight.dlux/features-dlux/${dlux.core.version}/xml/features</repository>
 
+    <!--
     <feature name="odl-lispflowmapping-msmr" description="OpenDaylight :: LISP Flow Mapping :: Map-Server/Map-Resolver" version='${project.version}'>
         <feature version="${project.version}">odl-lispflowmapping-mappingservice</feature>
         <feature version="${project.version}">odl-lispflowmapping-southbound</feature>
         <feature version="${project.version}">odl-lispflowmapping-mappingservice</feature>
         <bundle>mvn:org.opendaylight.lispflowmapping/lispflowmapping-ui-bundle/${project.version}</bundle>
     </feature>
+    -->
 
     <feature name="odl-lispflowmapping-models" description="OpenDaylight :: LISP Flow Mapping :: Models" version='${project.version}'>
         <feature version='${config.version}'>odl-config-api</feature>
         <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
+        <!-- Temporary: add APIDOCS so we don't have to load manually while testing IETF LISP address models -->
+        <feature version='${mdsal.version}'>odl-mdsal-apidocs</feature>
         <bundle>mvn:org.apache.commons/commons-lang3/${commons.lang3.version}</bundle>
         <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.lisp-proto/${project.version}</bundle>
         <bundle>mvn:org.opendaylight.lispflowmapping/mappingservice.api/${project.version}</bundle>
index fe2f823a5a9217e3f0029dff400d948a641bbf5d..37674ee702b5fa85e0388ae096842ba0cf384beb 100644 (file)
@@ -6,7 +6,8 @@ module mappingservice {
 
     import config { prefix config; revision-date 2013-04-05; }
     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
-    import yang-ext { prefix ext; revision-date "2013-07-09"; }
+    import yang-ext { prefix ext; revision-date 2013-07-09; }
+    import lisp-address-types { prefix lisp-address; revision-date 2015-03-09; }
     import lisp-proto { prefix lisp-proto; revision-date 2015-08-20; }
 
     contact "Lorand Jakab <lojakab@cisco.com";
@@ -74,13 +75,6 @@ module mappingservice {
         description "A classifier for endpoint-id elements which allows direct access to a particular element in the data tree.";
     }
 
-    grouping lisp-prefix {
-        uses lisp-proto:LispAddress;
-        leaf mask-length {
-            type uint8;
-        }
-    }
-
     grouping mapping-authkey {
         leaf key-type {
             type uint16;
@@ -120,7 +114,7 @@ module mappingservice {
             leaf eid {
                 type eid-uri;
             }
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
             uses mapping-authkey;
         }
     }
@@ -137,14 +131,14 @@ module mappingservice {
 
     rpc add-key {
         input {
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
             uses mapping-authkey;
         }
     }
 
     rpc get-key {
         input {
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
         }
         output {
             uses mapping-authkey;
@@ -154,7 +148,7 @@ module mappingservice {
     rpc update-key {
         input {
             container eid {
-                uses lisp-prefix;
+                uses lisp-address:lisp-address;
             }
             container key {
                 uses mapping-authkey;
@@ -164,7 +158,7 @@ module mappingservice {
 
     rpc remove-key {
         input {
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
         }
     }
 
@@ -176,7 +170,7 @@ module mappingservice {
 
     rpc get-mapping {
         input {
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
         }
         output {
             uses lisp-proto:EidToLocatorRecords;
@@ -191,7 +185,7 @@ module mappingservice {
 
     rpc remove-mapping {
         input {
-            uses lisp-prefix;
+            uses lisp-address:lisp-address;
         }
     }
 
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModule.java b/mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModule.java
new file mode 100644 (file)
index 0000000..33cc8ec
--- /dev/null
@@ -0,0 +1,29 @@
+package org.opendaylight.controller.config.yang.config.lfm.mappingservice.shell.impl;
+
+import org.opendaylight.lispflowmapping.implementation.MappingServiceShell;
+
+public class MappingServiceShellModule extends org.opendaylight.controller.config.yang.config.lfm.mappingservice.shell.impl.AbstractMappingServiceShellModule {
+    private MappingServiceShell mappingServiceShell;
+
+    public MappingServiceShellModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
+        super(identifier, dependencyResolver);
+    }
+
+    public MappingServiceShellModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.controller.config.yang.config.lfm.mappingservice.shell.impl.MappingServiceShellModule oldModule, java.lang.AutoCloseable oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
+    }
+
+    @Override
+    public void customValidation() {
+        // add custom validation form module attributes here.
+    }
+
+    @Override
+    public java.lang.AutoCloseable createInstance() {
+        mappingServiceShell = new MappingServiceShell();
+        mappingServiceShell.setBindingAwareBroker(getBrokerDependency());
+        mappingServiceShell.setMappingService(getMappingserviceDependency());
+        return mappingServiceShell;
+    }
+
+}
diff --git a/mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModuleFactory.java b/mappingservice/implementation/src/main/java/org/opendaylight/controller/config/yang/config/lfm/mappingservice/shell/impl/MappingServiceShellModuleFactory.java
new file mode 100644 (file)
index 0000000..eb8de02
--- /dev/null
@@ -0,0 +1,13 @@
+/*
+* Generated file
+*
+* Generated from: yang module name: mappingservice-shell-impl yang module local name: mappingservice-shell-impl
+* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+* Generated at: Fri Sep 25 12:24:36 CEST 2015
+*
+* Do not modify this file unless it is present under src/main directory
+*/
+package org.opendaylight.controller.config.yang.config.lfm.mappingservice.shell.impl;
+public class MappingServiceShellModuleFactory extends org.opendaylight.controller.config.yang.config.lfm.mappingservice.shell.impl.AbstractMappingServiceShellModuleFactory {
+
+}
index 38c79568d8dfed5aaab19f5f679543971e175559..bc3d208afaa582b9da6ab2146257ac33962bf019 100644 (file)
@@ -48,6 +48,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     </dependency>
   </dependencies>
 
+  <!-- Temporarily disable compiling non-generated code, like serializers, which won't build for now -->
   <build>
     <pluginManagement>
       <plugins>
@@ -80,5 +81,35 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         </plugin>
       </plugins>
     </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>default-compile</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <excludes>
+                <exclude>org/opendaylight/lispflowmapping/**</exclude>
+              </excludes>
+            </configuration>
+          </execution>
+          <execution>
+            <id>default-testCompile</id>
+            <phase>test-compile</phase>
+            <goals>
+              <goal>testCompile</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
 </project>
diff --git a/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java b/mappingservice/lisp-proto/src/main/java/org/opendaylight/yang/gen/v1/urn/ietf/params/xml/ns/yang/lisp/address/types/rev150309/SimpleAddressBuilder.java
new file mode 100644 (file)
index 0000000..8935e85
--- /dev/null
@@ -0,0 +1,19 @@
+package org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.lisp.address.types.rev150309;
+
+
+/**
+ * The purpose of generated class in src/main/java for Union types is to create new instances of unions from a string representation.
+ * In some cases it is very difficult to automate it since there can be unions such as (uint32 - uint16), or (string - uint32).
+ *
+ * The reason behind putting it under src/main/java is:
+ * This class is generated in form of a stub and needs to be finished by the user. This class is generated only once to prevent
+ * loss of user code.
+ *
+ */
+public class SimpleAddressBuilder {
+
+    public static SimpleAddress getDefaultInstance(java.lang.String defaultValue) {
+        throw new java.lang.UnsupportedOperationException("Not yet implemented");
+    }
+
+}
diff --git a/mappingservice/lisp-proto/src/main/yang/lisp-address-types.yang b/mappingservice/lisp-proto/src/main/yang/lisp-address-types.yang
new file mode 100644 (file)
index 0000000..8412391
--- /dev/null
@@ -0,0 +1,633 @@
+module lisp-address-types {
+  namespace "urn:ietf:params:xml:ns:yang:lisp-address-types";
+  prefix laddr;
+  import ietf-inet-types {
+    prefix inet;
+  }
+  import ietf-yang-types {
+    prefix yang;
+  }
+  organization
+    "IETF LISP (Locator/ID Separation Protocol) Working Group";
+  contact
+    "lisp@ietf.org";
+  description
+    "This YANG module defines the LISP Canonical Address Formats
+     (LCAF) for LISP. The module can be extended by vendors to
+     define vendor-specific parameters.
+
+     Copyright (c) 2014 IETF Trust and the persons identified as
+     authors of the code.  All rights reserved.
+
+     Redistribution and use in source and binary forms, with or
+     without modification, is permitted pursuant to, and subject
+     to the license terms contained in, the Simplified BSD License
+     set forth in Section 4.c of the IETF Trust's Legal Provisions
+     Relating to IETF Documents
+     (http://trustee.ietf.org/license-info).
+
+     This version of this YANG module is part of RFC 6338; see
+     the RFC itself for full legal notices.
+
+    ";
+  revision 2015-03-09 {
+    description
+      "Initial revision.";
+    reference
+      "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10";
+  }
+  identity lisp-address-family {
+    description
+      "Base identity from which identities describing LISP address
+       families are derived.";
+  }
+  identity no-address {
+    base lisp-address-family;
+    description
+      "IANA Reserved.";
+    }
+  identity ipv4 {
+    base lisp-address-family;
+    description
+      "IANA IPv4 address family.";
+  }
+  identity ipv4-prefix {
+    base lisp-address-family;
+    description
+      "IANA IPv4 address family prefix.";
+  }
+  identity ipv6 {
+    base lisp-address-family;
+    description
+      "IANA IPv6 address family.";
+  }
+  identity ipv6-prefix {
+    base lisp-address-family;
+    description
+      "IANA IPv6 address family prefix.";
+  }
+  identity mac {
+    base lisp-address-family;
+    description
+      "IANA MAC address family.";
+  }
+  identity distinguished-name {
+    base lisp-address-family;
+    description
+      "IANA Distinguished Name address family.";
+  }
+  identity as-number {
+      base lisp-address-family;
+      description
+        "IANA AS Number address family.";
+  }
+  identity lcaf {
+    base lisp-address-family;
+    description
+      "IANA LISP Canonical Address Format address family.";
+  }
+  identity null-address {
+    base lcaf;
+    description
+      "Null body LCAF type.";
+  }
+  identity afi-list {
+    base lcaf;
+    description
+      "AFI-List LCAF type.";
+  }
+  identity instance-id {
+    base lcaf;
+    description
+      "Instance-ID LCAF type.";
+  }
+  identity as-number-lcaf {
+    base lcaf;
+    description
+      "AS Number LCAF type.";
+  }
+  identity application-data {
+    base lcaf;
+    description
+      "Application Data LCAF type.";
+  }
+  identity geo-coordinates {
+    base lcaf;
+    description
+      "Geo-coordinates LCAF type.";
+  }
+  identity opaque-key {
+    base lcaf;
+    description
+      "Opaque Key LCAF type.";
+  }
+  identity nat-traversal {
+    base lcaf;
+    description
+      "NAT-Traversal LCAF type.";
+  }
+  identity nonce-locator {
+    base lcaf;
+    description
+      "Nonce-Locator LCAF type.";
+  }
+  identity multicast-info {
+    base lcaf;
+    description
+      "Multicast Info LCAF type.";
+  }
+  identity explicit-locator-path {
+    base lcaf;
+    description
+      "Explicit Locator Path LCAF type.";
+  }
+  identity security-key {
+    base lcaf;
+    description
+      "Security Key LCAF type.";
+  }
+  identity source-dest-key {
+    base lcaf;
+    description
+      "Source/Dest LCAF type.";
+  }
+  identity replication-list {
+    base lcaf;
+    description
+      "Replication-List LCAF type.";
+  }
+  identity json-data-model {
+    base lcaf;
+    description
+      "JSON Data Model LCAF type.";
+  }
+  identity key-value-address {
+    base lcaf;
+    description
+      "Key-Value LCAF type.";
+  }
+  identity encapsulation-format {
+    base lcaf;
+    description
+      "Encapsulation Format LCAF type.";
+  }
+  typedef instance-id-type {
+    type uint32 {
+      range "0..16777214";
+    }
+    description
+      "Defines the range of values for an Instance ID.";
+  }
+  typedef simple-address {
+    type union {
+      type inet:ip-address;
+      type inet:ip-prefix;
+      type yang:mac-address;
+      type distinguished-name;
+      type inet:as-number;
+    }
+    description
+      "Union of address types that can be part of LCAFs.";
+  }
+  typedef distinguished-name {
+    type string;
+    description
+      "Distinguished Name address.";
+    reference
+      "http://www.iana.org/assignments/address-family-numbers/
+       address-family-numbers.xhtml";
+  }
+  typedef lisp-address-family-ref {
+    type identityref {
+      base lisp-address-family;
+    }
+    description
+      "LISP address family reference.";
+  }
+  typedef lcaf-ref {
+    type identityref {
+      base lcaf;
+    }
+    description
+      "LCAF types reference.";
+  }
+  grouping lcaf-address {
+    description
+      "Group of all the LCAF types.";
+    leaf lcaf-type {
+      type lcaf-ref;
+      mandatory true;
+      description
+        "Enumeration of LCAF types.";
+    }
+    choice address {
+      description "The LCAF addresses.";
+      container null-address {
+        when "../../lcaf-type = null" {
+          description
+            "When LCAF type is null.";
+        }
+        description
+          "Null body LCAF type";
+        leaf address {
+          type empty;
+          description
+            "AFI address.";
+        }
+      }
+      container afi-list {
+        when "../../lcaf-type = afi-list" {
+          description
+            "When LCAF type is AFI-List.";
+        }
+        description
+          "AFI-List LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.16.1";
+        leaf-list address-list {
+          type simple-address;
+          description
+            "List of AFI addresses.";
+        }
+      }
+      container instance-id {
+        when "../../lcaf-type = instance-id" {
+          description
+            "When LCAF type is Instance-ID";
+        }
+        description
+          "Instance ID LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.2";
+        leaf instance-id {
+          type instance-id-type;
+          description
+            "Instance ID value.";
+        }
+        leaf mask-length {
+            type uint8;
+            description
+              "Mask length.";
+        }
+        leaf address {
+          type simple-address;
+          description
+            "AFI address.";
+        }
+      }
+      container as-number-lcaf {
+        when "../../lcaf-type = as-number-lcaf" {
+          description
+            "When LCAF type is AS-Number.";
+        }
+        description
+          "AS Number LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.3";
+        leaf as {
+          type inet:as-number;
+          description
+            "AS number.";
+        }
+        leaf address {
+          type simple-address;
+          description
+            "AFI address.";
+        }
+      }
+      container application-data {
+        when "../../lcaf-type = application-data" {
+          description
+            "When LCAF type is Application Data.";
+        }
+        description
+          "Application Data LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.4";
+        leaf address {
+            type simple-address;
+            description
+              "AFI address.";
+        }
+        leaf protocol {
+            type uint8;
+            description
+              "Protocol number.";
+        }
+        leaf ip-tos {
+            type int32;
+            description
+              "Type of service field.";
+        }
+        leaf local-port-low {
+            type inet:port-number;
+            description
+              "Low end of local port range.";
+        }
+        leaf local-port-high {
+            type inet:port-number;
+            description
+              "High end of local port range.";
+        }
+        leaf remote-port-low {
+            type inet:port-number;
+            description
+              "Low end of remote port range.";
+        }
+        leaf remote-port-high {
+            type inet:port-number;
+            description
+              "High end of remote port range.";
+        }
+      }
+      container geo-coordinates {
+        when "../../lcaf-type = geo-coordinates" {
+          description
+            "When LCAF type is Geo-coordinates.";
+        }
+        description
+          "Geo-coordinates LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.5";
+        leaf latitude {
+          type bits {
+            bit N {
+              description
+                "Latitude bit.";
+            }
+          }
+          description
+            "Bit that selects between North and South latitude.";
+        }
+        leaf latitude-degrees {
+          type uint8 {
+            range "0 .. 90";
+          }
+          description
+            "Degrees of latitude.";
+        }
+        leaf latitude-minutes {
+          type uint8 {
+            range "0..59";
+          }
+          description
+            "Minutes of latitude.";
+        }
+        leaf latitude-seconds {
+          type uint8 {
+            range "0..59";
+          }
+          description
+            "Seconds of latitude.";
+        }
+        leaf longitude {
+          type bits {
+            bit E {
+              description
+                "Longitude bit.";
+            }
+          }
+          description
+            "Bit that selects between East and West longitude.";
+        }
+        leaf longitude-degrees {
+          type uint16 {
+            range "0 .. 180";
+          }
+          description
+            "Degrees of longitude.";
+        }
+        leaf longitude-minutes {
+          type uint8 {
+            range "0..59";
+          }
+          description
+            "Minutes of longitude.";
+        }
+        leaf longitude-seconds {
+          type uint8 {
+            range "0..59";
+          }
+          description
+            "Seconds of longitude.";
+        }
+        leaf altitude {
+          type int32;
+          description
+            "Height relative to sea level in meters.";
+        }
+        leaf address {
+          type simple-address;
+          description
+            "AFI address.";
+        }
+      }
+      container nat-traversal {
+        when "../../lcaf-type = nat-traversal" {
+          description
+            "When LCAF type is NAT-Traversal.";
+        }
+        description
+          "NAT-Traversal LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.6";
+        leaf ms-udp-port {
+          type uint16;
+          description
+            "Map-Server UDP port (set to 4342).";
+        }
+        leaf etr-udp-port {
+          type uint16;
+          description
+            "ETR UDP port.";
+        }
+        leaf global-etr-rloc {
+          type simple-address;
+          description
+            "Global ETR RLOC address.";
+        }
+        leaf ms-rloc {
+          type simple-address;
+          description
+            "Map-Server RLOC address.";
+        }
+        leaf private-etr-rloc {
+          type simple-address;
+          description
+            "Private ETR RLOC address.";
+        }
+        leaf-list rtr-rlocs {
+          type simple-address;
+          description
+            "List of RTR RLOC addresses.";
+        }
+      }
+      container explicit-locator-path {
+        when "../../lcaf-type = explicit-locator-path" {
+          description
+            "When LCAF type type is Explicit Locator Path.";
+        }
+        description
+          "Explicit Locator Path LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.9";
+        list hop {
+          key "address";
+          description
+            "List of locator hops forming the explicit path.";
+          leaf address {
+            type simple-address;
+            description
+              "AFI address.";
+          }
+          leaf lrs-bits {
+            type bits{
+              bit lookup {
+                description
+                  "Lookup bit.";
+              }
+              bit rloc-probe {
+                description
+                  "RLOC-probe bit.";
+              }
+              bit strict {
+                description
+                  "Strict bit.";
+              }
+            }
+            description
+              "Flag bits per hop.";
+          }
+        }
+      }
+      container source-dest-key {
+        when "../../lcaf-type = source-dest-key" {
+          description
+            "When LCAF type type is Source/Dest.";
+        }
+        description
+          "Source/Dest LCAF type.";
+        reference
+          "http://tools.ietf.org/html/draft-ietf-lisp-lcaf-10
+           #section-4.11";
+        leaf source {
+          type inet:ip-prefix;
+          description
+            "Source prefix.";
+        }
+        leaf dest {
+          type inet:ip-prefix;
+          description
+            "Destination prefix.";
+        }
+      }
+    }
+  }
+  grouping lisp-address {
+    description
+      "Generic LISP address.";
+    leaf afi {
+      type lisp-address-family-ref;
+      mandatory true;
+      description
+        "LISP address family AFI.";
+    }
+    leaf instance-id {
+      type instance-id-type;
+      description
+        "Instance ID of the address.";
+    }
+    choice address {
+      leaf no-address {
+        when "../../afi = 'laddr:no-addr'" {
+          description
+            "When AFI is 0.";
+        }
+        type empty;
+        description
+          "No address.";
+      }
+      leaf ipv4 {
+        when "../../afi = 'laddr:ipv4'" {
+          description
+            "When AFI is IPv4.";
+        }
+        type inet:ipv4-address;
+        description
+          "IPv4 address.";
+      }
+      leaf ipv4-prefix {
+        when "../../afi = 'laddr:ipv4-prefix'" {
+          description
+            "When AFI is IPv4.";
+        }
+        type inet:ipv4-prefix;
+        description
+          "IPv4 prefix.";
+      }
+      leaf ipv6 {
+        when "../../afi = 'laddr:ipv6'" {
+          description
+            "When AFI is IPv6.";
+        }
+        type inet:ipv6-address;
+        description
+          "IPv6 address.";
+      }
+      leaf ipv6-prefix {
+        when "../../afi = 'laddr:ipv6-prefix'" {
+          description
+            "When AFI is IPv6.";
+        }
+        type inet:ipv6-prefix;
+        description
+          "IPv6 address.";
+      }
+      leaf mac {
+        when "../../afi = 'laddr:mac'" {
+          description
+            "When AFI is MAC.";
+        }
+        type yang:mac-address;
+        description
+          "MAC address.";
+      }
+      leaf distinguished-name {
+        when "../../afi = 'laddr:distinguished-name'" {
+          description
+            "When AFI is distinguished-name.";
+        }
+        type distinguished-name;
+        description
+          "Distinguished Name address.";
+      }
+      leaf as-number {
+          when "../../afi = 'laddr:as-number'" {
+            description
+              "When AFI is as-number.";
+          }
+          type inet:as-number;
+          description
+            "AS Number.";
+        }
+      container lcaf {
+        when "../../afi = 'laddr:lcaf'" {
+          description
+            "When AFI is LCAF.";
+        }
+        uses lcaf-address;
+        description
+          "LCAF address.";
+      }
+      description
+        "Selection of address type.";
+    }
+  }
+}
index 2d2b0ca71726fba090237856332fbfad5a75d099..4c43b7273378bb1b718c411edd99a28da93b0c3c 100644 (file)
@@ -6,6 +6,7 @@ module lisp-proto {
 
     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
     import ietf-yang-types { prefix yang; revision-date 2010-09-24; }
+    import lisp-address-types { prefix lisp-address; revision-date 2015-03-09; }
 
     organization "LISP Flow Mapping";
 
@@ -361,10 +362,7 @@ module lisp-proto {
 
     grouping EidRecords {
         list EidRecord {
-            uses LispAddress;
-            leaf mask {
-                type uint8;
-            }
+            uses lisp-address:lisp-address;
         }
     }
 
@@ -397,7 +395,7 @@ module lisp-proto {
             }
 
             //locator address
-            uses LispAddress;
+            uses lisp-address:lisp-address;
         }
     }
 
@@ -423,7 +421,7 @@ module lisp-proto {
             type boolean;
         }
         // EID prefix
-        uses LispAddress;
+        uses lisp-address:lisp-address;
 
         // locator record list
         uses LocatorRecords;
@@ -510,10 +508,10 @@ module lisp-proto {
             type int64;
         }
         container SourceEid {
-            uses LispAddress;
+            uses lisp-address:lisp-address;
         }
         list itrRloc {
-            uses LispAddress;
+            uses lisp-address:lisp-address;
         }
         uses EidRecords;
         container MapReply{
index 413f85c2476a4704cecb18eb78708d66d68290fa..aaee63b1593ad34645e77abb8b7ed04b316e92f3 100644 (file)
   <modules>
     <module>lisp-proto</module>
     <module>api</module>
+    <!--
     <module>inmemorydb</module>
     <module>implementation</module>
     <module>southbound</module>
     <module>neutron</module>
     <module>shell</module>
+    -->
   </modules>
 
   <dependencyManagement>
diff --git a/pom.xml b/pom.xml
index a36ecdffb5af90973b6a32a53157afd0c88680fe..7357b8258105a1deed90b5729f293615bf3d43b4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     <module>ui</module>
     <module>features</module>
     <module>distribution-karaf</module>
-    <module>mappingservice/integrationtest</module>
+    <!-- <module>mappingservice/integrationtest</module> -->
   </modules>
 
   <build>