BUG 5746 - Ovsdb QoS and Queue model enhancements
[ovsdb.git] / southbound / southbound-api / src / main / yang / ovsdb.yang
index 70459cf54811ab6179a3981f19943e24dfd67874..b5ca74a6c687255b71cd2ba5fc658091849684a6 100755 (executable)
@@ -34,6 +34,16 @@ module ovsdb {
         type instance-identifier;
     }
 
+    typedef ovsdb-qos-ref {
+        description "A reference to a ovsdb QoS entry";
+        type instance-identifier;
+    }
+
+    typedef ovsdb-queue-ref {
+        description "A reference to an ovsdb queue entry";
+        type instance-identifier;
+    }
+
     typedef ovsdb-bridge-name {
         type string;
     }
@@ -204,7 +214,7 @@ module ovsdb {
             Semicolon-delimited set of universally unique identifier(s)
             for the network with which this bridge is associated on a
             Citrix XenServer host. The network identifiers are RFC 4122
-            UUIDs as displayed by, e.g., xe networklist.";
+            UUIDs as displayed by, e.g., xe network-list.";
 
             key "bridge-external-id-key";
             leaf bridge-external-id-key {
@@ -266,12 +276,12 @@ module ovsdb {
                nonnegative integer.
 
              other_config : stp-system-id: optional string
-                The bridges STP identifier (the lower 48 bits of the
+                The bridge's STP identifier (the lower 48 bits of the
                 bridge-id) in the form xx:xx:xx:xx:xx:xx. By default, the
                 identifier is the MAC address of the bridge.
 
              other_config : stp-priority: optional string
-                containing an integer, in range 0 to 65,535 The bridges relative priority
+                containing an integer, in range 0 to 65,535 The bridge's relative priority
                 value for determining the root bridge (the upper 16 bits of
                 the bridgeid).  A bridge with the lowest bridge-id is elected
                 the root. By default, the priority is 0x8000.
@@ -321,6 +331,10 @@ module ovsdb {
             }
         }
 
+        leaf auto-attach {
+            description "The unique identifier of the auto_attach entry for this bridge.";
+            type yang:uuid;
+        }
     }
 
     grouping ovsdb-connection-info-attributes {
@@ -393,14 +407,14 @@ module ovsdb {
                   with Open vSwitch.
 
             external_ids : system-id: optional string
-               A unique identifier for the Open vSwitchs physical host.
+               A unique identifier for the Open vSwitch's physical host.
                The form of the identifier depends on the type of the host.
                On a Citrix XenServer, this will likely be the same as
                external_ids:xs-system-uuid.
 
            external_ids : xs-system-uuid: optional string
                The Citrix XenServer universally unique identifier for the
-                physical host as displayed by xe-hostlist.";
+                physical host as displayed by xe-host-list.";
 
             key "external-id-key";
             leaf external-id-key {
@@ -423,7 +437,7 @@ module ovsdb {
                in the following tables: Port, Interface , Mirror.
 
             other_config : flow-restore-wait: optional string
-               either true or false When ovsvswitchd starts up, it has an empty flow
+               either true or false When ovs-vswitchd starts up, it has an empty flow
                table and therefore it handles all arriving packets in its
                default fashion according to its configuration, by
                dropping them or sending them to an OpenFlow controller or
@@ -442,8 +456,8 @@ module ovsdb {
             other_config : pmd-cpu-mask: optional string
                Specifies CPU mask for setting the cpu affinity of
                PMD (Poll Mode Driver) threads. Value should be in the form
-               of hex string, similar to the dpdk EAL ’-c COREMASK’ option
-               input or the ’taskset’ mask input.
+               of hex string, similar to the dpdk EAL '-c COREMASK' option
+               input or the 'taskset' mask input.
 
             other_config : n-handler-threads: optional string
                containing an integer, at least 1 Specifies the number of threads for
@@ -457,7 +471,7 @@ module ovsdb {
                in the datapath.
 
              other_config : enable-statistics: optional string
-               either ture or false. Set this value to true to enable populating the
+                either ture or false. Set this value to true to enable populating the
                 statistics column or to false to explicitly disable it.";
 
             key "other-config-key";
@@ -488,7 +502,11 @@ module ovsdb {
         }
 
         list qos-entries {
-            key "qos-uuid";
+            key "qos-id";
+            leaf qos-id {
+                description "An identifier used for QoS entries in the MD-SAL.";
+                type inet:uri;
+            }
             leaf qos-uuid {
                 description "The unique identifier of the QoS.";
                 type yang:uuid;
@@ -500,10 +518,21 @@ module ovsdb {
             }
             list queue-list {
                 description "The list of queues used by the QoS";
-                key "queue-uuid";
+                key "queue-number";
+                leaf queue-number {
+                    description "The queue number of the record in the QoS entry";
+                    type uint32;
+                }
+
+                leaf queue-ref {
+                    description "Instance identifier to a Queue in the MD-SAL.";
+                    type ovsdb-queue-ref;
+                }
+
                 leaf queue-uuid {
-                    description "The unique identifier of the queue.";
+                    description "The unique identifier of the queue record.";
                     type yang:uuid;
+                    status deprecated;
                 }
             }
             list qos-external-ids {
@@ -537,7 +566,11 @@ module ovsdb {
         }
 
         list queues {
-            key "queue-uuid";
+            key "queue-id";
+            leaf queue-id {
+                description "An identifier used for Queue entries in the MD-SAL.";
+                type inet:uri;
+            }
             leaf queue-uuid {
                 description "The unique identifier of the queue.";
                 type yang:uuid;
@@ -545,6 +578,19 @@ module ovsdb {
             leaf dscp {
                 type uint8;
             }
+            list queues-external-ids {
+                key "queues-external-id-key";
+                leaf queues-external-id-key {
+                    description "queues external-id name/key";
+                    type string;
+                    mandatory true;
+                }
+                leaf queues-external-id-value {
+                    description "queues-external-id value";
+                    type string;
+                    mandatory true;
+                }
+            }
             list queues-other-config {
                 description "
                 Configuration for linux-htb QoS:
@@ -555,14 +601,14 @@ module ovsdb {
 
                 other_config : max-rate optional string
                     containing an integer, at least 1.
-                    Maximum allowed bandwidth, in bit/s. Optional. If specified, the queues rate will not be allowed
+                    Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed
                     to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no
                     limit.
 
                 other_config : burst optional string
                     containing an integer, at least 1.
-                    Burst size, in bits. This is the maximum amount of ‘‘credits’’ that a queue can accumulate while it
-                    is idle. Optional. Details of the linuxhtb implementation require a minimum burst size, so a
+                    Burst size, in bits. This is the maximum amount of ''credits'' that a queue can accumulate while it
+                    is idle. Optional. Details of the linux-htb implementation require a minimum burst size, so a
                     too-small burst will be silently ignored.
 
                 other_config : priority optional string.
@@ -579,7 +625,7 @@ module ovsdb {
 
                 other_config : max-rate optional string
                     containing an integer, at least 1.
-                    Maximum allowed bandwidth, in bit/s. Optional. If specified, the queues rate will not be allowed
+                    Maximum allowed bandwidth, in bit/s. Optional. If specified, the queue's rate will not be allowed
                     to exceed the specified value, even if excess bandwidth is available. If unspecified, defaults to no
                     limit..";
 
@@ -592,6 +638,65 @@ module ovsdb {
                 }
             }
         }
+
+        list autoattach {
+            key "autoattach-id";
+            leaf autoattach-id {
+                description "An identifier used for AutoAttach table in the MD-SAL.";
+                type inet:uri;
+            }
+            leaf bridge-id {
+                description "Node-id of the Bridge table from where Autoattach table can be referenced.";
+                type inet:uri;
+            }
+            leaf autoattach-uuid {
+                description "The unique identifier of the autoattach table.";
+                type yang:uuid;
+            }
+            leaf system-name {
+                type string;
+                description "The  system_name string is exported in LLDP messages.
+                    It should uniquely identify the bridge in the network.";
+            }
+            leaf system-description {
+                type string;
+                description "The system_description string is exported in LLDP messages.
+                    It should describe the type of software and hardware.";
+            }
+            list mappings {
+                description "Map  of integer-integer pairs, key in range 0 to 16,777,215,
+                    value in range 0 to 4,095. A mapping from SPB network Individual Service
+                    Identifier  (ISID) to VLAN id.";
+                key "mappings-key";
+                leaf mappings-key {
+                    type uint32 {
+                        range "0..16777215";
+                    }
+                }
+                leaf mappings-value {
+                    type uint16 {
+                        range "0..4095";
+                    }
+                }
+            }
+            list autoattach-external-ids {
+                description
+                   "Key-value pairs for use by external frameworks that integrate with
+                    Open vSwitch, rather than by Open vSwitch itself.";
+
+                key "autoattach-external-id-key";
+                leaf autoattach-external-id-key {
+                    description "external-id name/key";
+                    type string;
+                    mandatory true;
+                }
+                leaf autoattach-external-id-value {
+                    description "autoattach-external-id value";
+                    type string;
+                    mandatory true;
+                }
+            }
+        }
      }
 
     identity interface-type-base {
@@ -613,6 +718,11 @@ module ovsdb {
         base interface-type-base;
     }
 
+    identity interface-type-vxlan-gpe {
+        description "Interface type for vxlan gpe interfaces";
+        base interface-type-base;
+    }
+
     identity interface-type-patch {
         description "Interface type for patch interfaces";
         base interface-type-base;
@@ -692,6 +802,26 @@ module ovsdb {
         base qos-type-base;
     }
 
+    identity qos-type-linux-sfq {
+        description "linux stochastic fairness queueing classifier";
+        base qos-type-base;
+    }
+
+    identity qos-type-linux-codel {
+        description "linux controlled delay classifier";
+        base qos-type-base;
+    }
+
+    identity qos-type-linux-fq-codel {
+        description "linux fair queueing controlled delay classifier";
+        base qos-type-base;
+    }
+
+    identity qos-type-egress-policer {
+        description "DPDK user space egress policer";
+        base qos-type-base;
+    }
+
     grouping ovsdb-port-interface-attributes {
         leaf port-uuid {
             description "The unique identifier of the OVSDB port";
@@ -793,13 +923,13 @@ module ovsdb {
 
             other_config : bond-detect-mode: optional string
                either miimon or carrier The means used to detect link failures. Defaults to
-               carrier which uses each interfaces carrier to detect failures.
+               carrier which uses each interface's carrier to detect failures.
                When set to miimon, will check for failures by polling each
-               interfaces MII.
+               interface's MII.
 
             other_config : bond-miimon-interval: optional string
                containing an integer The interval, in milliseconds, between successive
-               attempts to poll each interfaces MII. Relevant only when
+               attempts to poll each interface's MII. Relevant only when
                other_config:bond-detect-mode is miimon
 
             other_config : lacp-system-id: optional string
@@ -821,7 +951,7 @@ module ovsdb {
 
             other_config : lacp-fallback-ab: optional string
                 either true or false Determines the behavior of openvswitch bond in LACP mode.
-               If the partner switch does not support LACP, setting this
+                If the partner switch does not support LACP, setting this
                 option to true allows openvswitch to fallback to active-backup.
                 If the option is set to false, the bond will be disabled.
                 In both the cases, once the partner switch is configured
@@ -840,17 +970,17 @@ module ovsdb {
             other_config : stp-enable: optional string
                either true or false. If spanning tree is enabled on the bridge, member ports are
                enabled by default (with the exception of bond, internal, and
-               mirror ports which do not work with STP). If this columns
+               mirror ports which do not work with STP). If this column's
                value is false spanning tree is disabled on the port.
 
             other_config : stp-port-num: optional string
                containing an integer, in range 1 to 255 The port number used for the lower 8
                bits of the port-id. By default, the numbers will be assigned
-               automatically. If any ports number is manually configured on
+               automatically. If any port's number is manually configured on
                a bridge, then they must all be.
 
             other_config : stp-port-priority: optional string
-               containing an integer, in range 0 to 255 The ports relative priority value
+               containing an integer, in range 0 to 255 The port's relative priority value
                for determining the root port (the upper 8 bits of the port-id).
 
             other_config : stp-path-cost: optional string
@@ -863,11 +993,11 @@ module ovsdb {
                  If rapid spanning tree is enabled on the bridge, member ports
                  are enabled by default (with the exception of bond, internal,
                  and mirror ports which do not work with RSTP). If this
-                 columns value is false rapid spanning tree is disabled on
+                 column's value is false rapid spanning tree is disabled on
                  the port.
 
              other_config : rstp-port-priority: optional string
-                 containing an integer, in range 0 to 240 The ports relative priority value
+                 containing an integer, in range 0 to 240 The port's relative priority value
                  for determining the root port, in multiples of 16. By default,
                  the port priority is 0x80 (128).
 
@@ -876,7 +1006,7 @@ module ovsdb {
                  as the lower 12 bits of the port-id.
 
              other_config : rstp-port-path-cost: optional string
-                 containing an integer The port path cost. The Ports contribution, when it
+                 containing an integer The port path cost. The Port's contribution, when it
                  is the Root Port, to the Root Path Cost for the Bridge.
 
              other_config : rstp-port-admin-edge: optional string
@@ -928,7 +1058,7 @@ module ovsdb {
             external_ids : fake-bridge-id-*: optional string
                External IDs for a fake bridge (see the fake_bridge column) are defined by
                prefixing a Bridge external_ids key with
-               fake−bridge−, e.g. fake−bridge−xs−network−uuids.";
+               fake-bridge-, e.g. fake-bridge-xs-network-uuids.";
 
             key "external-id-key";
             leaf external-id-key {
@@ -947,7 +1077,7 @@ module ovsdb {
             description "Interface external ids
 
             external_ids : attached-mac: optional string.
-               The MAC address programmed into the ‘‘virtual hardware’’ for this interface, in
+               The MAC address programmed into the ''virtual hardware'' for this interface, in
                the form xx:xx:xx:xx:xx:xx. For Citrix XenServer, this is the
                value of the MAC field in the VIF record for this interface.
 
@@ -986,10 +1116,199 @@ module ovsdb {
             }
         }
 
+        list interface-lldp {
+            description "Auto Attach configuration for a particular interface.
+                If LLDP is enabled on an interface, the interface processes received
+                LLDP packets and never passes them to OpenFlow or forwards them.
+
+                lldp : enable: optional string, either true or false
+                       True to enable LLDP on this Interface. If not specified, LLDP
+                       will be disabled by default.";
+
+            key "lldp-key";
+            leaf lldp-key {
+                description "lldp name/key";
+                type string;
+            }
+            leaf lldp-value {
+                description "lldp value";
+                type string;
+            }
+        }
+
+        list interface-bfd {
+            description "BFD configuration for a particular interface.
+                BFD, defined in RFC 5880 and RFC 5881, allows point-to-point
+                detection of connectivity failures by occasional transmission of
+                BFD control messages.
+
+                bfd : enable: optional string, either true or false
+                       True to enable BFD on this Interface. If not specified, BFD
+                       will be disabled by default.
+
+                bfd : min_rx: optional string
+                       containing an integer, at least 1.
+                       The shortest interval, in milliseconds, at which this BFD session
+                       offers to receive BFD control messages.  The remote endpoint may
+                       choose to send messages at a slower rate.  Defaults to 1000.
+
+                bfd : min_tx: optional string
+                       containing an integer, at least 1.
+                       The shortest interval, in milliseconds, at which this BFD session is
+                       willing to transmit BFD control messages.  Messages will actually be
+                       transmitted at a slower rate if the remote endpoint is not willing to
+                       receive as quickly as specified.  Defaults to 100.
+
+                bfd : decay_min_rx: optional string
+                       containing an integer
+                       An alternate receive interval, in milliseconds, that must be greater
+                       than or equal to bfd:min_rx.  The implementation switches from
+                       bfd:min_rx to bfd:decay_min_rx when there is no obvious incoming
+                       data traffic at the interface, to reduce the CPU and bandwidth cost
+                       of monitoring an idle interface.  This feature may be disabled by
+                       setting a value of 0. This feature is reset whenever bfd:decay_min_rx
+                       bfd:min_rx changes.
+
+                bfd : forwarding_if_rx: optional string, either true or false
+                       When true, traffic received on the Interface is used to
+                       indicate the capability of packet I/O. BFD control packets are
+                       still transmitted and received.  At least one BFD control
+                       packet must be received every 100 * bfd:min_rx amount of time.
+                       Otherwise, even if traffic are received, the bfd-status:forwarding
+                       will be false.
+
+                bfd : cpath_down: optional string, either true or false
+                       Set to true to notify the remote endpoint that traffic should not be
+                       forwarded to this system for some reason other than a connectivity
+                       failure on the interface being monitored.  The typical underlying
+                       reason is concatenated path down, that is, that connectivity
+                       beyond the local system is down.  Defaults to false.
+
+                bfd : cpath_down: optional string, either true or false
+                       Set to true to notify the remote endpoint that traffic should not be
+                       forwarded to this system for some reason other than a connectivity
+                       failure on the interface being monitored.  The typical underlying
+                       reason is concatenated path down, that is, that connectivity
+                       beyond the local system is down.  Defaults to false.
+
+                bfd : check_tnl_key: optional string, either true or false
+                       Set to true to make BFD accept only control messages with a tunnel
+                       key of zero.  By default, BFD accepts control messages with any
+                       tunnel key.
+
+                bfd : bfd_local_dst_mac: optional string, mac address
+                       Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
+                       to set the MAC used as destination for transmitted BFD packets. The
+                       default is 00:23:20:00:00:01
+
+                bfd : bfd_remote_dst_mac: optional string, mac address
+                       Set to an Ethernet address in the form xx:xx:xx:xx:xx:xx
+                       to set the MAC used for checking the destination of received BFD packets.
+                       Packets with different destination MAC will not be considered as BFD packets.
+                       If not specified the destination MAC address of received BFD packets
+                       are not checked.
+
+                bfd : bfd_src_ip: optional string, ip address
+                       Set to an IPv4 address to set the IP address used as source
+                       for transmitted BFD packets.  The default is 169.254.1.1
+
+                bfd : bfd_dst_ip: optional string, ip address
+                       Set to an IPv4 address to set the IP address used as destination
+                       for transmitted BFD packets.  The default is 169.254.1.0";
+
+            key "bfd-key";
+            leaf bfd-key {
+                description "bfd name/key";
+                type string;
+            }
+            leaf bfd-value {
+                description "bfd value";
+                type string;
+            }
+        }
+
+        list interface-bfd-status {
+            description "BFD status for a particular interface.
+                The switch sets key-value pairs in the bfd_status column to
+                report the status of BFD on this interface.  When BFD is not
+                enabled, with bfd:enable, the switch clears all key-value
+                pairs from bfd_status.
+
+                bfd_status : state: optional string, one of [admin_down, down, init, up]
+                       Reports the state of the BFD session.  The BFD session is fully
+                       healthy and negotiated if UP.
+
+                bfd_status : forwarding: optional string, true or false
+                       Reports whether the BFD session believes this Interface
+                       may be used to forward traffic.  Typically this means
+                       the local session is signaling UP, and the remote
+                       system isn't signaling a problem such as concatenated path down.
+
+                bfd_status : diagnostic: optional string
+                       A diagnostic code specifying the local system's reason for the
+                       last change in session state. The error messages are defined in
+                       section 4.1 of [RFC 5880].
+
+                bfd_status : remote_state: optional string, one of [admin_down, down, init, up]
+                       Reports the state of the remote endpoint's BFD session.
+
+                bfd_status : remote_diagnostic: optional string
+                       A diagnostic code specifying the remote system's reason for the
+                       last change in session state. The error messages are defined in
+                       section 4.1 of [RFC 5880].
+
+                bfd_status : flap_count: optional string,
+                       containing an integer, minimum 0
+                       Counts the number of bfd_status:forwarding flaps since start.
+                       A flap is considered as a change of the bfd_status:forwarding value.";
+
+            key "bfd-status-key";
+            leaf bfd-status-key {
+                description "bfd-status name/key";
+                type string;
+            }
+            leaf bfd-status-value {
+                description "bfd-status value";
+                type string;
+            }
+        }
+
         leaf qos {
             description "The unique identifier of the QoS entry for this port.";
+            status deprecated;
             type yang:uuid;
         }
+
+        list qos-entry {
+            key "qos-key";
+            max-elements 1;
+            leaf qos-key {
+                description "Fixed key to reference the QoS entry in MD-SAL.";
+                type uint32 {
+                    range "1..1";
+                }
+                mandatory true;
+            }
+            leaf qos-ref {
+                description "Instance identifier of a QoS entry in the MD-SAL.";
+                type ovsdb-qos-ref;
+                mandatory true;
+            }
+        }
+
+        leaf ingress-policing-rate {
+            description "Maximum rate for data received on this interface in kbps.
+                Data received faster than this rate is dropped.  Set to 0 (default)
+                to disable policing";
+            type uint32;
+        }
+
+        leaf ingress-policing-burst {
+            description "Maximum burst size for data received on this interface in kb.
+                The default burst size if set to 0 is 1000 kb.  This value has no
+                effect if ingress-policing-rate is 0.";
+            type uint32;
+        }
     }
 
     augment "/topo:network-topology/topo:topology/topo:node" {