bbf-grpc-client

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on network functions as ap...

  • Version: 2023-12-15

    bbf-grpc-client@2023-12-15


    
      module bbf-grpc-client {
    
        yang-version 1.1;
    
        namespace "urn:bbf:yang:bbf-grpc-client";
    
        prefix bbf-grpcc;
    
        import bbf-yang-types {
          prefix bbf-yang;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
    
        organization
          "Broadband Forum <https://www.broadband-forum.org>
         Common YANG Work Area";
    
        contact
          "Comments or questions about this Broadband Forum YANG module
         should be directed to <mailto:help@broadband-forum.org>.
    
         Editor:      Nick Hancock, Adtran
    
         Editor:      Ludwig Pauwels, Nokia
    
         PS Leader:   Joey Boyd, Adtran
    
         WA Director: Joey Boyd, Adtran
    
         WA Director: Sven Ooghe, Nokia";
    
        description
          "This module contains a collection of YANG definitions for
         supporting the Broadband Forum requirements on network functions
         as applicable to access network equipment. As such, this module
         is specific to access network equipment (e.g., BBF-specified
         Access Nodes and FTTdp DPUs).
    
         Specifically, this module defines a set of common groupings to
         support the gRPC client interface to initiate and maintain gRPC
         channels to gRPC servers.
    
         Copyright (c) 2017-2023, Broadband Forum
    
         Redistribution and use in source and binary forms, with or
         without modification, are permitted provided that the following
         conditions are met:
    
         1. Redistributions of source code must retain the above copyright
            notice, this list of conditions and the following disclaimer.
    
         2. Redistributions in binary form must reproduce the above
            copyright notice, this list of conditions and the following
            disclaimer in the documentation and/or other materials
            provided with the distribution.
    
         3. Neither the name of the copyright holder nor the names of its
            contributors may be used to endorse or promote products
            derived from this software without specific prior written
            permission.
    
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
         CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
         INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
         MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
         CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
         LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
         ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
         ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
         The above license is used as a license under copyright only.
         Please reference the Forum IPR Policy for patent licensing terms
         <https://www.broadband-forum.org/ipr-policy>.
    
         Any moral rights which are necessary to exercise under the above
         license grant are also deemed granted under this license.
    
         This version of this YANG module is part of TR-383a7; see
         the TR itself for full legal notices.";
    
        revision "2023-12-15" {
          description
            "Amendment 7.
           * Approval Date:    2023-12-15.
           * Publication Date: 2023-12-15.";
          reference
            "TR-383a7: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-7.pdf>";
    
        }
    
        revision "2022-06-07" {
          description
            "Issue 1.
           * Approval Date:    2022-06-07.
           * Publication Date: 2022-06-07.";
          reference
            "TR-451: vOMCI Specification
            	<https://www.broadband-forum.org/technical/download/
            		 TR-451_Issue-1.pdf>";
    
        }
    
    
        feature grpc-client {
          description
            "Indicates that the system supports a gRPC client interface.";
        }
    
        feature connection-backoff {
          description
            "Indicates that the gRPC client interface of a network function
           supports the gRPC Connection Backoff Protocol that manages how
           a client attempts to connect to a remote endpoint, if and when
           the connection fails.";
          reference
            "github.com/grpc/grpc/blob/master/doc/connection-backoff.md";
    
        }
    
        grouping grpc-client {
          description
            "Data nodes to manage gRPC client behavior.
    
           Note that this grouping uses fairly typical descendant node
           names such that a stack of 'uses' statements will have name
           conflicts. It is intended that the consuming data model will
           resolve the issue (e.g., by wrapping the 'uses' statement in a
           container). This model purposely does not do this itself so as
           to provide maximum flexibility to consuming models.";
          container channel {
            description
              "The gRPC channel properties.
    
             A gRPC channel is a persistent HTTP/2 connection within a TCP
             session to a remote gRPC server. Its responsibility is to
             hold all the connections and reconnect as necessary.";
            leaf ping-interval {
              type uint32;
              units "seconds";
              default "300";
              description
                "The interval for the HTTP/2 Pings that the gRPC client is
               to send to gRPC server.
    
               A value of 0 disables HTTP/2 Pings.
    
               Pings are used to keep HTTP/2 connections alive during
               periods of inactivity to allow initial RPCs to be made
               quickly without a delay.";
              reference
                "grpc.io/docs/guides/keepalive/";
    
            }
          }  // container channel
    
          container connection-backoff {
            if-feature bbf-grpcc:connection-backoff;
            description
              "Configuration of the gRPC Connection Backoff Protocol.
    
             The aim of the gRPC Connection Backoff Protocol is to avoid
             flooding the network or the server with requests when a
             connection to a server fails or has dropped. This is achieved
             by exponentially backing off the start time of connection
             attempts up to a limit with jitter.";
            reference
              "github.com/grpc/grpc/blob/master/doc/connection-backoff.md";
    
            leaf enable {
              type boolean;
              default "true";
              description
                "If 'true', the Connection Backoff Protocol is enabled.";
            }
    
            leaf initial-backoff {
              type uint16 {
                range "1..max";
              }
              units "seconds";
              default "30";
              description
                "The time to wait (backoff) before reattempting to establish
               a connection to the server after discovering that the
               initial connection attempt has failed.";
              reference
                "github.com/grpc/grpc/blob/master/doc/connection-backoff.md
                - INITIAL_BACKOFF";
    
            }
    
            leaf min-connect-timeout {
              type uint16 {
                range "1..max";
              }
              units "seconds";
              default "20";
              description
                "The minimum time to wait for a connection attempt to
               complete before deeming the connection attempt failed.";
              reference
                "github.com/grpc/grpc/blob/master/doc/connection-backoff.md
                - MIN_CONNECT_TIMEOUT";
    
            }
    
            leaf multiplier {
              type decimal64 {
                fraction-digits 2;
              }
              default "1.60";
              description
                "The factor with which to multiply the backoff value after a
               failed retry.";
              reference
                "github.com/grpc/grpc/blob/master/doc/connection-backoff.md
                - MULTIPLIER";
    
            }
    
            leaf jitter {
              type decimal64 {
                fraction-digits 2;
              }
              default "0.20";
              description
                "The factor which determines by how much backoffs are to be
               randomized.
    
               The range of values from which a value for backoff is to be
               randomly selected is determined as follows:
                 minimum value = backoff - (backoff * jitter)
                 maximum value = backoff + (backoff * jitter).
    
               Note that the randomized backoff is used only to determine
               the deadline for the next connection attempt; the
               non-randomized value is used to determine the next backoff
               if the attempt fails.";
              reference
                "github.com/grpc/grpc/blob/master/doc/connection-backoff.md
                - JITTER";
    
            }
    
            leaf max-backoff {
              type uint16 {
                range "1..max";
              }
              units "seconds";
              description
                "The upper bound to the backoff value; backoff is not to be
               increased beyond this value.
    
               To support redundant endpoints, the client could move to a
               different endpoint, if the attempt to connect the remote
               endpoint fails after the maximum backoff value has been
               reached.";
              reference
                "github.com/grpc/grpc/blob/master/doc/connection-backoff.md
                - MAX_BACKOFF";
    
            }
          }  // container connection-backoff
        }  // grouping grpc-client
    
        grouping grpc-client-transport {
          description
            "Data nodes to manage the transport connections for gRPC
           channels at the client side.";
          container grpc-client {
            if-feature bbf-grpcc:grpc-client;
            description
              "A wrapper around the gRPC client parameters to avoid name
             collisions.";
            uses bbf-grpcc:grpc-client;
    
            list access-point {
              key "name";
              min-elements 1;
              ordered-by user;
              description
                "An access point to a gRPC server that a client may attempt
               to connect to in the order as defined by the user to
               establish a gRPC channel.
    
               Defining more than one access point enables high-
               availability.";
              leaf name {
                type bbf-yang:string-ascii64;
                description
                  "An arbitrary name for the access point.";
              }
    
              container grpc-transport-parameters {
                description
                  "Parameters to establish a transport layer from the gRPC
                 client to the gRPC server.";
                choice tcp-client-options {
                  description
                    "Selects between possible TCP transport layer
                   configuration options.";
                  container remote-port {
                    description
                      "The port on the remote host over which a TCP
                       session is to be established and an HTTP/2
                       connection for the gRPC channel is to be started.";
                    leaf remote-address {
                      type inet:host;
                      description
                        "The IP address or hostname of the remote host to
                         establish a connection with.";
                    }
    
                    leaf remote-port {
                      type inet:port-number;
                      default "8443";
                      description
                        "The destination port on the remote host.";
                    }
                  }  // container remote-port
                }  // choice tcp-client-options
              }  // container grpc-transport-parameters
    
              notification remote-endpoint-status-change {
                description
                  "A notification traceable to a client remote endpoint
                 and access point. This notification is sent when a
                 remote endpoint is connected or disconnected.";
                leaf connected {
                  type boolean;
                  mandatory true;
                  description
                    "The new remote endpoint status.";
                }
    
                leaf last-changed {
                  type yang:date-and-time;
                  mandatory true;
                  description
                    "The system date and time when the remote endpoint was
                   connected or disconnected.";
                }
              }  // notification remote-endpoint-status-change
            }  // list access-point
          }  // container grpc-client
        }  // grouping grpc-client-transport
      }  // module bbf-grpc-client
    

© 2024 YumaWorks, Inc. All rights reserved.