Implement database schema versioning.
[sliver-openvswitch.git] / vswitchd / vswitch.ovsschema
index 8661875..a1917ee 100644 (file)
@@ -1,4 +1,6 @@
 {"name": "Open_vSwitch",
+ "version": "1.0.0",
+ "cksum": "514853437 13985",
  "tables": {
    "Open_vSwitch": {
      "columns": {
@@ -6,12 +8,12 @@
          "type": {"key": {"type": "uuid",
                           "refTable": "Bridge"},
                   "min": 0, "max": "unlimited"}},
-       "controller": {
-         "type": {"key": {"type": "uuid",
-                          "refTable": "Controller"},
-                   "min": 0, "max": 1}},
        "managers": {
          "type": {"key": "string", "min": 0, "max": "unlimited"}},
+       "manager_options": {
+         "type": {"key": {"type": "uuid",
+                          "refTable": "Manager"},
+                  "min": 0, "max": "unlimited"}},
        "ssl": {
          "type": {"key": {"type": "uuid",
                           "refTable": "SSL"},
        "next_cfg": {
          "type": "integer"},
        "cur_cfg": {
-         "type": "integer"}},
+         "type": "integer"},
+       "capabilities": {
+         "type": {"key": "string",
+                  "value": {"type": "uuid",
+                            "refTable": "Capability"},
+                  "min": 0, "max": "unlimited"}},
+       "statistics": {
+         "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"},
+         "ephemeral": true},
+       "ovs_version": {
+         "type": {"key": {"type": "string"},
+                  "min": 0, "max": 1}},
+       "db_version": {
+         "type": {"key": {"type": "string"},
+                  "min": 0, "max": 1}},
+       "system_type": {
+         "type": {"key": {"type": "string"},
+                  "min": 0, "max": 1}},
+       "system_version": {
+         "type": {"key": {"type": "string"},
+                  "min": 0, "max": 1}}},
      "maxRows": 1},
+   "Capability": {
+     "columns": {
+       "details": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "Bridge": {
      "columns": {
        "name": {
-         "type": "string"},
+         "type": "string",
+         "mutable": false},
        "datapath_type": {
          "type": "string"},
        "datapath_id": {
        "controller": {
          "type": {"key": {"type": "uuid",
                           "refTable": "Controller"},
+                  "min": 0, "max": "unlimited"}},
+       "fail_mode": {
+         "type": {"key": {"type": "string",
+                          "enum": ["set", ["standalone", "secure"]]},
                   "min": 0, "max": 1}},
        "other_config": {
          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
        "flood_vlans": {
          "type": {"key": {"type": "integer",
-                          "minInteger": 0, 
+                          "minInteger": 0,
                           "maxInteger": 4095},
                   "min": 0, "max": 4096}}}},
    "Port": {
      "columns": {
        "name": {
-         "type": "string"},
+         "type": "string",
+         "mutable": false},
        "interfaces": {
          "type": {"key": {"type": "uuid",
                           "refTable": "Interface"},
                           "minInteger": 0,
                           "maxInteger": 4095},
                   "min": 0, "max": 1}},
+       "qos": {
+         "type": {"key": {"type": "uuid",
+                          "refTable": "QoS"},
+                  "min": 0, "max": 1}},
        "mac": {
          "type": {"key": {"type": "string"},
                   "min": 0, "max": 1}},
    "Interface": {
      "columns": {
        "name": {
-         "type": "string"},
+         "type": "string",
+         "mutable": false},
        "type": {
          "type": "string"},
        "options": {
          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
        "ofport": {
          "type": {"key": "integer", "min": 0, "max": 1},
+         "ephemeral": true},
+       "monitor": {
+         "type": {
+           "key": {"type": "uuid", "refTable": "Monitor"},
+           "min": 0,
+           "max": 1}},
+       "other_config": {
+         "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
+       "statistics": {
+         "type": {"key": "string", "value": "integer", "min": 0, "max": "unlimited"},
+         "ephemeral": true},
+       "status": {
+         "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"},
+         "ephemeral": true}}},
+   "Monitor": {
+     "columns": {
+       "mpid": {
+         "type" : {
+           "key": { "type": "integer", "minInteger": 1, "maxInteger": 8191}}},
+       "md_name": {
+         "type" : {
+           "key": { "type": "string", "minLength": 1, "maxLength": 43},
+           "min": 0,
+           "max": 1}},
+       "ma_name": {
+         "type" : {
+           "key": { "type": "string", "minLength": 1, "maxLength": 43},
+           "min": 0,
+           "max": 1}},
+       "interval": {
+         "type": {
+           "key": { "type": "integer", "minInteger": 100},
+           "min": 0,
+           "max": 1}},
+       "remote_mps": {
+         "type": {
+           "key": { "type": "uuid", "refTable": "Maintenance_Point"},
+           "min": 0,
+           "max": "unlimited"},
+         "ephemeral": true},
+       "unexpected_remote_mpids": {
+         "type": {
+           "key": { "type": "integer"},
+           "min": 0,
+           "max": "unlimited"},
+         "ephemeral": true},
+       "unexpected_remote_maids": {
+         "type": {
+           "key": "string",
+           "min": 0,
+           "max": "unlimited"},
+         "ephemeral": true},
+       "fault": {
+         "type": {
+           "key": { "type": "boolean"},
+           "min": 0,
+           "max": 1},
+         "ephemeral": true}}},
+   "Maintenance_Point": {
+     "columns": {
+       "mpid": {
+         "type" : {
+           "key": { "type": "integer", "minInteger": 1, "maxInteger": 8191}},
+         "mutable": false},
+       "fault": {
+         "type": {
+           "key": { "type": "boolean"},
+           "min": 0,
+           "max": 1},
          "ephemeral": true}}},
+   "QoS": {
+     "columns": {
+       "type": {
+         "type": "string"},
+       "queues": {
+         "type": {"key": {"type": "integer",
+                          "minInteger": 0,
+                          "maxInteger": 4294967295},
+                  "value": {"type": "uuid",
+                            "refTable": "Queue"},
+                  "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"}}}},
+   "Queue": {
+     "columns": {
+       "other_config": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "Mirror": {
      "columns": {
        "name": {
          "type": {"key": {"type": "integer",
                           "minInteger": 1,
                           "maxInteger": 4095},
-                  "min": 0, "max": 1}}}},
+                  "min": 0, "max": 1}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "NetFlow": {
      "columns": {
        "targets": {
          "type": "boolean"},
        "active_timeout": {
          "type": {"key": {"type": "integer",
-                          "minInteger": -1}}}}},
+                          "minInteger": -1}}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "sFlow": {
      "columns": {
        "targets": {
        "header": {
          "type": {"key": "integer", "min": 0, "max": 1}},
        "agent": {
-         "type": {"key": "string", "min": 0, "max": 1}}}},
+         "type": {"key": "string", "min": 0, "max": 1}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "Controller": {
      "columns": {
        "target": {
                   "min": 0, "max": 1}},
        "inactivity_probe": {
          "type": {"key": "integer", "min": 0, "max": 1}},
-       "fail_mode": {
-         "type": {"key": {"type": "string",
-                          "enum": ["set", ["standalone", "secure"]]},
-                  "min": 0, "max": 1}},
        "discover_accept_regex": {
          "type": {"key": "string", "min": 0, "max": 1}},
        "discover_update_resolv_conf": {
                           "minInteger": 100},
                   "min": 0, "max": 1}},
        "controller_burst_limit": {
-         "type": {"key": {"type": "integer", 
+         "type": {"key": {"type": "integer",
                           "minInteger": 25},
-                  "min": 0, "max": 1}}}},
+                  "min": 0, "max": 1}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
+   "Manager": {
+     "columns": {
+       "target": {
+         "type": "string"},
+       "max_backoff": {
+         "type": {"key": {"type": "integer",
+                          "minInteger": 1000},
+                  "min": 0, "max": 1}},
+       "inactivity_probe": {
+         "type": {"key": "integer", "min": 0, "max": 1}},
+       "connection_mode": {
+         "type": {"key": {"type": "string",
+                  "enum": ["set", ["in-band", "out-of-band"]]},
+                  "min": 0, "max": 1}},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}}},
    "SSL": {
      "columns": {
        "private_key": {
        "ca_cert": {
          "type": "string"},
        "bootstrap_ca_cert": {
-         "type": "boolean"}},
+         "type": "boolean"},
+       "external_ids": {
+         "type": {"key": "string", "value": "string",
+                  "min": 0, "max": "unlimited"}}},
      "maxRows": 1}}}