HC2VPP-147 - gpe forward entry api 67/6667/11
authorJan Srnicek <[email protected]>
Thu, 18 May 2017 08:35:12 +0000 (10:35 +0200)
committerMarek Gradzki <[email protected]>
Thu, 18 May 2017 09:44:52 +0000 (09:44 +0000)
Change-Id: If5f3c073e36de65083db35ee8b0c2bcbd97f4eea
Signed-off-by: Jan Srnicek <[email protected]>
lisp/api/src/main/yang/gpe.yang [new file with mode: 0644]

diff --git a/lisp/api/src/main/yang/gpe.yang b/lisp/api/src/main/yang/gpe.yang
new file mode 100644 (file)
index 0000000..91c476f
--- /dev/null
@@ -0,0 +1,108 @@
+module gpe {
+  yang-version 1;
+  namespace "urn:opendaylight:params:xml:ns:yang:gpe";
+  prefix "gpe";
+
+  import lisp {
+    prefix "lisp";
+  }
+
+  import ietf-inet-types {
+    prefix "inet";
+  }
+
+  import ietf-lisp-address-types {
+    prefix "lisp-types";
+  }
+
+  revision 2017-05-18 {
+    description
+    "Add support for defining lisp gpe forward entries";
+  }
+
+  grouping locator-pair {
+    container locator-pair {
+      leaf local-locator {
+        type inet:ip-address;
+        description "Local locator address";
+      }
+      leaf remote-locator {
+        type inet:ip-address;
+        description "Remote locator address";
+      }
+      leaf weight {
+        type uint8;
+        description "Weight";
+      }
+    }
+  }
+  grouping gpe-entry-table-grouping {
+    container gpe-entry-table {
+      when "../enable = 'true'";
+
+      list gpe-entry {
+        key id;
+        leaf id {
+          type string;
+          description "GPE entry ID";
+        }
+        leaf dp-table {
+          type uint32;
+          mandatory true;
+          description "VRF/BD index";
+        }
+        leaf vni {
+          type uint32;
+          mandatory true;
+          description "Virtual Network Identifier";
+        }
+        container local-eid {
+          uses lisp-types:lisp-address;
+          description "Local EID that must be a local address";
+        }
+        container remote-eid {
+          uses lisp-types:lisp-address;
+          description "Remote EID";
+        }
+        list locator-pairs {
+          key id;
+          leaf id {
+            type string;
+            description "Locator Pair ID";
+          }
+          uses locator-pair;
+        }
+        leaf action {
+          type lisp:map-reply-action;
+          description "Forwarding action for negative entries";
+        }
+      }
+    }
+  }
+
+  grouping gpe-feature-data-grouping {
+    //aggregation of all gpe data, restricted by GPE being enabled
+    container gpe-feature-data {
+      leaf enable {
+        type boolean;
+        description "Enable/disable GPE feature";
+      }
+
+      uses gpe-entry-table-grouping;
+    }
+  }
+
+  container gpe {
+    // gpe_enable_disable
+
+    uses gpe-feature-data-grouping;
+    description "GPE configuration";
+  }
+
+  container gpe-state {
+    //gpe_enable_disable_status_dump
+
+    uses gpe-feature-data-grouping;
+    description "GPE state";
+  }
+}
\ No newline at end of file