d303a2b30284a460011e59d73aec5be919fa433e
[ovsdb.git] / southbound / southbound-api / src / main / yang / ovsdb.yang
1 module ovsdb {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:ovsdb";
4     prefix "southbound";
5
6     import network-topology {prefix "topo"; revision-date "2013-10-21"; }
7     import yang-ext { prefix "ext"; }
8     import ietf-inet-types { prefix inet; revision-date 2010-09-24; }
9     import overlay { prefix overlay; }
10     import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
11     import opendaylight-l2-types { prefix ethertype; revision-date "2013-08-27";}
12
13     revision "2015-01-05" {
14         description "Initial revision of southbound model";
15     }
16
17     typedef ovsdb-termination-point-ref {
18         description "A reference to an ovsdb termination point";
19         type instance-identifier;
20     }
21
22     typedef ovsdb-bridge-ref {
23         description "A reference to an ovsdb bridge";
24         type instance-identifier;
25     }
26
27     typedef ovsdb-node-ref {
28         description "A reference to an ovsdb node";
29         type instance-identifier;
30     }
31
32     typedef flow-node-ref {
33         description "A reference to a flow node";
34         type instance-identifier;
35     }
36
37     typedef ovsdb-bridge-name {
38         type string;
39     }
40
41     typedef datapath-id {
42         type string {
43           pattern
44             '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){7}';
45         }
46         description
47           "The datapath-d type represents OpenFlow datapath-id .
48         The canonical representation uses lowercase characters.
49
50         In the value set and its semantics, this type is similar
51         to the MacAddress textual convention of the SMIv2, but with
52         16 extra bits";
53         reference
54           "Openflow 1.3.0 Spec
55            IEEE 802: IEEE Standard for Local and Metropolitan Area
56                 Networks: Overview and Architecture
57            RFC 2579: Textual Conventions for SMIv2";
58     }
59
60     identity datapath-type-base {
61         description "Base identity for all OVSDB datapath types";
62     }
63
64     identity datapath-type-system {
65         description "Datapath type for the kernel datapath";
66         base datapath-type-base;
67     }
68
69     identity datapath-type-netdev {
70         description "Datapath type for the userspace datapath";
71         base datapath-type-base;
72     }
73
74     identity ovsdb-bridge-protocol-base {
75         description "Base identity for all ovsdb-bridge-protocols";
76     }
77
78     identity ovsdb-bridge-protocol-openflow-10 {
79         description "Ovsdb bridge protocol OpenFlow 1.0";
80         base ovsdb-bridge-protocol-base;
81     }
82
83     identity ovsdb-bridge-protocol-openflow-11 {
84         description "Ovsdb bridge protocol OpenFlow 1.1";
85         base ovsdb-bridge-protocol-base;
86     }
87
88     identity ovsdb-bridge-protocol-openflow-12 {
89         description "Ovsdb bridge protocol OpenFlow 1.2";
90         base ovsdb-bridge-protocol-base;
91     }
92
93     identity ovsdb-bridge-protocol-openflow-13 {
94         description "Ovsdb bridge protocol OpenFlow 1.3";
95         base ovsdb-bridge-protocol-base;
96     }
97
98     identity ovsdb-bridge-protocol-openflow-14 {
99         description "Ovsdb bridge protocol OpenFlow 1.4";
100         base ovsdb-bridge-protocol-base;
101     }
102
103     identity ovsdb-bridge-protocol-openflow-15 {
104         description "Ovsdb bridge protocol OpenFlow 1.5";
105         base ovsdb-bridge-protocol-base;
106     }
107
108     identity ovsdb-fail-mode-base {
109         description "Base identity for ovsdb-failmode";
110     }
111
112     identity ovsdb-fail-mode-standalone {
113         description "Identity for ovsdb-failmode standalone";
114         base ovsdb-fail-mode-base;
115     }
116
117     identity ovsdb-fail-mode-secure {
118         description "Identity for ovsdb-failmode standalone";
119         base ovsdb-fail-mode-base;
120     }
121
122     grouping ovsdb-bridge-attributes {
123         leaf bridge-uuid {
124             description "The unique identifier of the bridge";
125             type yang:uuid;
126         }
127         leaf bridge-openflow-node-ref {
128             description "A reference to the openflow node";
129             type instance-identifier;
130         }
131
132         leaf bridge-name {
133             description "The name of the bridge";
134             type ovsdb-bridge-name;
135         }
136         list protocol-entry {
137             key "protocol";
138             leaf protocol {
139                 description "Protocol bridge should seek to speak to its controller";
140                 type identityref {
141                     base ovsdb-bridge-protocol-base;
142                 }
143             }
144         }
145
146         list controller-entry {
147             description "Bridge controller info";
148             key "target";
149             leaf target {
150                 description "Uri telling bridge how to connect to controller";
151                 type inet:uri;
152             }
153             leaf controller-uuid {
154                 description "The unique identifier of the controller";
155                 type yang:uuid;
156             }
157             leaf is-connected {
158                 type boolean;
159             }
160
161         }
162
163         leaf datapath-id {
164             description "Datapath-id of the bridge";
165             type datapath-id;
166         }
167
168         leaf datapath-type {
169             description "The datapath type of the bridge";
170             type identityref {
171                 base datapath-type-base;
172             }
173         }
174
175         leaf fail-mode {
176             description "Failmode of the bridge";
177             type identityref {
178                 base ovsdb-fail-mode-base;
179             }
180         }
181
182         leaf flow-node {
183             description "Flow node corresponding to this bridge";
184             type flow-node-ref;
185         }
186
187         leaf managed-by {
188             description "The OVSDB which this bridge belongs to";
189             type ovsdb-node-ref;
190         }
191
192         list bridge-external-ids {
193             description
194                "Key-value pairs for use by external frameworks that integrate
195             with Open vSwitch.
196
197             external_ids : bridge-id: optional string
198
199             A unique identifier of the bridge. On Citrix XenServer this
200             will commonly be the same as external_ids:xs-network-uuids.
201
202             external_ids : xs-network-uuids: optional string
203
204             Semicolon-delimited set of universally unique identifier(s)
205             for the network with which this bridge is associated on a
206             Citrix XenServer host. The network identifiers are RFC 4122
207             UUIDs as displayed by, e.g., xe network-list.";
208
209             key "bridge-external-id-key";
210             leaf bridge-external-id-key {
211                 description "external-id name/key";
212                 type string;
213                 mandatory true;
214             }
215             leaf bridge-external-id-value {
216                 description "bridge-external-id value";
217                 type string;
218                 mandatory true;
219             }
220         }
221
222         list bridge-other-configs {
223             description
224                "Key-value pairs for configuring rarely used features.
225
226             other_config : hwaddr: optional string
227                An Ethernet address in the form xx:xx:xx:xx:xx:xx to set the
228                hardware address of the local port and influence the datapath
229                ID.
230
231             other_config : forward-bpdu: optional string
232                either true or false. Option to allow forwarding of BPDU frames when NORMAL
233                action is invoked. Frames with reserved Ethernet
234                addresses (e.g. STP BPDU) will be forwarded when this option
235                is enabled and the switch is not providing that functionality.
236
237             other_config : mac-aging-time: optional string
238                containing an integer, at least 1 The maximum number of seconds to retain a
239                MAC learning entry for which no packets have been seen. The
240                default is currently 300 seconds (5 minutes). The value, if
241                specified, is forced into a reasonable range, currently 15
242                   to 3600 seconds.
243
244             other_config : mac-table-size: optional string
245                containing an integer, at least 1 The maximum number of MAC addresses to
246                learn. The default is currently 2048. The value, if
247                specified, is forced into a reasonable range, currently 10
248                to 1,000,000.
249
250             other_config : datapath-id: optional string
251                Exactly 16 hex digits to set the OpenFlow datapath ID to a
252                specific value. May not be all-zero.
253
254             other_config : dp-desc: optional string
255                Human readable description of datapath. It it a maximum
256                256 byte-long free-form string to describe the datapath for
257                debugging purposes.
258
259             other_config : disable-in-band: optional string
260                either true or false
261                If set to true, disable in-band control on the bridge
262                regardless of controller and manager settings.
263
264             other_config : in-band-queue: optional string
265                containing an integer, in range 0 to 4,294,967,295 A queue ID as a
266                nonnegative integer.
267
268              other_config : stp-system-id: optional string
269                 The bridge's STP identifier (the lower 48 bits of the
270                 bridge-id) in the form xx:xx:xx:xx:xx:xx. By default, the
271                 identifier is the MAC address of the bridge.
272
273              other_config : stp-priority: optional string
274                 containing an integer, in range 0 to 65,535 The bridge's relative priority
275                 value for determining the root bridge (the upper 16 bits of
276                 the bridgeid).  A bridge with the lowest bridge-id is elected
277                 the root. By default, the priority is 0x8000.
278
279              other_config : stp-hello-time: optional string
280                 containing an integer, in range 1 to 10 The interval between transmissions
281                 of hello messages by designated ports, in seconds. By default
282                 the hello interval is 2 seconds.
283
284              other_config : stp-max-age: optional string
285                 containing an integer, in range 6 to 40 The maximum age of the information
286                 transmitted by the bridge when it is the root bridge, in
287                 seconds.  By default, the maximum age is 20 seconds.
288
289              other_config : stp-forward-delay: optional string
290                 containing an integer, in range 4 to 30 The delay to wait between
291                 transitioning root and designated ports to forwarding, in
292                 seconds. By default, the forwarding delay is 15 seconds.
293
294              other_config : mcast-snooping-aging-time: optional string,
295                 containing an integer, at least 1 The maximum number of
296                 seconds to retain a multicast snooping entry for which no
297                 packets have been seen. The default is currently 300
298                 seconds (5 minutes). The value, if specified, is forced into
299                 a reasonable range, currently 15 to 3600 seconds.
300
301              other_config : mcast-snooping-table-size: optional string,
302                 containing an integer, at least 1 The maximum number of
303                 multicast snooping addresses to learn. The default is
304                 currently 2048.  The value, if specified, is forced into a
305                 reasonable range, currently 10 to 1,000,000.
306
307              other_config : mcast-snooping-disable-flood-unregistered:
308                 optional string, either true or false If set to false,
309                 unregistered multicast packets are forwarded to all ports.
310                 If set to true, unregistered multicast packets are forwarded
311                 to ports connected to multicast routers.";
312
313             key "bridge-other-config-key";
314             leaf bridge-other-config-key {
315                 description "bridge-other-config name/key";
316                 type string;
317             }
318             leaf bridge-other-config-value {
319                 description "bridge-other-config value";
320                 type string;
321             }
322         }
323
324         leaf auto-attach {
325             description "The unique identifier of the auto_attach entry for this bridge.";
326             type yang:uuid;
327         }
328     }
329
330     grouping ovsdb-connection-info-attributes {
331           leaf remote-ip {
332             type inet:ip-address;
333             description "Ovsdb Connection Remote IP";
334           }
335           leaf remote-port {
336             type inet:port-number;
337             description "Ovsdb Connection Remote Port Number";
338           }
339           leaf local-ip {
340             type inet:ip-address;
341             description "Ovsdb Connection Local IP";
342           }
343           leaf local-port {
344             type inet:port-number;
345             description "Ovsdb Connection Local Port Number IP";
346           }
347     }
348
349     grouping ovsdb-node-attributes {
350         description "Plugin will not allow multiple connections to the same device.
351         If an application attempts to make more than one connection to the device by
352         putting multiple entries in the config data store, then it is the responsibility
353         of the application to clean the config data store";
354         container connection-info{
355             uses ovsdb-connection-info-attributes;
356         }
357
358         leaf db-version {
359             description "The database schema version";
360             type string;
361         }
362
363         leaf ovs-version {
364             description "The Open_vSwitch version number";
365             type string;
366         }
367
368         list managed-node-entry {
369             key "bridge-ref";
370             leaf bridge-ref {
371                 type ovsdb-bridge-ref;
372             }
373         }
374
375         list datapath-type-entry {
376             key "datapath-type";
377             leaf datapath-type {
378                 description "Datapath types supported by OVSDB node";
379                 type identityref {
380                     base datapath-type-base;
381                 }
382             }
383         }
384
385         list interface-type-entry {
386             key "interface-type";
387             leaf interface-type {
388                 description "Interface types supported by OVSDB node";
389                 type identityref {
390                     base interface-type-base;
391                 }
392             }
393         }
394
395         list openvswitch-external-ids {
396             description "Key-value pairs for use by external frameworks that integrate
397                   with Open vSwitch.
398
399             external_ids : system-id: optional string
400                A unique identifier for the Open vSwitch's physical host.
401                The form of the identifier depends on the type of the host.
402                On a Citrix XenServer, this will likely be the same as
403                external_ids:xs-system-uuid.
404
405            external_ids : xs-system-uuid: optional string
406                The Citrix XenServer universally unique identifier for the
407                 physical host as displayed by xe-host-list.";
408
409             key "external-id-key";
410             leaf external-id-key {
411                 description "external-id name/key";
412                 type string;
413                 mandatory true;
414             }
415             leaf external-id-value {
416                 description "external-id value";
417                 type string;
418                 mandatory true;
419             }
420         }
421
422         list openvswitch-other-configs {
423             description "Key-value pairs for configuring rarely used features.
424
425             other_config : stats-update-interval: optional string
426                This option will affect the update of the statistics column
427                in the following tables: Port, Interface , Mirror.
428
429             other_config : flow-restore-wait: optional string
430                either true or false When ovs-vswitchd starts up, it has an empty flow
431                table and therefore it handles all arriving packets in its
432                default fashion according to its configuration, by
433                dropping them or sending them to an OpenFlow controller or
434                switching them as a standalone switch.
435
436             other_config : flow-limit: optional string
437                containing an integer, at least 0. The maximum number of flows allowed in
438                the datapath flow table.
439
440             other_config : n-dpdk-rxqs: optional string
441                containing an integer, at least 1 Specifies the number of rx queues to be
442                created for each dpdk interface. If not specified or
443                specified to 0, one rx queue will be created for each dpdk
444                interface by default.
445
446             other_config : pmd-cpu-mask: optional string
447                Specifies CPU mask for setting the cpu affinity of
448                PMD (Poll Mode Driver) threads. Value should be in the form
449                of hex string, similar to the dpdk EAL '-c COREMASK' option
450                input or the 'taskset' mask input.
451
452             other_config : n-handler-threads: optional string
453                containing an integer, at least 1 Specifies the number of threads for
454                software datapaths to use for handling new flows. The default
455                the number of online CPU cores minus the number of
456                revalidators.
457
458             other_config : n-revalidator-threads: optional string,
459                containing an integer, at least 1 Specifies the number of
460                threads for software datapaths to use for revalidating flows
461                in the datapath.
462
463              other_config : enable-statistics: optional string
464                 either ture or false. Set this value to true to enable populating the
465                 statistics column or to false to explicitly disable it.";
466
467             key "other-config-key";
468             leaf other-config-key {
469                 description "other-config name/key";
470                 type string;
471             }
472             leaf other-config-value {
473                 description "other-config value";
474                 type string;
475             }
476          }
477
478          list manager-entry {
479             description "Node managers info";
480             config false;
481             key "target";
482             leaf target {
483                 description "Uri that user set to connect to the controller";
484                 type inet:uri;
485             }
486             leaf connected {
487                 type boolean;
488             }
489             leaf number_of_connections {
490                 type uint32;
491             }
492         }
493
494         list qos-entries {
495             key "qos-id";
496             leaf qos-id {
497                 description "An identifier used for QoS entries in the MD-SAL.";
498                 type inet:uri;
499             }
500             leaf qos-uuid {
501                 description "The unique identifier of the QoS.";
502                 type yang:uuid;
503             }
504             leaf qos-type {
505                 type identityref {
506                     base qos-type-base;
507                 }
508             }
509             list queue-list {
510                 description "The list of queues used by the QoS";
511                 key "queue-number";
512                 leaf queue-number {
513                     description "The queue number of the record in the QoS entry";
514                     type uint32;
515                 }
516
517                 leaf queue-uuid {
518                     description "The unique identifier of the queue record.";
519                     type yang:uuid;
520                 }
521             }
522             list qos-external-ids {
523                 key "qos-external-id-key";
524                 leaf qos-external-id-key {
525                     description "qos external-id name/key";
526                     type string;
527                     mandatory true;
528                 }
529                 leaf qos-external-id-value {
530                     description "qos-external-id value";
531                     type string;
532                     mandatory true;
533                 }
534             }
535             list qos-other-config {
536                 description "
537                     other_config : max-rate
538                         optional string, containing an integer.";
539
540                 key "other-config-key";
541                 leaf other-config-key {
542                     description "qos-other-config name/key";
543                     type string;
544                 }
545                 leaf other-config-value {
546                     description "qos-other-config value";
547                     type string;
548                 }
549             }
550         }
551
552         list queues {
553             key "queue-id";
554             leaf queue-id {
555                 description "An identifier used for Queue entries in the MD-SAL.";
556                 type inet:uri;
557             }
558             leaf queue-uuid {
559                 description "The unique identifier of the queue.";
560                 type yang:uuid;
561             }
562             leaf dscp {
563                 type uint8;
564             }
565             list queues-external-ids {
566                 key "queues-external-id-key";
567                 leaf queues-external-id-key {
568                     description "queues external-id name/key";
569                     type string;
570                     mandatory true;
571                 }
572                 leaf queues-external-id-value {
573                     description "queues-external-id value";
574                     type string;
575                     mandatory true;
576                 }
577             }
578             list queues-other-config {
579                 description "
580                 Configuration for linux-htb QoS:
581
582                 other_config : min-rate optional string
583                     containing an integer, at least 1.
584                     Minimum guaranteed bandwidth, in bit/s.
585
586                 other_config : max-rate optional string
587                     containing an integer, at least 1.
588                     Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed
589                     to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no
590                     limit.
591
592                 other_config : burst optional string
593                     containing an integer, at least 1.
594                     Burst size, in bits. This is the maximum amount of ''credits'' that a queue can accumulate while it
595                     is idle. Optional. Details of the linux-htb implementation require a minimum burst size, so a
596                     too-small burst will be silently ignored.
597
598                 other_config : priority optional string.
599                     containing an integer, in range 0 to 4,294,967,295.
600                     A queue with a smaller priority will receive all the excess bandwidth that it can use before a
601                     queue with a larger value receives any. Specific priority values are unimportant; only relative
602                     ordering matters. Defaults to 0 if unspecified.
603
604                 Configuration for linux-htb QoS:
605
606                 other_config : min-rate optional string
607                     containing an integer, at least 1.
608                     Minimum guaranteed bandwidth, in bit/s.
609
610                 other_config : max-rate optional string
611                     containing an integer, at least 1.
612                     Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed
613                     to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no
614                     limit..";
615
616                 key "queue-other-config-key";
617                 leaf queue-other-config-key {
618                     type string;
619                 }
620                 leaf queue-other-config-value {
621                     type string;
622                 }
623             }
624         }
625
626         list autoattach {
627             key "autoattach-id";
628             leaf autoattach-id {
629                 description "An identifier used for AutoAttach table in the MD-SAL.";
630                 type inet:uri;
631             }
632             leaf bridge-id {
633                 description "Node-id of the Bridge table from where Autoattach table can be referenced.";
634                 type inet:uri;
635             }
636             leaf autoattach-uuid {
637                 description "The unique identifier of the autoattach table.";
638                 type yang:uuid;
639             }
640             leaf system-name {
641                 type string;
642                 description "The  system_name string is exported in LLDP messages.
643                     It should uniquely identify the bridge in the network.";
644             }
645             leaf system-description {
646                 type string;
647                 description "The system_description string is exported in LLDP messages.
648                     It should describe the type of software and hardware.";
649             }
650             list mappings {
651                 description "Map  of integer-integer pairs, key in range 0 to 16,777,215,
652                     value in range 0 to 4,095. A mapping from SPB network Individual Service
653                     Identifier  (ISID) to VLAN id.";
654                 key "mappings-key";
655                 leaf mappings-key {
656                     type uint32 {
657                         range "0..16777215";
658                     }
659                 }
660                 leaf mappings-value {
661                     type uint16 {
662                         range "0..4095";
663                     }
664                 }
665             }
666             list autoattach-external-ids {
667                 description
668                    "Key-value pairs for use by external frameworks that integrate with
669                     Open vSwitch, rather than by Open vSwitch itself.";
670
671                 key "autoattach-external-id-key";
672                 leaf autoattach-external-id-key {
673                     description "external-id name/key";
674                     type string;
675                     mandatory true;
676                 }
677                 leaf autoattach-external-id-value {
678                     description "autoattach-external-id value";
679                     type string;
680                     mandatory true;
681                 }
682             }
683         }
684      }
685
686     identity interface-type-base {
687         description "Base identity for all OVSDB interface types";
688     }
689
690     identity interface-type-system {
691         description "Interface type for system interfaces";
692         base interface-type-base;
693     }
694
695     identity interface-type-internal {
696         description "Interface type for internal interfaces";
697         base interface-type-base;
698     }
699
700     identity interface-type-vxlan {
701         description "Interface type for vxlan interfaces";
702         base interface-type-base;
703     }
704
705     identity interface-type-vxlan-gpe {
706         description "Interface type for vxlan gpe interfaces";
707         base interface-type-base;
708     }
709
710     identity interface-type-patch {
711         description "Interface type for patch interfaces";
712         base interface-type-base;
713     }
714
715     identity interface-type-tap {
716         description "Interface type for tun/tap interfaces";
717         base interface-type-base;
718     }
719
720     identity interface-type-geneve {
721         description "Interface type for geneve interfaces";
722         base interface-type-base;
723     }
724
725     identity interface-type-gre {
726         description "Interface type for gre interfaces";
727         base interface-type-base;
728     }
729
730     identity interface-type-ipsec-gre {
731         description "Interface type for ipsec-gre interfaces";
732         base interface-type-base;
733     }
734
735     identity interface-type-gre64 {
736         description "Interface type for gre64 interfaces";
737         base interface-type-base;
738     }
739
740     identity interface-type-ipsec-gre64 {
741         description "Interface type for ipsec-gre64 interfaces";
742         base interface-type-base;
743     }
744
745     identity interface-type-lisp {
746         description "Interface type for lisp interfaces";
747         base interface-type-base;
748     }
749
750     identity interface-type-dpdk {
751         description "Interface type for dpdk interfaces";
752         base interface-type-base;
753     }
754
755     identity interface-type-dpdkr {
756         description "Interface type for dpdk ring interfaces";
757         base interface-type-base;
758     }
759
760     identity interface-type-dpdkvhost {
761         description "Interface type for dpdkvhost interfaces";
762         base interface-type-base;
763     }
764
765     identity interface-type-dpdkvhostuser {
766         description "Interface type for dpdkvhostuser interfaces";
767         base interface-type-base;
768     }
769
770     identity interface-type-stt {
771         description "Interface type for stt interfaces";
772         base interface-type-base;
773     }
774
775     identity qos-type-base {
776         description "the base identity for qos";
777     }
778
779     identity qos-type-linux-htb {
780         description "linux hierarchy token bucket classifier";
781         base qos-type-base;
782     }
783
784     identity qos-type-linux-hfsc {
785         description "linux hierarchical fair service curve classifier";
786         base qos-type-base;
787     }
788
789     grouping ovsdb-port-interface-attributes {
790         leaf port-uuid {
791             description "The unique identifier of the OVSDB port";
792             type yang:uuid;
793         }
794
795         leaf interface-uuid {
796             description "The unique identifier of the OVSDB interface";
797             type yang:uuid;
798         }
799
800         leaf name {
801             description "The name of the OVSDB port/interface";
802             type string;
803         }
804
805         leaf interface-type {
806             description "The type of the OVSDB interface";
807             type identityref {
808                 base interface-type-base;
809             }
810         }
811
812         list options {
813             description "Port/Interface related optional input values";
814             key "option";
815             leaf option {
816                 description "Option name";
817                 type string;
818             }
819             leaf value {
820                 description "Option value";
821                 type string;
822             }
823         }
824
825         leaf ofport {
826             description "Port/Interface related optional ofport";
827             type uint32;
828         }
829
830         leaf ofport_request {
831             description "Port/Interface related optional ofport_request, in range 1 to 65279";
832             type uint16 {
833                 range "1..65279";
834             }
835         }
836
837         leaf vlan-tag {
838             description "The VLAN tag of the termination point.";
839             type ethertype:vlan-id;
840         }
841
842         list trunks {
843             description "Represents the trunks of a termination point.";
844             leaf trunk {
845                 type ethertype:vlan-id;
846             }
847         }
848
849         leaf vlan-mode {
850             description "The VLAN mode of the termination point.";
851             type enumeration {
852                 enum "access" {
853                     value 1;
854                     description
855                         "The VLAN mode access.";
856                 }
857                 enum "native-tagged" {
858                     value 2;
859                     description
860                         "The VLAN mode native-tagged.";
861                 }
862                 enum "native-untagged" {
863                     value 3;
864                     description
865                         "The VLAN mode native-untagged.";
866                 }
867                 enum "trunk" {
868                     value 4;
869                     description
870                         "The VLAN mode trunk.";
871                 }
872             }
873         }
874
875         list port-other-configs {
876             description "Other config attributes for Ports
877
878             other_config : priority-tags: optional string
879                either true or false An 802.1Q header contains two important pieces of
880                information: a VLAN ID and a priority.
881
882             other_config : bond-hash-basis: optional string
883                containing an integer An integer hashed along with flows when choosing output
884                slaves in load balanced bonds. When changed, all flows will be
885                assigned different hash values possibly causing slave selection
886                decisions to change.
887
888             other_config : bond-detect-mode: optional string
889                either miimon or carrier The means used to detect link failures. Defaults to
890                carrier which uses each interface's carrier to detect failures.
891                When set to miimon, will check for failures by polling each
892                interface's MII.
893
894             other_config : bond-miimon-interval: optional string
895                containing an integer The interval, in milliseconds, between successive
896                attempts to poll each interface's MII. Relevant only when
897                other_config:bond-detect-mode is miimon
898
899             other_config : lacp-system-id: optional string
900                The LACP system ID of this Port. The system ID of a LACP bond
901                is used to identify itself to its partners. Must be a nonzero
902                MAC address. Defaults to the bridge Ethernet address if unset.
903
904             other_config : lacp-system-priority: optional string
905                containing an integer, in range 1 to 65,535 The LACP system priority of this
906                Port. In LACP negotiations, link status decisions are made by
907                the system with the numerically lower priority.
908
909             other_config : lacp-time: optional string
910                 either slow or fast. The LACP timing which should be used on this Port. By default
911                 slow is used. When configured to be fast LACP heartbeats are
912                 requested at a rate of once per second causing connectivity
913                 problems to be detected more quickly. In slow mode, heartbeats
914                 are requested at a rate of once every 30 seconds.
915
916             other_config : lacp-fallback-ab: optional string
917                 either true or false Determines the behavior of openvswitch bond in LACP mode.
918                 If the partner switch does not support LACP, setting this
919                 option to true allows openvswitch to fallback to active-backup.
920                 If the option is set to false, the bond will be disabled.
921                 In both the cases, once the partner switch is configured
922                 to LACP mode, the bond will use LACP.
923
924             other_config : bond-rebalance-interval: optional string,
925                 containing an integer, in range 0 to 10,000 For a load
926                 balanced bonded port, the number of milliseconds between
927                 successive attempts to rebalance the bond, that is, to move
928                 flows from one interface on the bond to another in an attempt
929                 to keep usage of each interface roughly equal. If zero, load
930                 balancing is disabled on the bond (link failure still cause
931                 flows to move). If less than 1000ms, the rebalance interval
932                 will be 1000ms.
933
934             other_config : stp-enable: optional string
935                either true or false. If spanning tree is enabled on the bridge, member ports are
936                enabled by default (with the exception of bond, internal, and
937                mirror ports which do not work with STP). If this column's
938                value is false spanning tree is disabled on the port.
939
940             other_config : stp-port-num: optional string
941                containing an integer, in range 1 to 255 The port number used for the lower 8
942                bits of the port-id. By default, the numbers will be assigned
943                automatically. If any port's number is manually configured on
944                a bridge, then they must all be.
945
946             other_config : stp-port-priority: optional string
947                containing an integer, in range 0 to 255 The port's relative priority value
948                for determining the root port (the upper 8 bits of the port-id).
949
950             other_config : stp-path-cost: optional string
951                 containing an integer, in range 0 to 65,535 Spanning tree path cost for the
952                 port. A lower number indicates a faster link. By default, the
953                 cost is based on the maximum speed of the link.
954
955              other_config : rstp-enable: optional string
956                  either true or false
957                  If rapid spanning tree is enabled on the bridge, member ports
958                  are enabled by default (with the exception of bond, internal,
959                  and mirror ports which do not work with RSTP). If this
960                  column's value is false rapid spanning tree is disabled on
961                  the port.
962
963              other_config : rstp-port-priority: optional string
964                  containing an integer, in range 0 to 240 The port's relative priority value
965                  for determining the root port, in multiples of 16. By default,
966                  the port priority is 0x80 (128).
967
968              other_config : rstp-port-num: optional string
969                  containing an integer, in range 1 to 4,095 The local RSTP port number, used
970                  as the lower 12 bits of the port-id.
971
972              other_config : rstp-port-path-cost: optional string
973                  containing an integer The port path cost. The Port's contribution, when it
974                  is the Root Port, to the Root Path Cost for the Bridge.
975
976              other_config : rstp-port-admin-edge: optional string
977                  either true or false
978
979              other_config : rstp-port-auto-edge: optional string
980                  either true or false The auto edge port parameter for the Port. Default
981                  is true.
982
983              other_config : rstp-port-mcheck: optional string
984                  either true or false The mcheck port parameter for the Port. Default is false.
985
986               other_config : mcast-snooping-flood: optional string
987                   either true or false If set to true, multicast packets are
988                   unconditionally forwarded to the specific port";
989
990             key "other-config-key";
991             leaf other-config-key {
992                 description "port-other-config name/key";
993                 type string;
994             }
995             leaf other-config-value {
996                 description "port-other-config value";
997                 type string;
998             }
999         }
1000
1001         list interface-other-configs {
1002             description "Other config attributes for Interfaces
1003
1004             other_config : enable-vlan-splinters: optional string
1005                either true or false. Set to true to enable VLAN splinters on this
1006                interface. Defaults to false.";
1007
1008             key "other-config-key";
1009             leaf other-config-key {
1010                 description "interface-other-config name/key";
1011                 type string;
1012             }
1013             leaf other-config-value {
1014                 description "interface-other-config value";
1015                 type string;
1016             }
1017         }
1018
1019         list port-external-ids {
1020             description "Port external ids
1021
1022             external_ids : fake-bridge-id-*: optional string
1023                External IDs for a fake bridge (see the fake_bridge column) are defined by
1024                prefixing a Bridge external_ids key with
1025                fake-bridge-, e.g. fake-bridge-xs-network-uuids.";
1026
1027             key "external-id-key";
1028             leaf external-id-key {
1029                 description "external-id name/key";
1030                 type string;
1031                 mandatory true;
1032             }
1033             leaf external-id-value {
1034                 description "external-id value";
1035                 type string;
1036                 mandatory true;
1037             }
1038         }
1039
1040         list interface-external-ids {
1041             description "Interface external ids
1042
1043             external_ids : attached-mac: optional string.
1044                The MAC address programmed into the ''virtual hardware'' for this interface, in
1045                the form xx:xx:xx:xx:xx:xx. For Citrix XenServer, this is the
1046                value of the MAC field in the VIF record for this interface.
1047
1048             external_ids : iface-id: optional string.
1049                A system-unique identifier for the interface. On XenServer, this will commonly
1050                be the same as external_ids:xs-vif-uuid.
1051
1052             external_ids : iface-status: optional string
1053                either active or inactive Hypervisors may sometimes have more than one interface
1054                associated with a given external_ids:iface-id, only one of
1055                which is actually in use at a given time.
1056
1057             external_ids : xs-vif-uuid: optional string.
1058                The virtual interface associated with this interface.
1059
1060             external_ids : xs-network-uuid: optional string.
1061                The virtual network to which this interface is attached.
1062
1063             external_ids : vm-id: optional string.
1064                The VM to which this interface belongs. On XenServer, this will be the same as
1065                external_ids:xsvm-uuid.
1066
1067             external_ids : xs-vm-uuid: optional string.
1068                The VM to which this interface belongs";
1069
1070             key "external-id-key";
1071             leaf external-id-key {
1072                 description "external-id name/key";
1073                 type string;
1074                 mandatory true;
1075             }
1076             leaf external-id-value {
1077                 description "external-id value";
1078                 type string;
1079                 mandatory true;
1080             }
1081         }
1082
1083         list interface-lldp {
1084             description "Auto Attach configuration for a particular interface.
1085                 If LLDP is enabled on an interface, the interface processes received
1086                 LLDP packets and never passes them to OpenFlow or forwards them.
1087
1088                 lldp : enable: optional string, either true or false
1089                        True to enable LLDP on this Interface. If not specified, LLDP
1090                        will be disabled by default.";
1091
1092             key "lldp-key";
1093             leaf lldp-key {
1094                 description "lldp name/key";
1095                 type string;
1096             }
1097             leaf lldp-value {
1098                 description "lldp value";
1099                 type string;
1100             }
1101         }
1102
1103         list interface-bfd {
1104             description "BFD configuration for a particular interface.
1105                 BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
1106                 detection of connectivity failures by occasional transmission of
1107                 BFD control messages.
1108
1109                 bfd : enable: optional string, either true or false
1110                        True to enable BFD on this Interface. If not specified, BFD
1111                        will be disabled by default.
1112
1113                 bfd : min_rx: optional string
1114                        containing an integer, at least 1.
1115                        The shortest interval, in milliseconds, at which this BFD session
1116                        offers to receive BFD control messages.  The remote endpoint may
1117                        choose to send messages at a slower rate.  Defaults to 1000.
1118
1119                 bfd : min_tx: optional string
1120                        containing an integer, at least 1.
1121                        The shortest interval, in milliseconds, at which this BFD session is
1122                        willing to transmit BFD control messages.  Messages will actually be
1123                        transmitted at a slower rate if the remote endpoint is not willing to
1124                        receive as quickly as specified.  Defaults to 100.
1125
1126                 bfd : decay_min_rx: optional string
1127                        containing an integer
1128                        An alternate receive interval, in milliseconds, that must be greater
1129                        than or equal to bfd:min_rx.  The implementation switches from
1130                        bfd:min_rx to bfd:decay_min_rx when there is no obvious incoming
1131                        data traffic at the interface, to reduce the CPU and bandwidth cost
1132                        of monitoring an idle interface.  This feature may be disabled by
1133                        setting a value of 0. This feature is reset whenever bfd:decay_min_rx
1134                        bfd:min_rx changes.
1135
1136                 bfd : forwarding_if_rx: optional string, either true or false
1137                        When true, traffic received on the Interface is used to
1138                        indicate the capability of packet I/O. BFD control packets are
1139                        still transmitted and received.  At least one BFD control
1140                        packet must be received every 100 * bfd:min_rx amount of time.
1141                        Otherwise, even if traffic are received, the bfd-status:forwarding
1142                        will be false.
1143
1144                 bfd : cpath_down: optional string, either true or false
1145                        Set to true to notify the remote endpoint that traffic should not be
1146                        forwarded to this system for some reason other than a connectivity
1147                        failure on the interface being monitored.  The typical underlying
1148                        reason is concatenated path down, that is, that connectivity
1149                        beyond the local system is down.  Defaults to false.
1150
1151                 bfd : cpath_down: optional string, either true or false
1152                        Set to true to notify the remote endpoint that traffic should not be
1153                        forwarded to this system for some reason other than a connectivity
1154                        failure on the interface being monitored.  The typical underlying
1155                        reason is concatenated path down, that is, that connectivity
1156                        beyond the local system is down.  Defaults to false.
1157
1158                 bfd : check_tnl_key: optional string, either true or false
1159                        Set to true to make BFD accept only control messages with a tunnel
1160                        key of zero.  By default, BFD accepts control messages with any
1161                        tunnel key.
1162
1163                 bfd : bfd_local_dst_mac: optional string, mac address
1164                        Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
1165                        to set the MAC used as destination for transmitted BFD packets. The
1166                        default is 00:23:20:00:00:01
1167
1168                 bfd : bfd_remote_dst_mac: optional string, mac address
1169                        Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
1170                        to set the MAC used for checking the destination of received BFD packets.
1171                        Packets with different destination MAC will not be considered as BFD packets.
1172                        If not specified the destination MAC address of received BFD packets
1173                        are not checked.
1174
1175                 bfd : bfd_src_ip: optional string, ip address
1176                        Set to an IPv4 address to set the IP address used as source
1177                        for transmitted BFD packets.  The default is 169.254.1.1
1178
1179                 bfd : bfd_dst_ip: optional string, ip address
1180                        Set to an IPv4 address to set the IP address used as destination
1181                        for transmitted BFD packets.  The default is 169.254.1.0";
1182
1183             key "bfd-key";
1184             leaf bfd-key {
1185                 description "bfd name/key";
1186                 type string;
1187             }
1188             leaf bfd-value {
1189                 description "bfd value";
1190                 type string;
1191             }
1192         }
1193
1194         list interface-bfd-status {
1195             description "BFD status for a particular interface.
1196                 The switch sets key-value pairs in the bfd_status column to
1197                 report the status of BFD on this interface.  When BFD is not
1198                 enabled, with bfd:enable, the switch clears all key-value
1199                 pairs from bfd_status.
1200
1201                 bfd_status : state: optional string, one of [admin_down, down, init, up]
1202                        Reports the state of the BFD session.  The BFD session is fully
1203                        healthy and negotiated if UP.
1204
1205                 bfd_status : forwarding: optional string, true or false
1206                        Reports whether the BFD session believes this Interface
1207                        may be used to forward traffic.  Typically this means
1208                        the local session is signaling UP, and the remote
1209                        system isn't signaling a problem such as concatenated path down.
1210
1211                 bfd_status : diagnostic: optional string
1212                        A diagnostic code specifying the local system's reason for the
1213                        last change in session state. The error messages are defined in
1214                        section 4.1 of [RFC 5880].
1215
1216                 bfd_status : remote_state: optional string, one of [admin_down, down, init, up]
1217                        Reports the state of the remote endpoint's BFD session.
1218
1219                 bfd_status : remote_diagnostic: optional string
1220                        A diagnostic code specifying the remote system's reason for the
1221                        last change in session state. The error messages are defined in
1222                        section 4.1 of [RFC 5880].
1223
1224                 bfd_status : flap_count: optional string,
1225                        containing an integer, minimum 0
1226                        Counts the number of bfd_status:forwarding flaps since start.
1227                        A flap is considered as a change of the bfd_status:forwarding value.";
1228
1229             key "bfd-status-key";
1230             leaf bfd-status-key {
1231                 description "bfd-status name/key";
1232                 type string;
1233             }
1234             leaf bfd-status-value {
1235                 description "bfd-status value";
1236                 type string;
1237             }
1238         }
1239
1240         leaf qos {
1241             description "The unique identifier of the QoS entry for this port.";
1242             type yang:uuid;
1243         }
1244     }
1245
1246     augment "/topo:network-topology/topo:topology/topo:node" {
1247         description "Augmentation for bridge nodes managed by ovsdb";
1248         ext:augment-identifier "ovsdb-bridge-augmentation";
1249         uses ovsdb-bridge-attributes;
1250     }
1251
1252     augment "/topo:network-topology/topo:topology/topo:node" {
1253         description "Augment topology node for an ovsdb node";
1254         ext:augment-identifier "ovsdb-node-augmentation";
1255         uses ovsdb-node-attributes;
1256     }
1257
1258     augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" {
1259         description "Augment topology node termination-point for an ovsdb port/interface";
1260         ext:augment-identifier "ovsdb-termination-point-augmentation";
1261         uses ovsdb-port-interface-attributes;
1262     }
1263 }