jsonrpc: Make it easy to get a new JSON-RPC request's id.
[cascardo/ovs.git] / vswitchd / vswitch.ovsidl
1 //
2 // This is an ovsdb-idl schema.  The OVSDB IDL compiler, ovsdb-idlc,
3 // can translate it into an OVSDB schema (which simply entails
4 // deleting some members from the schema) or C headers or source for
5 // use with the IDL at runtime.
6 //
7
8 {"name": "ovs_vswitchd_db",
9  "comment": "Configuration for one Open vSwitch daemon.",
10  "tables": {
11    "Open_vSwitch": {
12      "comment": "Configuration for an Open vSwitch daemon.",
13      "columns": {
14        "bridges": {
15          "comment": "Set of bridges managed by the daemon.",
16          "type": {"key": "uuid", "keyRefTable": "Bridge",
17                   "min": 0, "max": "unlimited"}},
18        "management_id": {
19          "comment": "Exactly 12 hex digits that identify the daemon.",
20          "type": "string"},
21        "controller": {
22          "comment": "Default Controller used by bridges.",
23          "type": {"key": "uuid", "keyRefTable": "Controller", "min": 0, "max": 1}},
24        "ssl": {
25          "comment": "SSL used globally by the daemon.",
26          "type": {"key": "uuid", "keyRefTable": "SSL", "min": 0, "max": 1}}}},
27    "Bridge": {
28      "comment": "Configuration for a bridge within an Open_vSwitch.",
29      "columns": {
30        "name": {
31          "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.",
32          "type": "string"},
33        "datapath_id": {
34          "comment": "OpenFlow datapath ID.  Exactly 12 hex digits.",
35          "type": {"key": "string", "min": 0, "max": 1}},
36        "hwaddr": {
37          "comment": "Ethernet address to use for bridge.  Exactly 12 hex digits in the form XX:XX:XX:XX:XX:XX.",
38          "type": {"key": "string", "min": 0, "max": 1}},
39        "ports": {
40          "comment": "Ports included in the bridge.",
41          "type": {"key": "uuid", "keyRefTable": "Port", "min": 0, "max": "unlimited"}},
42        "mirrors": {
43          "comment": "Port mirroring configuration.",
44          "type": {"key": "uuid", "keyRefTable": "Mirror", "min": 0, "max": "unlimited"}},
45        "netflow": {
46          "comment": "NetFlow configuration.",
47          "type": {"key": "uuid", "keyRefTable": "NetFlow", "min": 0, "max": "unlimited"}},
48        "controller": {
49          "comment": "OpenFlow controller.  If unset, defaults to that specified by the parent Open_vSwitch.",
50          "type": {"key": "uuid", "keyRefTable": "Controller", "min": 0, "max": 1}}}},
51    "Port": {
52      "comment": "A port within a Bridge.  May contain a single Interface or multiple (bonded) Interfaces.",
53      "columns": {
54        "name": {
55          "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.",
56          "type": "string"},
57        "interfaces": {
58          "comment": "The Port's Interfaces.  If there is more than one, this is a bonded Port.",
59          "type": {"key": "uuid", "keyRefTable": "Interface", "min": 1, "max": "unlimited"}},
60        "trunks": {
61          "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.",
62          "type": {"key": "integer", "min": 0, "max": 4096}},
63        "tag": {
64          "comment": "This port's implicitly tagged VLAN.  Should be empty if this is a trunk port.",
65          "type": {"key": "integer", "min": 0, "max": 1}},
66        "updelay": {
67          "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.",
68          "type": "integer"},
69        "downdelay": {
70          "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.",
71          "type": "integer"}}},
72    "Interface": {
73      "comment": "An interface within a Port.",
74      "columns": {
75        "name": {
76          "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.",
77          "type": "string"},
78        "internal": {
79          "comment": "An \"internal\" port is one that is implemented in software as a logical device.",
80          "type": "boolean"},
81        "ingress_policing_rate": {
82          "comment": "Maximum rate for data received on this interface, in kbps.  Set to 0 to disable policing.",
83          "type": "integer"},
84        "ingress_policing_burst": {
85          "comment": "Maximum burst size for data received on this interface, in kb.  The default burst size if set to 0 is 10 kb.",
86          "type": "integer"}}},
87    "Mirror": {
88      "comment": "A port mirror within a Bridge.",
89      "columns": {
90        "name": {
91          "comment": "Arbitrary identifier for the Mirror.",
92          "type": "string"},
93        "select_src_port": {
94          "comment": "Ports on which arriving packets are selected for mirroring.",
95          "type": {"key": "uuid", "keyRefTable": "Port", "min": 0, "max": "unlimited"}},
96        "select_dst_port": {
97          "comment": "Ports on which departing packets are selected for mirroring.",
98          "type": {"key": "uuid", "keyRefTable": "Port", "min": 0, "max": "unlimited"}},
99        "select_vlan": {
100          "comment": "VLANs on which packets are selected for mirroring.",
101          "type": {"key": "integer", "min": 0, "max": 4096}},
102        "output_port": {
103          "comment": "Output port for selected packets.  Mutually exclusive with output_vlan.",
104          "type": {"key": "uuid", "keyRefTable": "Port", "min": 0, "max": 1}},
105        "output_vlan": {
106          "comment": "Output VLAN for selected packets.  Mutually exclusive with output_port.",
107          "type": {"key": "integer", "min": 0, "max": 1}}}},
108    "NetFlow": {
109      "comment": "A NetFlow target.",
110      "columns": {
111        "target": {
112          "comment": "NetFlow target in the form \"IP:PORT\".",
113          "type": "string"},
114        "engine_type": {
115          "comment": "Engine type to use in NetFlow messages.  Defaults to datapath index if not specified.",
116          "type": "integer", "min":0, "max":1},
117        "engine_id": {
118          "comment": "Engine ID to use in NetFlow messages.  Defaults to datapath index if not specified.",
119          "type": "integer", "min":0, "max":1},
120        "add_id_to_interface": {
121          "comment": "Place least-significant 7 bits of engine ID into most significant bits of ingress and egress interface fields of NetFlow records?",
122          "type": "boolean"}}},
123    "Controller": {
124      "comment": "An OpenFlow controller.",
125      "columns": {
126        "target": {
127          "comment": "Connection method for controller, e.g. \"ssl:...\", \"tcp:...\".  The special string \"discover\" enables controller discovery.",
128          "type": "string"},
129        "max_backoff": {
130          "comment": "Maximum number of milliseconds to wait between connection attempts.  Default is implementation-specific.",
131          "type": {"key": "integer", "min": 0, "max": 1}},
132        "inactivity_probe": {
133          "comment": "Maximum number of milliseconds of idle time on connection to controller before sending an inactivity probe message.  Default is implementation-specific.",
134          "type": {"key": "integer", "min": 0, "max": 1}},
135        "fail_mode": {
136          "comment": "Either \"standalone\" or \"secure\", or empty to use the implementation's default.",
137          "type": {"key": "string", "min": 0, "max": 1}},
138        "discover_accept_regex": {
139          "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.",
140          "type": {"key": "string", "min": 0, "max": 1}},
141        "discover_update_resolv_conf": {
142          "comment": "If \"target\" is \"discover\", whether to update /etc/resolv.conf when the controller is discovered.  If not specified, the default is implementation-specific.",
143          "type": {"key": "boolean", "min": 0, "max": 1}},
144        "connection_mode": {
145          "comment": "Either \"in-band\" or \"out-of-band\".  If not specified, the default is implementation-specific.",
146          "type": {"key": "string", "min": 0, "max": 1}},
147        "local_ip": {
148          "comment": "If \"target\" is not \"discover\", the IP address to configure on the local port.",
149          "type": {"key": "string", "min": 0, "max": 1}},
150        "local_netmask": {
151          "comment": "If \"target\" is not \"discover\", the IP netmask to configure on the local port.",
152          "type": {"key": "string", "min": 0, "max": 1}},
153        "local_gateway": {
154          "comment": "If \"target\" is not \"discover\", the IP gateway to configure on the local port.",
155          "type": {"key": "string", "min": 0, "max": 1}},
156        "controller_rate_limit": {
157          "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.",
158          "type": {"key": "integer", "min": 0, "max": 1}},
159        "controller_burst_limit": {
160          "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.",
161          "type": {"key": "integer", "min": 0, "max": 1}}}},
162    "SSL": {
163      "comment": "SSL configuration for an Open_vSwitch.",
164      "columns": {
165        "private_key": {
166          "comment": "Name of a PEM file containing the private key used as the switch's identity for SSL connections to the controller.",
167          "type": "string"},
168        "certificate": {
169          "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.",
170          "type": "string"},
171        "ca_cert": {
172          "comment": "Name of a PEM file containing the CA certificate used to verify that the switch is connected to a trustworthy controller.",
173          "type": "string"}}}}}