Merge "Bug 5174: Support for AutoAttach Table in OVSDB"
[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-patch {
706         description "Interface type for patch interfaces";
707         base interface-type-base;
708     }
709
710     identity interface-type-tap {
711         description "Interface type for tun/tap interfaces";
712         base interface-type-base;
713     }
714
715     identity interface-type-geneve {
716         description "Interface type for geneve interfaces";
717         base interface-type-base;
718     }
719
720     identity interface-type-gre {
721         description "Interface type for gre interfaces";
722         base interface-type-base;
723     }
724
725     identity interface-type-ipsec-gre {
726         description "Interface type for ipsec-gre interfaces";
727         base interface-type-base;
728     }
729
730     identity interface-type-gre64 {
731         description "Interface type for gre64 interfaces";
732         base interface-type-base;
733     }
734
735     identity interface-type-ipsec-gre64 {
736         description "Interface type for ipsec-gre64 interfaces";
737         base interface-type-base;
738     }
739
740     identity interface-type-lisp {
741         description "Interface type for lisp interfaces";
742         base interface-type-base;
743     }
744
745     identity interface-type-dpdk {
746         description "Interface type for dpdk interfaces";
747         base interface-type-base;
748     }
749
750     identity interface-type-dpdkr {
751         description "Interface type for dpdk ring interfaces";
752         base interface-type-base;
753     }
754
755     identity interface-type-dpdkvhost {
756         description "Interface type for dpdkvhost interfaces";
757         base interface-type-base;
758     }
759
760     identity interface-type-dpdkvhostuser {
761         description "Interface type for dpdkvhostuser interfaces";
762         base interface-type-base;
763     }
764
765     identity interface-type-stt {
766         description "Interface type for stt interfaces";
767         base interface-type-base;
768     }
769
770     identity qos-type-base {
771         description "the base identity for qos";
772     }
773
774     identity qos-type-linux-htb {
775         description "linux hierarchy token bucket classifier";
776         base qos-type-base;
777     }
778
779     identity qos-type-linux-hfsc {
780         description "linux hierarchical fair service curve classifier";
781         base qos-type-base;
782     }
783
784     grouping ovsdb-port-interface-attributes {
785         leaf port-uuid {
786             description "The unique identifier of the OVSDB port";
787             type yang:uuid;
788         }
789
790         leaf interface-uuid {
791             description "The unique identifier of the OVSDB interface";
792             type yang:uuid;
793         }
794
795         leaf name {
796             description "The name of the OVSDB port/interface";
797             type string;
798         }
799
800         leaf interface-type {
801             description "The type of the OVSDB interface";
802             type identityref {
803                 base interface-type-base;
804             }
805         }
806
807         list options {
808             description "Port/Interface related optional input values";
809             key "option";
810             leaf option {
811                 description "Option name";
812                 type string;
813             }
814             leaf value {
815                 description "Option value";
816                 type string;
817             }
818         }
819
820         leaf ofport {
821             description "Port/Interface related optional ofport";
822             type uint32;
823         }
824
825         leaf ofport_request {
826             description "Port/Interface related optional ofport_request, in range 1 to 65279";
827             type uint16 {
828                 range "1..65279";
829             }
830         }
831
832         leaf vlan-tag {
833             description "The VLAN tag of the termination point.";
834             type ethertype:vlan-id;
835         }
836
837         list trunks {
838             description "Represents the trunks of a termination point.";
839             key "trunk";
840             leaf trunk {
841                 type ethertype:vlan-id;
842             }
843         }
844
845         leaf vlan-mode {
846             description "The VLAN mode of the termination point.";
847             type enumeration {
848                 enum "access" {
849                     value 1;
850                     description
851                         "The VLAN mode access.";
852                 }
853                 enum "native-tagged" {
854                     value 2;
855                     description
856                         "The VLAN mode native-tagged.";
857                 }
858                 enum "native-untagged" {
859                     value 3;
860                     description
861                         "The VLAN mode native-untagged.";
862                 }
863                 enum "trunk" {
864                     value 4;
865                     description
866                         "The VLAN mode trunk.";
867                 }
868             }
869         }
870
871         list port-other-configs {
872             description "Other config attributes for Ports
873
874             other_config : priority-tags: optional string
875                either true or false An 802.1Q header contains two important pieces of
876                information: a VLAN ID and a priority.
877
878             other_config : bond-hash-basis: optional string
879                containing an integer An integer hashed along with flows when choosing output
880                slaves in load balanced bonds. When changed, all flows will be
881                assigned different hash values possibly causing slave selection
882                decisions to change.
883
884             other_config : bond-detect-mode: optional string
885                either miimon or carrier The means used to detect link failures. Defaults to
886                carrier which uses each interface's carrier to detect failures.
887                When set to miimon, will check for failures by polling each
888                interface's MII.
889
890             other_config : bond-miimon-interval: optional string
891                containing an integer The interval, in milliseconds, between successive
892                attempts to poll each interface's MII. Relevant only when
893                other_config:bond-detect-mode is miimon
894
895             other_config : lacp-system-id: optional string
896                The LACP system ID of this Port. The system ID of a LACP bond
897                is used to identify itself to its partners. Must be a nonzero
898                MAC address. Defaults to the bridge Ethernet address if unset.
899
900             other_config : lacp-system-priority: optional string
901                containing an integer, in range 1 to 65,535 The LACP system priority of this
902                Port. In LACP negotiations, link status decisions are made by
903                the system with the numerically lower priority.
904
905             other_config : lacp-time: optional string
906                 either slow or fast. The LACP timing which should be used on this Port. By default
907                 slow is used. When configured to be fast LACP heartbeats are
908                 requested at a rate of once per second causing connectivity
909                 problems to be detected more quickly. In slow mode, heartbeats
910                 are requested at a rate of once every 30 seconds.
911
912             other_config : lacp-fallback-ab: optional string
913                 either true or false Determines the behavior of openvswitch bond in LACP mode.
914                 If the partner switch does not support LACP, setting this
915                 option to true allows openvswitch to fallback to active-backup.
916                 If the option is set to false, the bond will be disabled.
917                 In both the cases, once the partner switch is configured
918                 to LACP mode, the bond will use LACP.
919
920             other_config : bond-rebalance-interval: optional string,
921                 containing an integer, in range 0 to 10,000 For a load
922                 balanced bonded port, the number of milliseconds between
923                 successive attempts to rebalance the bond, that is, to move
924                 flows from one interface on the bond to another in an attempt
925                 to keep usage of each interface roughly equal. If zero, load
926                 balancing is disabled on the bond (link failure still cause
927                 flows to move). If less than 1000ms, the rebalance interval
928                 will be 1000ms.
929
930             other_config : stp-enable: optional string
931                either true or false. If spanning tree is enabled on the bridge, member ports are
932                enabled by default (with the exception of bond, internal, and
933                mirror ports which do not work with STP). If this column's
934                value is false spanning tree is disabled on the port.
935
936             other_config : stp-port-num: optional string
937                containing an integer, in range 1 to 255 The port number used for the lower 8
938                bits of the port-id. By default, the numbers will be assigned
939                automatically. If any port's number is manually configured on
940                a bridge, then they must all be.
941
942             other_config : stp-port-priority: optional string
943                containing an integer, in range 0 to 255 The port's relative priority value
944                for determining the root port (the upper 8 bits of the port-id).
945
946             other_config : stp-path-cost: optional string
947                 containing an integer, in range 0 to 65,535 Spanning tree path cost for the
948                 port. A lower number indicates a faster link. By default, the
949                 cost is based on the maximum speed of the link.
950
951              other_config : rstp-enable: optional string
952                  either true or false
953                  If rapid spanning tree is enabled on the bridge, member ports
954                  are enabled by default (with the exception of bond, internal,
955                  and mirror ports which do not work with RSTP). If this
956                  column's value is false rapid spanning tree is disabled on
957                  the port.
958
959              other_config : rstp-port-priority: optional string
960                  containing an integer, in range 0 to 240 The port's relative priority value
961                  for determining the root port, in multiples of 16. By default,
962                  the port priority is 0x80 (128).
963
964              other_config : rstp-port-num: optional string
965                  containing an integer, in range 1 to 4,095 The local RSTP port number, used
966                  as the lower 12 bits of the port-id.
967
968              other_config : rstp-port-path-cost: optional string
969                  containing an integer The port path cost. The Port's contribution, when it
970                  is the Root Port, to the Root Path Cost for the Bridge.
971
972              other_config : rstp-port-admin-edge: optional string
973                  either true or false
974
975              other_config : rstp-port-auto-edge: optional string
976                  either true or false The auto edge port parameter for the Port. Default
977                  is true.
978
979              other_config : rstp-port-mcheck: optional string
980                  either true or false The mcheck port parameter for the Port. Default is false.
981
982               other_config : mcast-snooping-flood: optional string
983                   either true or false If set to true, multicast packets are
984                   unconditionally forwarded to the specific port";
985
986             key "other-config-key";
987             leaf other-config-key {
988                 description "port-other-config name/key";
989                 type string;
990             }
991             leaf other-config-value {
992                 description "port-other-config value";
993                 type string;
994             }
995         }
996
997         list interface-other-configs {
998             description "Other config attributes for Interfaces
999
1000             other_config : enable-vlan-splinters: optional string
1001                either true or false. Set to true to enable VLAN splinters on this
1002                interface. Defaults to false.";
1003
1004             key "other-config-key";
1005             leaf other-config-key {
1006                 description "interface-other-config name/key";
1007                 type string;
1008             }
1009             leaf other-config-value {
1010                 description "interface-other-config value";
1011                 type string;
1012             }
1013         }
1014
1015         list port-external-ids {
1016             description "Port external ids
1017
1018             external_ids : fake-bridge-id-*: optional string
1019                External IDs for a fake bridge (see the fake_bridge column) are defined by
1020                prefixing a Bridge external_ids key with
1021                fake-bridge-, e.g. fake-bridge-xs-network-uuids.";
1022
1023             key "external-id-key";
1024             leaf external-id-key {
1025                 description "external-id name/key";
1026                 type string;
1027                 mandatory true;
1028             }
1029             leaf external-id-value {
1030                 description "external-id value";
1031                 type string;
1032                 mandatory true;
1033             }
1034         }
1035
1036         list interface-external-ids {
1037             description "Interface external ids
1038
1039             external_ids : attached-mac: optional string.
1040                The MAC address programmed into the ''virtual hardware'' for this interface, in
1041                the form xx:xx:xx:xx:xx:xx. For Citrix XenServer, this is the
1042                value of the MAC field in the VIF record for this interface.
1043
1044             external_ids : iface-id: optional string.
1045                A system-unique identifier for the interface. On XenServer, this will commonly
1046                be the same as external_ids:xs-vif-uuid.
1047
1048             external_ids : iface-status: optional string
1049                either active or inactive Hypervisors may sometimes have more than one interface
1050                associated with a given external_ids:iface-id, only one of
1051                which is actually in use at a given time.
1052
1053             external_ids : xs-vif-uuid: optional string.
1054                The virtual interface associated with this interface.
1055
1056             external_ids : xs-network-uuid: optional string.
1057                The virtual network to which this interface is attached.
1058
1059             external_ids : vm-id: optional string.
1060                The VM to which this interface belongs. On XenServer, this will be the same as
1061                external_ids:xsvm-uuid.
1062
1063             external_ids : xs-vm-uuid: optional string.
1064                The VM to which this interface belongs";
1065
1066             key "external-id-key";
1067             leaf external-id-key {
1068                 description "external-id name/key";
1069                 type string;
1070                 mandatory true;
1071             }
1072             leaf external-id-value {
1073                 description "external-id value";
1074                 type string;
1075                 mandatory true;
1076             }
1077         }
1078
1079         list interface-lldp {
1080             description "Auto Attach configuration for a particular interface.
1081                 If LLDP is enabled on an interface, the interface processes received
1082                 LLDP packets and never passes them to OpenFlow or forwards them.
1083
1084                 lldp : enable: optional string, either true or false
1085                        True to enable LLDP on this Interface. If not specified, LLDP
1086                        will be disabled by default.";
1087
1088             key "lldp-key";
1089             leaf lldp-key {
1090                 description "lldp name/key";
1091                 type string;
1092             }
1093             leaf lldp-value {
1094                 description "lldp value";
1095                 type string;
1096             }
1097         }
1098
1099         list interface-bfd {
1100             description "BFD configuration for a particular interface.
1101                 BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
1102                 detection of connectivity failures by occasional transmission of
1103                 BFD control messages.
1104
1105                 bfd : enable: optional string, either true or false
1106                        True to enable BFD on this Interface. If not specified, BFD
1107                        will be disabled by default.
1108
1109                 bfd : min_rx: optional string
1110                        containing an integer, at least 1.
1111                        The shortest interval, in milliseconds, at which this BFD session
1112                        offers to receive BFD control messages.  The remote endpoint may
1113                        choose to send messages at a slower rate.  Defaults to 1000.
1114
1115                 bfd : min_tx: optional string
1116                        containing an integer, at least 1.
1117                        The shortest interval, in milliseconds, at which this BFD session is
1118                        willing to transmit BFD control messages.  Messages will actually be
1119                        transmitted at a slower rate if the remote endpoint is not willing to
1120                        receive as quickly as specified.  Defaults to 100.
1121
1122                 bfd : decay_min_rx: optional string
1123                        containing an integer
1124                        An alternate receive interval, in milliseconds, that must be greater
1125                        than or equal to bfd:min_rx.  The implementation switches from
1126                        bfd:min_rx to bfd:decay_min_rx when there is no obvious incoming
1127                        data traffic at the interface, to reduce the CPU and bandwidth cost
1128                        of monitoring an idle interface.  This feature may be disabled by
1129                        setting a value of 0. This feature is reset whenever bfd:decay_min_rx
1130                        bfd:min_rx changes.
1131
1132                 bfd : forwarding_if_rx: optional string, either true or false
1133                        When true, traffic received on the Interface is used to
1134                        indicate the capability of packet I/O. BFD control packets are
1135                        still transmitted and received.  At least one BFD control
1136                        packet must be received every 100 * bfd:min_rx amount of time.
1137                        Otherwise, even if traffic are received, the bfd-status:forwarding
1138                        will be false.
1139
1140                 bfd : cpath_down: optional string, either true or false
1141                        Set to true to notify the remote endpoint that traffic should not be
1142                        forwarded to this system for some reason other than a connectivity
1143                        failure on the interface being monitored.  The typical underlying
1144                        reason is concatenated path down, that is, that connectivity
1145                        beyond the local system is down.  Defaults to false.
1146
1147                 bfd : cpath_down: optional string, either true or false
1148                        Set to true to notify the remote endpoint that traffic should not be
1149                        forwarded to this system for some reason other than a connectivity
1150                        failure on the interface being monitored.  The typical underlying
1151                        reason is concatenated path down, that is, that connectivity
1152                        beyond the local system is down.  Defaults to false.
1153
1154                 bfd : check_tnl_key: optional string, either true or false
1155                        Set to true to make BFD accept only control messages with a tunnel
1156                        key of zero.  By default, BFD accepts control messages with any
1157                        tunnel key.
1158
1159                 bfd : bfd_local_dst_mac: optional string, mac address
1160                        Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
1161                        to set the MAC used as destination for transmitted BFD packets. The
1162                        default is 00:23:20:00:00:01
1163
1164                 bfd : bfd_remote_dst_mac: optional string, mac address
1165                        Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
1166                        to set the MAC used for checking the destination of received BFD packets.
1167                        Packets with different destination MAC will not be considered as BFD packets.
1168                        If not specified the destination MAC address of received BFD packets
1169                        are not checked.
1170
1171                 bfd : bfd_src_ip: optional string, ip address
1172                        Set to an IPv4 address to set the IP address used as source
1173                        for transmitted BFD packets.  The default is 169.254.1.1
1174
1175                 bfd : bfd_dst_ip: optional string, ip address
1176                        Set to an IPv4 address to set the IP address used as destination
1177                        for transmitted BFD packets.  The default is 169.254.1.0";
1178
1179             key "bfd-key";
1180             leaf bfd-key {
1181                 description "bfd name/key";
1182                 type string;
1183             }
1184             leaf bfd-value {
1185                 description "bfd value";
1186                 type string;
1187             }
1188         }
1189
1190         list interface-bfd-status {
1191             description "BFD status for a particular interface.
1192                 The switch sets key-value pairs in the bfd_status column to
1193                 report the status of BFD on this interface.  When BFD is not
1194                 enabled, with bfd:enable, the switch clears all key-value
1195                 pairs from bfd_status.
1196
1197                 bfd_status : state: optional string, one of [admin_down, down, init, up]
1198                        Reports the state of the BFD session.  The BFD session is fully
1199                        healthy and negotiated if UP.
1200
1201                 bfd_status : forwarding: optional string, true or false
1202                        Reports whether the BFD session believes this Interface
1203                        may be used to forward traffic.  Typically this means
1204                        the local session is signaling UP, and the remote
1205                        system isn't signaling a problem such as concatenated path down.
1206
1207                 bfd_status : diagnostic: optional string
1208                        A diagnostic code specifying the local system's reason for the
1209                        last change in session state. The error messages are defined in
1210                        section 4.1 of [RFC 5880].
1211
1212                 bfd_status : remote_state: optional string, one of [admin_down, down, init, up]
1213                        Reports the state of the remote endpoint's BFD session.
1214
1215                 bfd_status : remote_diagnostic: optional string
1216                        A diagnostic code specifying the remote system's reason for the
1217                        last change in session state. The error messages are defined in
1218                        section 4.1 of [RFC 5880].
1219
1220                 bfd_status : flap_count: optional string, 
1221                        containing an integer, minimum 0
1222                        Counts the number of bfd_status:forwarding flaps since start.
1223                        A flap is considered as a change of the bfd_status:forwarding value.";
1224
1225             key "bfd-status-key";
1226             leaf bfd-status-key {
1227                 description "bfd-status name/key";
1228                 type string;
1229             }
1230             leaf bfd-status-value {
1231                 description "bfd-status value";
1232                 type string;
1233             }
1234         }
1235
1236         leaf qos {
1237             description "The unique identifier of the QoS entry for this port.";
1238             type yang:uuid;
1239         }
1240     }
1241
1242     augment "/topo:network-topology/topo:topology/topo:node" {
1243         description "Augmentation for bridge nodes managed by ovsdb";
1244         ext:augment-identifier "ovsdb-bridge-augmentation";
1245         uses ovsdb-bridge-attributes;
1246     }
1247
1248     augment "/topo:network-topology/topo:topology/topo:node" {
1249         description "Augment topology node for an ovsdb node";
1250         ext:augment-identifier "ovsdb-node-augmentation";
1251         uses ovsdb-node-attributes;
1252     }
1253
1254     augment "/topo:network-topology/topo:topology/topo:node/topo:termination-point" {
1255         description "Augment topology node termination-point for an ovsdb port/interface";
1256         ext:augment-identifier "ovsdb-termination-point-augmentation";
1257         uses ovsdb-port-interface-attributes;
1258     }
1259 }