diff mbox

[ovs-dev,2/3] ovn: Remove duplicate versions from schemas.

Message ID 1445936735-13729-2-git-send-email-rbryant@redhat.com
State Accepted
Headers show

Commit Message

Russell Bryant Oct. 27, 2015, 9:05 a.m. UTC
Since commit 5935835968c9d36ffe306863f0c8079d3b670e2a, the OVN nb and sb
schema definitions have included duplicate version entries.  In the nb
case, the version has since been updated to 2.0.0, but only in one
place.  Remove the duplicate version entries that were at the bottom of
the files.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
---
 ovn/ovn-nb.ovsschema | 7 ++++---
 ovn/ovn-sb.ovsschema | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

Comments

Ben Pfaff Nov. 3, 2015, 8:26 p.m. UTC | #1
On Tue, Oct 27, 2015 at 06:05:34PM +0900, Russell Bryant wrote:
> Since commit 5935835968c9d36ffe306863f0c8079d3b670e2a, the OVN nb and sb
> schema definitions have included duplicate version entries.  In the nb
> case, the version has since been updated to 2.0.0, but only in one
> place.  Remove the duplicate version entries that were at the bottom of
> the files.
> 
> Signed-off-by: Russell Bryant <rbryant@redhat.com>

Oh, wow.  Thanks.

I'm surprised that the OVS JSON parser doesn't reject this.  I might
have to have another look at it.

Acked-by: Ben Pfaff <blp@nicira.com>
Ben Pfaff Nov. 3, 2015, 8:34 p.m. UTC | #2
On Tue, Nov 03, 2015 at 12:26:42PM -0800, Ben Pfaff wrote:
> I'm surprised that the OVS JSON parser doesn't reject this.  I might
> have to have another look at it.

The OVS JSON parser always uses the last value when there is a duplicate
key within an object.  It doesn't complain in any way.

I wonder whether we should change this, but I also wonder whether it
would be likely to break anything it we did.  I guess it would be easy
to try it and find out.
diff mbox

Patch

diff --git a/ovn/ovn-nb.ovsschema b/ovn/ovn-nb.ovsschema
index 3921e98..b338c3f 100644
--- a/ovn/ovn-nb.ovsschema
+++ b/ovn/ovn-nb.ovsschema
@@ -1,7 +1,7 @@ 
 {
     "name": "OVN_Northbound",
     "version": "2.0.0",
-    "cksum": "3039293926 4601",
+    "cksum": "3515938918 4583",
     "tables": {
         "Logical_Switch": {
             "columns": {
@@ -89,5 +89,6 @@ 
                 "external_ids": {
                     "type": {"key": "string", "value": "string",
                              "min": 0, "max": "unlimited"}}},
-            "isRoot": false}},
-    "version": "1.0.0"}
+            "isRoot": false}
+    }
+}
diff --git a/ovn/ovn-sb.ovsschema b/ovn/ovn-sb.ovsschema
index 264a217..a9a91e5 100644
--- a/ovn/ovn-sb.ovsschema
+++ b/ovn/ovn-sb.ovsschema
@@ -1,7 +1,7 @@ 
 {
     "name": "OVN_Southbound",
     "version": "1.0.0",
-    "cksum": "4202564645 5078",
+    "cksum": "1392129391 5060",
     "tables": {
         "Chassis": {
             "columns": {
@@ -99,5 +99,6 @@ 
                                  "min": 0,
                                  "max": "unlimited"}}},
             "indexes": [["datapath", "tunnel_key"], ["logical_port"]],
-            "isRoot": true}},
-    "version": "1.0.0"}
+            "isRoot": true}
+    }
+}