tests: Fix memory leaks in test programs.
[sliver-openvswitch.git] / vswitchd / vswitch.ovsschema
1 {"name": "ovs_vswitchd_db",
2  "comment": "Configuration for one Open vSwitch daemon.",
3  "tables": {
4    "Open_vSwitch": {
5      "comment": "Configuration for an Open vSwitch daemon.",
6      "columns": {
7        "bridges": {
8          "comment": "Set of bridges managed by the daemon.",
9          "type": {"key": "uuid", "min": 0, "max": "unlimited"}},
10        "controller": {
11          "comment": "Default Controller used by bridges.",
12          "type": {"key": "uuid", "min": 0, "max": 1}},
13        "managers": {
14          "comment": "Remote database clients to which the Open vSwitch's database server should connect or to which it should listen.",
15          "type": {"key": "string", "min": 0, "max": "unlimited"}},
16        "ssl": {
17          "comment": "SSL used globally by the daemon.",
18          "type": {"key": "uuid", "min": 0, "max": 1}},
19        "next_cfg": {
20          "comment": "Sequence number for client to increment when it modifies the configuration and wishes to wait for Open vSwitch to finish applying the changes.",
21          "type": "integer"},
22        "cur_cfg": {
23          "comment": "Sequence number that Open vSwitch sets to the current value of 'next_cfg' after it finishing applying a set of configuration changes.",
24          "type": "integer"}}},
25    "Bridge": {
26      "comment": "Configuration for a bridge within an Open_vSwitch.",
27      "columns": {
28        "name": {
29          "comment": "Bridge identifier.  Should be alphanumeric and no more than about 8 bytes long.  Must be unique among the names of ports, interfaces, and bridges on a host.",
30          "type": "string"},
31        "datapath_type": {
32          "comment": "Name of datapath provider.  The kernel datapath has type \"system\".  The userspace datapath has type \"netdev\".",
33          "type": "string"},
34        "datapath_id": {
35          "comment": "Reports the OpenFlow datapath ID in use.  Exactly 12 hex digits.",
36          "type": {"key": "string", "min": 0, "max": 1},
37          "ephemeral": true},
38        "ports": {
39          "comment": "Ports included in the bridge.",
40          "type": {"key": "uuid", "min": 0, "max": "unlimited"}},
41        "mirrors": {
42          "comment": "Port mirroring configuration.",
43          "type": {"key": "uuid", "min": 0, "max": "unlimited"}},
44        "netflow": {
45          "comment": "NetFlow configuration.",
46          "type": {"key": "uuid", "min": 0, "max": 1}},
47        "controller": {
48          "comment": "OpenFlow controller.  If unset, defaults to that specified by the parent Open_vSwitch.",
49          "type": {"key": "uuid", "min": 0, "max": 1}},
50        "other_config": {
51          "comment": "Key-value pairs for configuring rarely used bridge features.  The currently defined key-value pairs are: \"datapath-id\", exactly 12 hex digits to set the OpenFlow datapath ID to a specific value; \"hwaddr\", exactly 12 hex digits in the form \"XX:XX:XX:XX:XX:XX\" to set the hardware address of the local port and influence the datapath ID.",
52          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
53        "external_ids": {
54          "comment": "Key-value pairs that identify this bridge's role in external systems.  The currently defined key-value pairs are: \"xs-network-uuids\", a space-delimited set of the Citrix XenServer network UUIDs with which this bridge is associated; \"xs-network-names\", a semicolon-delimited set of Citrix XenServer network names with which this bridge is associated.",
55          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
56        "flood_vlans": {
57          "comment": "VLAN IDs of VLANs on which MAC address learning should be disabled, so that packets are flooded instead of being sent to specific ports that are believed to contain packets' destination MACs.  This should ordinarily be used to disable MAC learning on VLANs used for mirroring (RSPAN VLANs).  It may also be useful for debugging.",
58          "type": {"key": "integer", "min": 0, "max": 4096}
59 }}},
60    "Port": {
61      "comment": "A port within a Bridge.  May contain a single Interface or multiple (bonded) Interfaces.",
62      "columns": {
63        "name": {
64          "comment": "Port name.  Should be alphanumeric and no more than about 8 bytes long.    May be the same as the interface name, for non-bonded ports.  Must otherwise be unique among the names of ports, interfaces, and bridges on a host.",
65          "type": "string"},
66        "interfaces": {
67          "comment": "The Port's Interfaces.  If there is more than one, this is a bonded Port.",
68          "type": {"key": "uuid", "min": 1, "max": "unlimited"}},
69        "trunks": {
70          "comment": "The 802.1Q VLAN(s) that this port trunks.  Should be empty if this port trunks all VLAN(s) or if this is not a trunk port.",
71          "type": {"key": "integer", "min": 0, "max": 4096}},
72        "tag": {
73          "comment": "This port's implicitly tagged VLAN.  Should be empty if this is a trunk port.",
74          "type": {"key": "integer", "min": 0, "max": 1}},
75        "mac": {
76          "comment": "The MAC address to use for this port for the purpose of choosing the bridge's MAC address.  This column does not necessarily reflect the port's actual MAC address, nor will setting it change the port's actual MAC address.  Exactly 12 hex digits in the form XX:XX:XX:XX:XX:XX.",
77          "type": {"key": "string", "min": 0, "max": 1}},
78        "bond_updelay": {
79          "comment": "For a bonded port, the number of milliseconds for which carrier must stay up on an interface before the interface is considered to be up.  Ignored for non-bonded ports.",
80          "type": "integer"},
81        "bond_downdelay": {
82          "comment": "For a bonded port, the number of milliseconds for which carrier must stay down on an interface before the interface is considered to be down.  Ignored for non-bonded ports.",
83          "type": "integer"},
84        "bond_fake_iface": {
85          "comment": "For a bonded port, whether to create a fake interface with the name of the port.  Use only for compatibility with legacy software that requires this.",
86          "type": "boolean"},
87        "fake_bridge": {
88          "comment": "Does this port represent a sub-bridge for its tagged VLAN within the Bridge?  See ovs-vsctl(8) for more information.",
89          "type": "boolean"},
90        "other_config": {
91          "comment": "Key-value pairs for configuring rarely used port features.  The currently defined key-value pairs are: \"hwaddr\", exactly 12 hex digits in the form \"XX:XX:XX:XX:XX:XX\".",
92          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
93        "external_ids": {
94          "comment": "Key-value pairs that identify this port's role in external systems.  No key-value pairs native to Port are currently defined.  For fake bridges (see the \"fake-bridge\" column), external IDs for the fake bridge are defined here by prefixing their keys with \"fake-bridge\", e.g. \"fake-bridge-xs-network-uuids\".",
95          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}}}},
96    "Interface": {
97      "comment": "An interface within a Port.",
98      "columns": {
99        "name": {
100          "comment": "Interface name.  Should be alphanumeric and no more than about 8 bytes long.  May be the same as the port name, for non-bonded ports.  Must otherwise be unique among the names of ports, interfaces, and bridges on a host.",
101          "type": "string"},
102        "type": {
103          "comment": "The interface type.  Normal network devices, e.g.  eth0, have type \"system\" or \"\" (which are synonyms).  Internal ports have type \"internal\".  TUN/TAP devices have type \"tap\".  GRE devices have type \"gre\".",
104          "type": "string"},
105        "options": {
106          "comment": "Configuration options whose interpretation varies based on \"type\".",
107          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
108        "ingress_policing_rate": {
109          "comment": "Maximum rate for data received on this interface, in kbps.  Set to 0 to disable policing.",
110          "type": "integer"},
111        "ingress_policing_burst": {
112          "comment": "Maximum burst size for data received on this interface, in kb.  The default burst size if set to 0 is 1000 kb.",
113          "type": "integer"},
114        "mac": {
115          "comment": "Ethernet address to set for this interface.  If unset then the default MAC address is used.  May not be supported on all interfaces.  Exactly 12 hex digits in the form XX:XX:XX:XX:XX:XX.",
116          "type": {"key": "string", "min": 0, "max": 1}},
117        "external_ids": {
118          "comment": "Key-value pairs that identify this interface's role in external systems.  The currently defined key-value pairs are: \"xs-vif-uuid\", the UUID of the Citrix XenServer VIF associated with this interface; \"xs-network-uuid\", the UUID of the Citrix XenServer network to which this interface is attached; \"xs-vif-vm-uuid\", the UUID of the Citrix XenServer VM to which this interface belongs; \"xs-vif-mac\", the value of the \"MAC\" field in the Citrix XenServer VIF record for this interface.",
119          "type": {"key": "string", "value": "string", "min": 0, "max": "unlimited"}},
120        "ofport": {
121          "comment": "OpenFlow port number for this interface.  This is populated when the port number becomes known.  Before it is populated its value will be missing.  If the interface cannot be added then this is indicated by a value of -1.",
122          "type": {"key": "integer", "min": 0, "max": 1},
123          "ephemeral": true}}},
124    "Mirror": {
125      "comment": "A port mirror within a Bridge.",
126      "columns": {
127        "name": {
128          "comment": "Arbitrary identifier for the Mirror.",
129          "type": "string"},
130        "select_src_port": {
131          "comment": "Ports on which arriving packets are selected for mirroring.",
132          "type": {"key": "uuid", "min": 0, "max": "unlimited"}},
133        "select_dst_port": {
134          "comment": "Ports on which departing packets are selected for mirroring.",
135          "type": {"key": "uuid", "min": 0, "max": "unlimited"}},
136        "select_vlan": {
137          "comment": "VLANs on which packets are selected for mirroring.",
138          "type": {"key": "integer", "min": 0, "max": 4096}},
139        "output_port": {
140          "comment": "Output port for selected packets.  Mutually exclusive with output_vlan.",
141          "type": {"key": "uuid", "min": 0, "max": 1}},
142        "output_vlan": {
143          "comment": "Output VLAN for selected packets.  Mutually exclusive with output_port.",
144          "type": {"key": "integer", "min": 0, "max": 1}}}},
145    "NetFlow": {
146      "comment": "A NetFlow target.",
147      "columns": {
148        "targets": {
149          "comment": "NetFlow targets in the form \"IP:PORT\".",
150          "type": {"key": "string", "min": 1, "max": "unlimited"}},
151        "engine_type": {
152          "comment": "Engine type to use in NetFlow messages.  Defaults to datapath index if not specified.",
153          "type": {"key": "integer", "min": 0, "max": 1}},
154        "engine_id": {
155          "comment": "Engine ID to use in NetFlow messages.  Defaults to datapath index if not specified.",
156          "type": {"key": "integer", "min": 0, "max": 1}},
157        "add_id_to_interface": {
158          "comment": "Place least-significant 7 bits of engine ID into most significant bits of ingress and egress interface fields of NetFlow records?",
159          "type": "boolean"},
160        "active_timeout": {
161          "comment": "Active timeout interval, in seconds.  A value of 0 requests the default timeout; a negative value disables active timeouts.",
162          "type": "integer"}}},
163    "Controller": {
164      "comment": "An OpenFlow controller.",
165      "columns": {
166        "target": {
167          "comment": "Connection method for controller, e.g. \"ssl:...\", \"tcp:...\".  The special string \"discover\" enables controller discovery.  The special string \"none\" disables the controller.",
168          "type": "string"},
169        "max_backoff": {
170          "comment": "Maximum number of milliseconds to wait between connection attempts.  Default is implementation-specific.",
171          "type": {"key": "integer", "min": 0, "max": 1}},
172        "inactivity_probe": {
173          "comment": "Maximum number of milliseconds of idle time on connection to controller before sending an inactivity probe message.  Default is implementation-specific.",
174          "type": {"key": "integer", "min": 0, "max": 1}},
175        "fail_mode": {
176          "comment": "Either \"standalone\" or \"secure\", or empty to use the implementation's default.",
177          "type": {"key": "string", "min": 0, "max": 1}},
178        "discover_accept_regex": {
179          "comment": "If \"target\" is \"discover\", a POSIX extended regular expression against which the discovered controller location is validated.  If not specified, the default is implementation-specific.",
180          "type": {"key": "string", "min": 0, "max": 1}},
181        "discover_update_resolv_conf": {
182          "comment": "If \"target\" is \"discover\", whether to update /etc/resolv.conf when the controller is discovered.  If not specified, the default is implementation-specific.",
183          "type": {"key": "boolean", "min": 0, "max": 1}},
184        "connection_mode": {
185          "comment": "Either \"in-band\" or \"out-of-band\".  If not specified, the default is implementation-specific.",
186          "type": {"key": "string", "min": 0, "max": 1}},
187        "local_ip": {
188          "comment": "If \"target\" is not \"discover\", the IP address to configure on the local port.",
189          "type": {"key": "string", "min": 0, "max": 1}},
190        "local_netmask": {
191          "comment": "If \"target\" is not \"discover\", the IP netmask to configure on the local port.",
192          "type": {"key": "string", "min": 0, "max": 1}},
193        "local_gateway": {
194          "comment": "If \"target\" is not \"discover\", the IP gateway to configure on the local port.",
195          "type": {"key": "string", "min": 0, "max": 1}},
196        "controller_rate_limit": {
197          "comment": "The maximum rate at which packets will be forwarded to the OpenFlow controller, in packets per second.  If not specified, the default is implementation-specific.",
198          "type": {"key": "integer", "min": 0, "max": 1}},
199        "controller_burst_limit": {
200          "comment": "The maximum number of unused packet credits that the bridge will allow to accumulate, in packets.  If not specified, the default is implementation-specific.",
201          "type": {"key": "integer", "min": 0, "max": 1}}}},
202    "SSL": {
203      "comment": "SSL configuration for an Open_vSwitch.",
204      "columns": {
205        "private_key": {
206          "comment": "Name of a PEM file containing the private key used as the switch's identity for SSL connections to the controller.",
207          "type": "string"},
208        "certificate": {
209          "comment": "Name of a PEM file containing a certificate, signed by the certificate authority (CA) used by the controller and manager, that certifies the switch's private key, identifying a trustworthy switch.",
210          "type": "string"},
211        "ca_cert": {
212          "comment": "Name of a PEM file containing the CA certificate used to verify that the switch is connected to a trustworthy controller.",
213          "type": "string"},
214        "bootstrap_ca_cert": {
215          "comment": "If set to true, then Open vSwitch will attempt to obtain the CA certificate from the controller on its first SSL connection and save it to the named PEM file. If it is successful, it will immediately drop the connection and reconnect, and from then on all SSL connections must be authenticated by a certificate signed by the CA certificate thus obtained.  This option exposes the SSL connection to a man-in-the-middle attack obtaining the initial CA certificate, but it may be useful for bootstrapping.",
216          "type": "boolean"}}}}}