Add type and nb_ic_uuid to Datapath_Binding adn Port_Binding
so transit router and transit switch entries can be
differentiated.

Reported-at: https://issues.redhat.com/browse/FDP-1476
Signed-off-by: Mairtin O'Loingsigh <[email protected]>
---
 ovn-ic-nb.ovsschema | 36 +++++++++++++++++++++--
 ovn-ic-nb.xml       | 70 +++++++++++++++++++++++++++++++++++++++++++++
 ovn-ic-sb.ovsschema | 23 +++++++++++++--
 ovn-ic-sb.xml       | 18 ++++++++++++
 4 files changed, 142 insertions(+), 5 deletions(-)

diff --git a/ovn-ic-nb.ovsschema b/ovn-ic-nb.ovsschema
index 8145b0335..ca67a2fa9 100644
--- a/ovn-ic-nb.ovsschema
+++ b/ovn-ic-nb.ovsschema
@@ -1,7 +1,7 @@
 {
     "name": "OVN_IC_Northbound",
-    "version": "1.2.0",
-    "cksum": "4176728051 3557",
+    "version": "1.3.0",
+    "cksum": "1918565391 5082",
     "tables": {
         "IC_NB_Global": {
             "columns": {
@@ -35,6 +35,38 @@
                              "min": 0, "max": "unlimited"}}},
             "isRoot": true,
             "indexes": [["name"]]},
+        "Transit_Router": {
+            "columns": {
+                "name": {"type": "string"},
+                "ports": {"type": {"key": {"type": "uuid",
+                                           "refTable": "Transit_Router_Port",
+                                           "refType": "strong"},
+                                   "min": 0,
+                                   "max": "unlimited"}},
+                "other_config": {
+                    "type": {"key": "string", "value": "string",
+                             "min": 0, "max": "unlimited"}},
+                "external_ids": {
+                    "type": {"key": "string", "value": "string",
+                             "min": 0, "max": "unlimited"}}},
+            "isRoot": true,
+            "indexes": [["name"]]},
+        "Transit_Router_Port": {
+            "columns": {
+                "name": {"type": "string"},
+                "other_config": {
+                    "type": {"key": "string", "value": "string",
+                             "min": 0, "max": "unlimited"}},
+                "mac": {"type": "string"},
+                "chassis": {"type": "string"},
+                "networks": {"type": {"key": "string",
+                                      "min": 0,
+                                      "max": "unlimited"}},
+                "tr_uuid": {"type": {"key": {"type": "uuid"},
+                                     "min": 1,
+                                     "max": 1}}},
+            "isRoot": false,
+            "indexes": [["name"]]},
         "Connection": {
             "columns": {
                 "target": {"type": "string"},
diff --git a/ovn-ic-nb.xml b/ovn-ic-nb.xml
index 304e100ff..a3a35baf2 100644
--- a/ovn-ic-nb.xml
+++ b/ovn-ic-nb.xml
@@ -120,6 +120,76 @@
     </group>
   </table>
 
+  <table name="Transit_Router" title="Transit logical router">
+    <p>
+      Each row represents one transit logical router for interconnection
+      between different OVN deployments (availability zones).
+    </p>
+
+    <group title="Naming">
+      <column name="name">
+        A name that uniquely identifies the transit logical router.
+      </column>
+    </group>
+
+    <column name="ports">
+      The router's ports.
+    </column>
+
+    <group title="Common Columns">
+      <column name="other_config"/>
+      <column name="external_ids">
+        See <em>External IDs</em> at the beginning of this document.
+      </column>
+    </group>
+  </table>
+
+  <table name="Transit_Router_Port" title="Transit logical router">
+    <p>
+      Each row represents one transit logical router for interconnection
+      between different OVN deployments (availability zones).
+    </p>
+
+    <group title="Naming">
+      <column name="name">
+        A name that uniquely identifies the transit logical router port.
+      </column>
+    </group>
+
+    <column name="mac">
+      The Ethernet address that belongs to this router port.
+    </column>
+
+    <column name="chassis">
+      The chassis this router port should be bound to.
+    </column>
+
+    <column name="tr_uuid">
+       This is the UUID of the northbound IC logical datapath this port is
+       associated with.
+    </column>
+
+    <column name="networks">
+      <p>
+        The IP addresses and netmasks of the router port.  For example,
+        <code>192.168.0.1/24</code> indicates that the router's IP
+        address is 192.168.0.1 and that packets destined to
+        192.168.0.<var>x</var> should be routed to this port.
+        These are optional.
+      </p>
+
+      <p>
+        A logical router port always adds a link-local IPv6 address
+        (fe80::/64) automatically generated from the interface's MAC
+        address using the modified EUI-64 format.
+      </p>
+    </column>
+
+    <group title="Common Columns">
+      <column name="other_config"/>
+    </group>
+  </table>
+
   <table name="SSL">
     SSL/TLS configuration for ovn-nb database access.
 
diff --git a/ovn-ic-sb.ovsschema b/ovn-ic-sb.ovsschema
index 967ae637f..a11c9a333 100644
--- a/ovn-ic-sb.ovsschema
+++ b/ovn-ic-sb.ovsschema
@@ -1,7 +1,7 @@
 {
     "name": "OVN_IC_Southbound",
     "version": "2.3.0",
-    "cksum": "4059944648 8639",
+    "cksum": "3834405974 9713",
     "tables": {
         "IC_SB_Global": {
             "columns": {
@@ -58,6 +58,14 @@
         "Datapath_Binding": {
             "columns": {
                 "transit_switch": {"type": "string"},
+                "type": {"type": {"key": {"type": "string",
+                                          "enum": ["set",
+                                                      ["transit-switch",
+                                                       "transit-router"]]},
+                                                        "min": 0, "max": 1}},
+                "nb_ic_uuid": {"type": {"key": {"type": "uuid"},
+                                     "min": 0,
+                                     "max": 1}},
                 "tunnel_key": {
                      "type": {"key": {"type": "integer",
                                       "minInteger": 1,
@@ -65,7 +73,7 @@
                 "external_ids": {
                     "type": {"key": "string", "value": "string",
                              "min": 0, "max": "unlimited"}}},
-            "indexes": [["tunnel_key"]],
+            "indexes": [["nb_ic_uuid","tunnel_key"]],
             "isRoot": true},
         "Port_Binding": {
             "columns": {
@@ -83,11 +91,20 @@
                                              "refType": "weak"},
                                     "min": 0, "max": 1}},
                 "address": {"type": "string"},
+                "type": {"type": {"key": {"type": "string",
+                                          "enum": ["set",
+                                                  ["transit-switch-port",
+                                                   "transit-router-port"]]},
+                                                   "min": 0, "max": 1}},
+                "nb_ic_uuid": {"type": {"key": {"type": "uuid"},
+                                     "min": 0,
+                                     "max": 1}},
                 "external_ids": {"type": {"key": "string",
                                  "value": "string",
                                  "min": 0,
                                  "max": "unlimited"}}},
-            "indexes": [["transit_switch", "tunnel_key"], ["logical_port"]],
+            "indexes": [["transit_switch", "nb_ic_uuid", "tunnel_key"],
+                        ["nb_ic_uuid", "logical_port"]],
             "isRoot": true},
         "Route": {
             "columns": {
diff --git a/ovn-ic-sb.xml b/ovn-ic-sb.xml
index 924aaac5f..8ad3fa556 100644
--- a/ovn-ic-sb.xml
+++ b/ovn-ic-sb.xml
@@ -213,6 +213,15 @@
       db="OVN_IC_Northbound"/> table.
     </column>
 
+    <column name="type">
+      Can be one of <code>transit-switch</code> or <code>transit-router</code>
+    </column>
+
+    <column name="nb_ic_uuid" type='{"type": "string"}'>
+      This is the UUID of the corresponding northbound IC logical datapath
+      represented by this southbound <code>Datapath_Binding</code>.
+    </column>
+
     <column name="tunnel_key">
       <p>
         The tunnel key value to which the logical datapath is bound.  The key
@@ -302,6 +311,15 @@
         </p>
       </column>
 
+    <column name="type">
+      Can be one of <code>switch-port</code> or <code>router-port</code>
+    </column>
+
+    <column name="nb_ic_uuid" type='{"type": "string"}'>
+      This is the UUID of the corresponding northbound IC logical datapath
+      represented by this southbound <code>Datapath_Binding</code>.
+    </column>
+
     </group>
 
     <group title="Common Columns">
-- 
2.51.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to