example-dhcpv6-server-conf

This YANG module defines components for the configuration and management of vendor-/implementation-specific DHCPv6 server functi...

  • Version: 2022-06-20

    example-dhcpv6-server-conf@2022-06-20


    
      module example-dhcpv6-server-conf {
    
        yang-version 1.1;
    
        namespace
          "https://example.com/ns/"
            + "example-dhcpv6-server-conf";
    
        prefix dhc6-srv-conf;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-dhcpv6-server {
          prefix dhc6-srv;
        }
    
        organization
          "IETF Dynamic Host Configuration (DHC) Working Group";
    
        contact
          "WG Web:   <https://datatracker.ietf.org/wg/dhc/>
         WG List:  <mailto:dhcwg@ietf.org>
         Author:   Yong Cui <yong@csnet1.cs.tsinghua.edu.cn>
         Author:   Linhui Sun <lh.sunlinh@gmail.com>
         Editor:   Ian Farrer <ian.farrer@telekom.de>
         Author:   Sladjana Zeichlin <sladjana.zechlin@telekom.de>
         Author:   Zihao He <hezihao9512@gmail.com>
         Author:   Michal Nowikowski <godfryd@isc.org>";
    
        description
          "This YANG module defines components for the configuration and
         management of vendor-/implementation-specific DHCPv6 server
         functionality.  As this functionality varies greatly between
         different implementations, the module is provided as an example
         only.
    
         Copyright (c) 2022 IETF Trust and the persons identified as
         authors of the code.  All rights reserved.
    
         Redistribution and use in source and binary forms, with or
         without modification, is permitted pursuant to, and subject to
         the license terms contained in, the Revised BSD License set
         forth in Section 4.c of the IETF Trust's Legal Provisions
         Relating to IETF Documents
         (https://trustee.ietf.org/license-info).
    
         This version of this YANG module is part of RFC 9243
         (https://www.rfc-editor.org/info/rfc9243); see the RFC itself
         for full legal notices.";
    
        revision "2022-06-20" {
          description "Initial revision.";
          reference
            "RFC 9243: A YANG Data Model for DHCPv6 Configuration";
    
        }
    
    
        grouping config {
          description
            "Parameters necessary for the configuration of a DHCPv6
           server.";
          container serv-attributes {
            description
              "Contains basic attributes necessary for running a DHCPv6
             server.";
            leaf name {
              type string;
              description
                "Name of the DHCPv6 server.";
            }
    
            leaf description {
              type string;
              description
                "Description of the DHCPv6 server.";
            }
    
            leaf ipv6-listen-port {
              type uint16;
              default "547";
              description
                "UDP port that the server will listen on.";
            }
    
            choice listening-interfaces {
              default "all-interfaces";
              description
                "Configures which interface or addresses the server will
               listen for incoming messages on.";
              container all-interfaces {
                presence "true";
                description
                  "Configures the server to listen for incoming messages
                   on all IPv6 addresses (unicast and multicast) on all
                   of its network interfaces.";
              }  // container all-interfaces
              leaf-list interfaces {
                type if:interface-ref;
                description
                  "List of interfaces on which the server will listen
                   for incoming messages.  Messages addressed to any
                   valid IPv6 address (unicast and multicast) will be
                   received.";
              }
              leaf-list address-list {
                type inet:ipv6-address;
                description
                  "List of IPv6 address(es) on which the server will
                   listen for incoming DHCPv6 messages.";
              }
            }  // choice listening-interfaces
    
            leaf-list interfaces-config {
              type if:interface-ref;
              default
                "if:interfaces/if:interface/if:name";
              description
                "A leaf list of interfaces on which the server should
               listen.";
            }
    
            container lease-storage {
              description
                "Configures how the server will store leases.";
              choice storage-type {
                description
                  "The type of storage that will be used for lease
                 information.";
                case memfile {
                  description
                    "Configuration for storing leases information in a
                   Comma-Separated Value (CSV) file.";
                  leaf memfile-name {
                    type string;
                    description
                      "Specifies the absolute location of the lease file.
                     The format of the string follows the semantics of
                     the relevant operating system.";
                  }
    
                  leaf memfile-lfc-interval {
                    type uint64;
                    description
                      "Specifies the interval in seconds, at which the
                     server will perform a lease file cleanup (LFC).";
                  }
                }  // case memfile
    
                case mysql {
                  leaf mysql-name {
                    type string;
                    description
                      "Name of the MySQL database, running on the
                     localhost.";
                  }
    
                  leaf mysql-username {
                    type string;
                    description
                      "User name of the account under which the server
                     will access the database.";
                  }
    
                  leaf mysql-password {
                    type string;
                    description
                      "Password of the account under which the server
                     will access the database.";
                  }
    
                  leaf mysql-port {
                    type inet:port-number;
                    default "3306";
                    description
                      "If the database is located on a different system,
                     the port number may be specified.";
                  }
    
                  leaf mysql-lfc-interval {
                    type uint64;
                    description
                      "Specifies the interval in seconds, at which the
                     server will perform a lease file cleanup (LFC).";
                  }
    
                  leaf mysql-connect-timeout {
                    type uint64;
                    description
                      "Defines the timeout interval for connecting to the
                     database.  A longer interval can be specified if the
                     database is remote.";
                  }
                }  // case mysql
    
                case postgresql {
                  leaf postgresql-name {
                    type string;
                    description
                      "Name of the PostgreSQL database, running on the
                     localhost.";
                  }
    
                  leaf postgresql-username {
                    type string;
                    description
                      "User name of the account under which the server
                     will access the database.";
                  }
    
                  leaf postgresql-password {
                    type string;
                    description
                      "Password of the account under which the server
                     will access the database.";
                  }
    
                  leaf postgresql-port {
                    type inet:port-number;
                    default "5432";
                    description
                      "If the database is located on a different system,
                     the port number may be specified.";
                  }
    
                  leaf postgresql-lfc-interval {
                    type uint64;
                    description
                      "Specifies the interval in seconds, at which the
                     server will perform a lease file cleanup (LFC).";
                  }
    
                  leaf postgresql-connect-timeout {
                    type uint64;
                    description
                      "Defines the timeout interval for connecting to the
                     database.  A longer interval can be specified if the
                     database is remote.";
                  }
                }  // case postgresql
              }  // choice storage-type
            }  // container lease-storage
          }  // container serv-attributes
        }  // grouping config
    
        augment /dhc6-srv:dhcpv6-server/dhc6-srv:vendor-config {
          description
            "Augment the server-specific YANG module to the
           ietf-dhcpv6-server module.";
          uses config;
        }
      }  // module example-dhcpv6-server-conf
    

© 2023 YumaWorks, Inc. All rights reserved.