From cc7ecee48ade1626a6fb6548fff592dcd074e33f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 6 Jun 2011 09:21:45 -0700 Subject: [PATCH] vswitchd: Add unique indexes for some columns. This is mainly intended to make life easier for database clients that don't already have code to avoid creating records with duplicate names in various OVS database tables. With this commit, the database server itself rejects attempts to add Port or Interface records with duplicate names or Controller or Manager records with duplicate targets. --- vswitchd/vswitch.ovsschema | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema index 4ad5c38b..be23c921 100644 --- a/vswitchd/vswitch.ovsschema +++ b/vswitchd/vswitch.ovsschema @@ -1,6 +1,6 @@ {"name": "Open_vSwitch", - "version": "4.0.0", - "cksum": "2606080158 14328", + "version": "5.0.0", + "cksum": "456700307 14434", "tables": { "Open_vSwitch": { "columns": { @@ -92,7 +92,8 @@ "type": {"key": {"type": "integer", "minInteger": 0, "maxInteger": 4095}, - "min": 0, "max": 4096}}}}, + "min": 0, "max": 4096}}}, + "indexes": [["name"]]}, "Port": { "columns": { "name": { @@ -138,7 +139,8 @@ "other_config": { "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}, "external_ids": { - "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}}}, + "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}}, + "indexes": [["name"]]}, "Interface": { "columns": { "name": { @@ -208,7 +210,8 @@ "ephemeral": true}, "mtu": { "type": {"key": "integer", "min": 0, "max": 1}, - "ephemeral": true}}}, + "ephemeral": true}}, + "indexes": [["name"]]}, "QoS": { "columns": { "type": { @@ -241,8 +244,7 @@ "name": { "type": "string"}, "select_all": { - "type": "boolean" - }, + "type": "boolean"}, "select_src_port": { "type": {"key": {"type": "uuid", "refTable": "Port", @@ -376,7 +378,8 @@ "ephemeral": true}, "status": { "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}, - "ephemeral": true}}}, + "ephemeral": true}}, + "indexes": [["target"]]}, "SSL": { "columns": { "private_key": { -- 2.30.2