vswitch: Make unique "name" columns immutable, to simplify transactions.
[cascardo/ovs.git] / vswitchd / vswitch.ovsschema
1 {"name": "Open_vSwitch",
2  "tables": {
3    "Open_vSwitch": {
4      "columns": {
5        "bridges": {
6          "type": {"key": {"type": "uuid",
7                           "refTable": "Bridge"},
8                   "min": 0, "max": "unlimited"}},
9        "managers": {
10          "type": {"key": "string", "min": 0, "max": "unlimited"}},
11        "ssl": {
12          "type": {"key": {"type": "uuid",
13                           "refTable": "SSL"},
14                   "min": 0, "max": 1}},
15        "external_ids": {
16          "type": {"key": "string", "value": "string",
17                   "min": 0, "max": "unlimited"}},
18        "next_cfg": {
19          "type": "integer"},
20        "cur_cfg": {
21          "type": "integer"},
22        "capabilities": {
23          "type": {"key": "string",
24                   "value": {"type": "uuid",
25                             "refTable": "Capability"},
26                   "min": 0, "max": "unlimited"}},
27        "statistics": {
28          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"},
29          "ephemeral": true}},
30      "maxRows": 1},
31    "Capability": {
32      "columns": {
33        "details": {
34          "type": {"key": "string", "value": "string",
35                   "min": 0, "max": "unlimited"}}}},
36    "Bridge": {
37      "columns": {
38        "name": {
39          "type": "string",
40          "mutable": false},
41        "datapath_type": {
42          "type": "string"},
43        "datapath_id": {
44          "type": {"key": "string", "min": 0, "max": 1},
45          "ephemeral": true},
46        "ports": {
47          "type": {"key": {"type": "uuid",
48                           "refTable": "Port"},
49                   "min": 0, "max": "unlimited"}},
50        "mirrors": {
51          "type": {"key": {"type": "uuid",
52                           "refTable": "Mirror"},
53                   "min": 0, "max": "unlimited"}},
54        "netflow": {
55          "type": {"key": {"type": "uuid",
56                           "refTable": "NetFlow"},
57                   "min": 0, "max": 1}},
58        "sflow": {
59          "type": {"key": {"type": "uuid",
60                           "refTable": "sFlow"},
61                   "min": 0, "max": 1}},
62        "controller": {
63          "type": {"key": {"type": "uuid",
64                           "refTable": "Controller"},
65                   "min": 0, "max": "unlimited"}},
66        "fail_mode": {
67          "type": {"key": {"type": "string",
68                           "enum": ["set", ["standalone", "secure"]]},
69                   "min": 0, "max": 1}},
70        "other_config": {
71          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
72        "external_ids": {
73          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
74        "flood_vlans": {
75          "type": {"key": {"type": "integer",
76                           "minInteger": 0, 
77                           "maxInteger": 4095},
78                   "min": 0, "max": 4096}}}},
79    "Port": {
80      "columns": {
81        "name": {
82          "type": "string",
83          "mutable": false},
84        "interfaces": {
85          "type": {"key": {"type": "uuid",
86                           "refTable": "Interface"},
87                   "min": 1, "max": "unlimited"}},
88        "trunks": {
89          "type": {"key": {"type": "integer",
90                           "minInteger": 0,
91                           "maxInteger": 4095},
92                   "min": 0, "max": 4096}},
93        "tag": {
94          "type": {"key": {"type": "integer",
95                           "minInteger": 0,
96                           "maxInteger": 4095},
97                   "min": 0, "max": 1}},
98        "qos": {
99          "type": {"key": {"type": "uuid",
100                           "refTable": "QoS"},
101                   "min": 0, "max": 1}},
102        "mac": {
103          "type": {"key": {"type": "string"},
104                   "min": 0, "max": 1}},
105        "bond_updelay": {
106          "type": "integer"},
107        "bond_downdelay": {
108          "type": "integer"},
109        "bond_fake_iface": {
110          "type": "boolean"},
111        "fake_bridge": {
112          "type": "boolean"},
113        "other_config": {
114          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
115        "external_ids": {
116          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}}},
117    "Interface": {
118      "columns": {
119        "name": {
120          "type": "string",
121          "mutable": false},
122        "type": {
123          "type": "string"},
124        "options": {
125          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
126        "ingress_policing_rate": {
127          "type": {"key": {"type": "integer",
128                           "minInteger": 0}}},
129        "ingress_policing_burst": {
130          "type": {"key": {"type": "integer",
131                           "minInteger": 0}}},
132        "mac": {
133          "type": {"key": {"type": "string"},
134                   "min": 0, "max": 1}},
135        "external_ids": {
136          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
137        "ofport": {
138          "type": {"key": "integer", "min": 0, "max": 1},
139          "ephemeral": true},
140        "other_config": {
141          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
142        "statistics": {
143          "type": {"key": "string", "value": "integer", "min": 0, "max": "unlimited"},
144          "ephemeral": true},
145        "status": {
146          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"},
147          "ephemeral": true}}},
148    "QoS": {
149      "columns": {
150        "type": {
151          "type": "string"},
152        "queues": {
153          "type": {"key": {"type": "integer",
154                           "minInteger": 0,
155                           "maxInteger": 4294967295},
156                   "value": {"type": "uuid",
157                             "refTable": "Queue"},
158                   "min": 0, "max": "unlimited"}},
159        "other_config": {
160          "type": {"key": "string", "value": "string", 
161                   "min": 0, "max": "unlimited"}},
162        "external_ids": {
163          "type": {"key": "string", "value": "string",
164                   "min": 0, "max": "unlimited"}}}},
165    "Queue": {
166      "columns": {
167        "other_config": {
168          "type": {"key": "string", "value": "string", 
169                   "min": 0, "max": "unlimited"}},
170        "external_ids": {
171          "type": {"key": "string", "value": "string",
172                   "min": 0, "max": "unlimited"}}}},
173    "Mirror": {
174      "columns": {
175        "name": {
176          "type": "string"},
177        "select_all": {
178          "type": "boolean"
179        },
180        "select_src_port": {
181          "type": {"key": {"type": "uuid",
182                           "refTable": "Port",
183                           "refType": "weak"},
184                    "min": 0, "max": "unlimited"}},
185        "select_dst_port": {
186          "type": {"key": {"type": "uuid",
187                           "refTable": "Port",
188                           "refType": "weak"},
189                    "min": 0, "max": "unlimited"}},
190        "select_vlan": {
191          "type": {"key": {"type": "integer",
192                           "minInteger": 0,
193                           "maxInteger": 4095},
194                   "min": 0, "max": 4096}},
195        "output_port": {
196          "type": {"key": {"type": "uuid",
197                           "refTable": "Port",
198                           "refType": "weak"},
199                   "min": 0, "max": 1}},
200        "output_vlan": {
201          "type": {"key": {"type": "integer",
202                           "minInteger": 1,
203                           "maxInteger": 4095},
204                   "min": 0, "max": 1}},
205        "external_ids": {
206          "type": {"key": "string", "value": "string",
207                   "min": 0, "max": "unlimited"}}}},
208    "NetFlow": {
209      "columns": {
210        "targets": {
211          "type": {"key": {"type": "string"},
212                   "min": 1, "max": "unlimited"}},
213        "engine_type": {
214          "type": {"key": {"type": "integer",
215                           "minInteger": 0,
216                           "maxInteger": 255},
217                   "min": 0, "max": 1}},
218        "engine_id": {
219          "type": {"key": {"type": "integer",
220                           "minInteger": 0,
221                           "maxInteger": 255},
222                   "min": 0, "max": 1}},
223        "add_id_to_interface": {
224          "type": "boolean"},
225        "active_timeout": {
226          "type": {"key": {"type": "integer",
227                           "minInteger": -1}}},
228        "external_ids": {
229          "type": {"key": "string", "value": "string",
230                   "min": 0, "max": "unlimited"}}}},
231    "sFlow": {
232      "columns": {
233        "targets": {
234          "type": {"key": "string", "min": 1, "max": "unlimited"}},
235        "sampling": {
236          "type": {"key": "integer", "min": 0, "max": 1}},
237        "polling": {
238          "type": {"key": "integer", "min": 0, "max": 1}},
239        "header": {
240          "type": {"key": "integer", "min": 0, "max": 1}},
241        "agent": {
242          "type": {"key": "string", "min": 0, "max": 1}},
243        "external_ids": {
244          "type": {"key": "string", "value": "string",
245                   "min": 0, "max": "unlimited"}}}},
246    "Controller": {
247      "columns": {
248        "target": {
249          "type": "string"},
250        "max_backoff": {
251          "type": {"key": {"type": "integer",
252                           "minInteger": 1000},
253                   "min": 0, "max": 1}},
254        "inactivity_probe": {
255          "type": {"key": "integer", "min": 0, "max": 1}},
256        "discover_accept_regex": {
257          "type": {"key": "string", "min": 0, "max": 1}},
258        "discover_update_resolv_conf": {
259          "type": {"key": "boolean", "min": 0, "max": 1}},
260        "connection_mode": {
261          "type": {"key": {"type": "string",
262                   "enum": ["set", ["in-band", "out-of-band"]]},
263                   "min": 0, "max": 1}},
264        "local_ip": {
265          "type": {"key": {"type": "string"},
266                   "min": 0, "max": 1}},
267        "local_netmask": {
268          "type": {"key": {"type": "string"},
269                   "min": 0, "max": 1}},
270        "local_gateway": {
271          "type": {"key": {"type": "string"},
272                   "min": 0, "max": 1}},
273        "controller_rate_limit": {
274          "type": {"key": {"type": "integer",
275                           "minInteger": 100},
276                   "min": 0, "max": 1}},
277        "controller_burst_limit": {
278          "type": {"key": {"type": "integer", 
279                           "minInteger": 25},
280                   "min": 0, "max": 1}},
281        "external_ids": {
282          "type": {"key": "string", "value": "string",
283                   "min": 0, "max": "unlimited"}}}},
284    "SSL": {
285      "columns": {
286        "private_key": {
287          "type": "string"},
288        "certificate": {
289          "type": "string"},
290        "ca_cert": {
291          "type": "string"},
292        "bootstrap_ca_cert": {
293          "type": "boolean"},
294        "external_ids": {
295          "type": {"key": "string", "value": "string",
296                   "min": 0, "max": "unlimited"}}},
297      "maxRows": 1}}}