Fixed NAT in OFOverlay based on EIG
[groupbasedpolicy.git] / renderers / ofoverlay / src / main / yang / ofoverlay.yang
index d2b7d4989a6e8b1ff6951c5ce0994029bc0ec379..5315e94938f160472d029215d1a95c998d92540e 100644 (file)
@@ -15,7 +15,8 @@ module ofoverlay {
     import ietf-inet-types { prefix "inet"; revision-date 2010-09-24; }
 
     import yang-ext {prefix ext; revision-date "2013-07-09";}
-    import opendaylight-inventory {prefix inv;revision-date "2013-08-19";}
+    import opendaylight-inventory {prefix inv; revision-date "2013-08-19";}
+    import overlay {prefix ovsdb-overlay; revision-date 2015-01-05;}
 
     import gbp-common {prefix gbp-common;}
     import endpoint {prefix endpoint;}
@@ -58,53 +59,24 @@ module ofoverlay {
                 }
             }
         }
-    }
-    /*
-    container of-overlay-operational {
-        description
-            "Operational parameters for the OpenFlow overlay renderer";
 
-        config false;
+        uses initial-values;
+    }
 
-        list data-plane-ordinal {
+    grouping initial-values {
+        description
+            "Initial value of table offset is set in config subsystem";
+        leaf gbp-ofoverlay-table-offset {
             description
-                "Map elements of the policy to the id used on the network";
-            key "tenant id";
-            leaf tenant {
-                description "The tenant for the policy element";
-                type gbp-common:tenant-id;
-            }
-            leaf id {
-                description "The ID of the item";
-                type gbp-common:unique-id;
-            }
-            leaf ordinal {
-                description "The 32-bit ordinal for the item";
-                type uint32;
-            }
+                "Used to offset pipeline to start at offset+1. Table0 is required.
+                This is to allow the enduser to configure where the GBP pipeline starts.";
+            type uint8;
         }
     }
-    */
+
     grouping endpoint-location {
         description
             "The location for this endpoint in the overlay network";
-
-        leaf location-type {
-            default internal;
-
-            type enumeration {
-                enum internal {
-                    description
-                    "The endpoint is located on a port that is part of
-                     the overlay network.  You must include the node
-                     ID and port number for this endpoint.";
-                }
-                enum external {
-                    description "This endpoint is not inside the overlay.";
-                }
-            }
-        }
-
         leaf node-id {
             description
                 "The OpenFlow switch for the endpoint. Must be included
@@ -113,7 +85,6 @@ module ofoverlay {
                  switch DPID cast to a long.";
             type inv:node-id;
         }
-
         leaf node-connector-id {
             description
                 "The node connector for the endpoint's OpenFlow port. The
@@ -133,7 +104,6 @@ module ofoverlay {
             description
                 "Unique identifier for interface";
         }
-
     }
 
     augment "/endpoint:endpoints/endpoint:endpoint" {
@@ -141,6 +111,11 @@ module ofoverlay {
         uses endpoint-location;
     }
 
+    augment "/endpoint:endpoints/endpoint:endpoint-l3" {
+        ext:augment-identifier "of-overlay-l3-context";
+        uses endpoint-location;
+    }
+
     augment "/endpoint:register-endpoint/endpoint:input" {
         ext:augment-identifier "of-overlay-context-input";
         uses endpoint-location;
@@ -148,11 +123,19 @@ module ofoverlay {
 
     augment "/inv:nodes/inv:node" {
         ext:augment-identifier "of-overlay-node-config";
-
-        leaf tunnel-ip {
-            description
-                "The IP address used for tunnel termination on this switch";
-            type inet:ip-address;
+        list tunnel {
+            key "tunnel-type";
+            uses ovsdb-overlay:tunnel-type-attributes;
+            uses ovsdb-overlay:ip-port-locator;
+            leaf node-connector-id {
+                description
+                    "The node connector where is the tunnel located. The
+                     format is openflow:[dpid]:[port] where the dpid is
+                     the value of the switch DPID cast to a long, and port
+                     is the openflow port number of the interface where
+                     the endpoint is connected.";
+                type inv:node-connector-id;
+            }
         }
         container ovsdb-config {
             leaf ip {
@@ -167,12 +150,15 @@ module ofoverlay {
                 default 6640;
             }
         }
-        leaf-list external-interfaces {
+        list external-interfaces {
             description
-                "The names of the OpenFlow interfaces that are external and
-                 lead to the underlay network.  Can be specified as a
-                 regular expression.";
-            type string;
+                "The node connectors for the external interfaces to the underlay.
+                If interface name is required, can be looked up from inventory using
+                this field as a key to FCNC (FlowCapableNodeConnector)";
+            key "node-connector-id";
+            leaf node-connector-id {
+                type inv:node-connector-id;
+            }
         }
     }
 }