huawei-grpc

GRPC, which is short for Google Remote Procedure Call Protocol, is a high-performance general RPC framework running over HTTP/2 ...

  • Version: 2020-06-18

    huawei-grpc@2020-06-18


    
      module huawei-grpc {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-grpc";
    
        prefix hw-grpc;
    
        import huawei-acl {
          prefix acl;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-l3vpn {
          prefix l3vpn;
        }
        import huawei-ssl {
          prefix ssl;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import huawei-extension {
          prefix ext;
        }
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
         Bantian, Longgang
         Shenzhen 518129
         People's Republic of China
         Website: http://www.huawei.com
         Email: support@huawei.com";
    
        description
          "GRPC, which is short for Google Remote Procedure Call Protocol, is a high-performance general RPC framework running over HTTP/2 protocols at the transport layer.";
    
        revision "2020-06-18" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "grpc";
    
        container grpc {
          description
            "Google Remote Procedure Call Protocol.";
          container service {
            must
              "server-enable='false' or source-address";
            description
              "Configure the gRPC service.";
            leaf dscp {
              type uint8 {
                range "0..63";
              }
              default "0";
              description
                "DSCP marking of packets generated by the telemetry subsystem on the network device.";
            }
    
            leaf server-enable {
              type boolean;
              default "false";
              description
                "Enable/disable the gRPC service.";
            }
    
            leaf source-address {
              type inet:ipv4-address-no-zone;
              description
                "IP address listened by the gRPC service. Only the address 0.0.0.0 or valid IP addresses in class A, B, or C are supported.";
            }
    
            leaf vpn-name {
              when "../source-address";
              type leafref {
                path "/ni:network-instance/ni:instances/ni:instance/ni:name";
              }
              must
                "/ni:network-instance/ni:instances/ni:instance[ni:name = current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']";
              default "_public_";
              description
                "Name of a VPN instance listened by the gRPC service.";
            }
    
            leaf server-port {
              type uint32 {
                range "10000..57999";
              }
              default "57400";
              description
                "Number of a port listened by the gRPC service.";
            }
    
            leaf idle-timeout {
              type uint32 {
                range "1..3600";
              }
              units "s";
              default "10";
              description
                "Idle (RPC is not invoked) timeout period for gRPC service access. After the timeout period expires, the gRPC service is disconnected.";
            }
    
            leaf acl-number-or-name {
              type leafref {
                path "/acl:acl/acl:groups/acl:group/acl:identity";
              }
              must
                "/acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:groups/acl:group[acl:identity=current()]/acl:type='advance'";
              description
                "Specify the name or number of an ACL to configure an access control connection for the gRPC service.";
            }
    
            leaf ssl-policy {
              type leafref {
                path "/ssl:ssl/ssl:ssl-policys/ssl:ssl-policy/ssl:policy-name";
              }
              description
                "Specify the name of an SSL policy to bind an SSL policy to the gRPC server.";
            }
    
            leaf ssl-policy-peer {
              type boolean;
              default "false";
              description
                "Enable/disable SSL two-way authentication.";
            }
          }  // container service
    
          container service-ipv6 {
            must
              "server-enable='false' or source-address";
            description
              "Configure the IPv6 gRPC service.";
            leaf dscp {
              type uint8 {
                range "0..63";
              }
              default "0";
              description
                "DSCP marking of packets generated by the telemetry subsystem on the network device.";
            }
    
            leaf server-enable {
              type boolean;
              default "false";
              description
                "Enable/disable the IPv6 gRPC service.";
            }
    
            leaf source-address {
              type inet:ipv6-address-no-zone;
              description
                "IPv6 address listened by the IPv6 gRPC service. The multicast address, link-local address, loopback address, IPv4-compatible IPv6 address, and IPv4-mapped IPv6 address are not supported.";
            }
    
            leaf vpn-name {
              when "../source-address";
              type leafref {
                path "/ni:network-instance/ni:instances/ni:instance/ni:name";
              }
              must
                "/ni:network-instance/ni:instances/ni:instance[ni:name = current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv6-unicast']";
              default "_public_";
              description
                "Name of a VPN instance listened by the IPv6 gRPC service.";
            }
    
            leaf server-port {
              type uint32 {
                range "10000..57999";
              }
              default "57400";
              description
                "Number of a port listened by the IPv6 gRPC service.";
            }
    
            leaf idle-timeout {
              type uint32 {
                range "1..3600";
              }
              units "s";
              default "10";
              description
                "Idle (RPC is not invoked) timeout period for IPv6 gRPC service access. After the timeout period expires, the IPv6 gRPC service is disconnected.";
            }
    
            leaf acl-number-or-name {
              type leafref {
                path "/acl:acl/acl:group6s/acl:group6/acl:identity";
              }
              must
                "/acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='basic' or /acl:acl/acl:group6s/acl:group6[acl:identity=current()]/acl:type='advance'";
              description
                "Specify the name or number of an ACL6 to configure an access control connection for the IPv6 gRPC service.";
            }
    
            leaf ssl-policy {
              type leafref {
                path "/ssl:ssl/ssl:ssl-policys/ssl:ssl-policy/ssl:policy-name";
              }
              description
                "Specify the name of an SSL policy to bind an SSL policy to the IPv6 gRPC server.";
            }
    
            leaf ssl-policy-peer {
              type boolean;
              default "false";
              description
                "Enable/disable SSL two-way authentication.";
            }
          }  // container service-ipv6
    
          container client {
            description
              "Configure the gRPC client.";
            leaf ssl-policy {
              type leafref {
                path "/ssl:ssl/ssl:ssl-policys/ssl:ssl-policy/ssl:policy-name";
              }
              description
                "Specify the name of an SSL policy to bind an SSL policy to the gRPC client.";
            }
    
            leaf dscp {
              type uint8 {
                range "0..63";
              }
              default "0";
              description
                "DSCP marking of packets generated by the telemetry subsystem on the network device.";
            }
    
            leaf ssl-verify-cn-name {
              when "../ssl-policy";
              type string {
                length "1..32";
              }
              status deprecated;
              description
                "Specify a CN name to set the value of the CN field in the SSL verification certificate. The ssl-verify-cn-name node is deprecated. You are advised to use the ssl-verify-san node in the client container.";
            }
    
            leaf ssl-policy-peer {
              type boolean;
              default "false";
              description
                "Enable/disable SSL two-way authentication.";
            }
    
            leaf ssl-verify-san {
              when "../ssl-policy";
              type string {
                length "1..255";
              }
              description
                "Specify a SAN to set the value of the SAN field in the SSL verification certificate.";
            }
          }  // container client
    
          container session-car {
            description
              "Configure the GRPC session car.";
            leaf enable {
              type boolean;
              default "true";
              description
                "Enable/disable session car.";
            }
    
            leaf cir-interval {
              type uint32 {
                range "1..1000000";
              }
              units "kbit/s";
              default "30";
              description
                "Specify the session car cir interval.";
            }
    
            leaf cbs-interval {
              type uint32 {
                range "1..1000000";
              }
              units "Byte";
              default "3750";
              description
                "Specify the session car cbs interval.";
            }
    
            leaf pir-interval {
              type uint32 {
                range "1..1000000";
              }
              units "kbit/s";
              default "300";
              description
                "Specify the session car pir interval.";
            }
    
            leaf pbs-interval {
              type uint32 {
                range "1..1000000";
              }
              units "Byte";
              default "37500";
              description
                "Specify the session car pbs interval.";
            }
          }  // container session-car
        }  // container grpc
      }  // module huawei-grpc
    

© 2023 YumaWorks, Inc. All rights reserved.