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