netconfcentral logo

ietf-address-pool@2015-10-14



  module ietf-address-pool {

    yang-version 1;

    namespace
      "urn:ietf:params:xml:ns:yang:ietf-address-pool";

    prefix address-pool;

    import ietf-inet-types {
      prefix inet;
    }
    import ietf-yang-types {
      prefix yang;
    }

    organization
      "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

    contact
      "WG Web:   <http://tools.ietf.org/wg/netmod/>
    WG List:  <mailto:netmod@ietf.org>

    WG Chair: Thomas Nadeau
    <mailto:tnadeau@lucidvision.com>

    WG Chair: Juergen Schoenwaelder
    <mailto:j.schoenwaelder@jacobs-university.de>

    Editor:   Qiong Sun
                         <mailto:sunqiong@ctbri.com.cn>

    Editor:   Tao Peng
                         <mailto:dr.pengtao@huawei.com>;

    Contributor:   Will(Shucheng) Liu
                         <mailto:liushucheng@huawei.com>";

    description
      "This module contains a collection of YANG definitions for
        configuring IP address pools.

        Copyright (c) 2015 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 Simplified BSD License
        set forth in Section 4.c of the IETF Trust's Legal Provisions
        Relating to IETF Documents
        (http://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 7277; see
        the RFC itself for full legal notices.";

    revision "2015-10-14" {
      description "Initial revision.";
      reference
        "RFC 7277: A YANG Data Model for IP Management";

    }


    typedef percent {
      type uint8 {
        range "0 .. 100";
      }
      description "Percentage";
    }

    typedef address-pool-type {
      type enumeration {
        enum "usergateway" {
          value 0;
          description
            "The address pool has a usergateway.";
        }
        enum "import-route" {
          value 1;
          description
            "The address pool need to import a route
                 to external network.";
        }
      }
      description "Address pool type.";
    }

    typedef instance-type {
      type enumeration {
        enum "pppoe" {
          value 0;
          description
            "The address pool is used for pppoe access.";
        }
        enum "dhcp" {
          value 1;
          description
            "The address pool is used for dhcp access.";
        }
        enum "vpn" {
          value 2;
          description
            "The address pool is used for vpn access.";
        }
        enum "ds-lite" {
          value 3;
          description
            "The address pool is used for ds-lite access.";
        }
        enum "lw4over6" {
          value 4;
          description
            "The address pool is used for lw4over6 access.";
        }
        enum "map" {
          value 5;
          description
            "The address pool is used for map access.";
        }
        enum "cgn" {
          value 6;
          description
            "The address pool is used for cgn access.";
        }
        enum "xlat" {
          value 7;
          description
            "The address pool is used for xlat access.";
        }
        enum "other" {
          value 8;
          description
            "The address pool is used for others.";
        }
      }
      description "Instance type.";
    }

    container address-pools {
      description
        "This is a top level container for Address Pools.
          It can have one or more Address Pools. The pools may
          not be contiguous.";
      list address-pool {
        key "address-pool-name";
        description
          "An Address Pool is an ordered list of
            Address Pool Entries (APE). Each Access Pool Entry has a
            list of address ranges and its associated lifetime.";
        leaf address-pool-name {
          type string;
          description
            "The name of address pool";
        }

        leaf address-pool-id {
          type uint32;
          default "0";
          description "The Address Pool id";
        }

        leaf domain-name {
          type string;
          description "The domain name";
        }

        leaf device-id {
          type string;
          description
            "The identifier of device that using address pool";
        }

        list address-pool-service {
          key "service-name";
          description
            "The services that can use these pool.";
          leaf service-name {
            type string;
            description
              "A service name: e.g., any, voip, iptv, internet, etc.";
          }
        }  // list address-pool-service

        container address-pool-entries {
          description
            "The address-pool-entries container contains
              a list of address-ranges and associated attributes.";
          list ipv4-address-range {
            key "ipv4-address-range-name";
            description
              "IPv4 Address range.";
            leaf ipv4-address-range-name {
              type string;
              description
                "The name of IPv4 address range.";
            }

            leaf ip-lower-address {
              type inet:ipv4-address-no-zone;
              description
                "The lower IPv4 address of the address range.";
            }

            leaf ip-upper-address {
              type inet:ipv4-address-no-zone;
              description
                "The upper IPv4 address of the address range.";
            }

            leaf usergateway {
              type inet:ipv4-address-no-zone;
              description
                "It only exists when address pool are used for
                          user addressing.";
            }

            leaf gwnetmask {
              type yang:dotted-quad;
              description
                "The netmask for usergateway.";
            }

            leaf type {
              type address-pool-type;
              description
                "The type of the address pool.";
            }

            leaf lifetime {
              type yang:date-and-time;
              description
                "The lifetime for the address pool. '0' means
              withdrawal.";
            }

            leaf instance {
              type instance-type;
              description
                "The instance of the address pool.";
            }
          }  // list ipv4-address-range

          leaf warning-threshold-v4 {
            type percent;
            description
              "The threshold of the ipv4 address pool.";
          }

          list ipv6-prefix {
            key "ipv6-prefix-name";
            description "IPv6 prefix.";
            leaf ipv6-prefix-name {
              type string;
              description
                "The name of IPv6 prefix.";
            }

            leaf ipv6-prefix {
              type inet:ipv6-prefix;
              description "The IPv6 prefix.";
            }

            leaf usergateway {
              type inet:ipv6-address-no-zone;
              description
                "It only exists when address pool are used for
                          user addressing.";
            }

            leaf type {
              type address-pool-type;
              description
                "The type of the address pool.";
            }

            leaf lifetime {
              type yang:date-and-time;
              description
                "The lifetime for the address pool. '0' means
              withdrawal.";
            }

            leaf instance {
              type instance-type;
              description
                "The instance of the address pool.";
            }
          }  // list ipv6-prefix

          leaf warning-threshold-v6 {
            type percent;
            description
              "The threshold of the ipv6 address pool.";
          }
        }  // container address-pool-entries
      }  // list address-pool
    }  // container address-pools

    container address-pool-status {
      config false;
      description
        "This is a top level container for Address Pool Status,
          which contains the status of address pool usage.";
      list address-pool {
        key "address-pool-name";
        description
          "An Address Pool is an ordered list of
            Address Pool Entries (APE). Each Access Pool Entry has a
            list of address ranges and its associated lifetime. ";
        leaf address-pool-name {
          type string;
          description
            "The name of address pool";
        }

        list address-pool-service {
          key "service-name";
          description
            "The services that can use these pool.";
          leaf service-name {
            type string;
            description
              "A service name: e.g., any, voip, iptv, internet, etc.";
          }
        }  // list address-pool-service

        leaf status {
          type enumeration {
            enum "active" {
              value 0;
              description
                "The address pool is in active status.";
            }
            enum "idle" {
              value 1;
              description
                "The address pool is in idle status.";
            }
          }
          description
            "The status of address pool";
        }

        container address-pool-entries {
          description
            "The address-pool-entries container contains
                  a list of address-ranges and associated attributes.";
          list ipv4-address-range {
            key "ipv4-address-range-name";
            description
              "IPv4 Address range.";
            leaf ipv4-address-range-name {
              type string;
              description
                "The name of IPv4 address range.";
            }

            leaf peak-address-usage-ratio {
              type percent;
              description
                "The peak usage rate of the address range.";
            }

            leaf average-address-usage-ratio {
              type percent;
              description
                "The average usage rate of the address range.";
            }
          }  // list ipv4-address-range

          list ipv6-prefix {
            key "ipv6-prefix-name";
            description "IPv6 prefix.";
            leaf ipv6-prefix-name {
              type string;
              description
                "The name of IPv6 prefix.";
            }

            leaf peak-prefix-usage-ratio {
              type percent;
              description
                "The peak usage rate of the prefix.";
            }

            leaf average-prefix-usage-ratio {
              type percent;
              description
                "The average usage rate of the prefix.";
            }
          }  // list ipv6-prefix

          list port-range {
            key "port-range-name";
            description "port range.";
            leaf port-range-name {
              type string;
              description
                "The name of port range.";
            }

            leaf peak-address-usage-ratio {
              type percent;
              description
                "The peak usage rate of the port range.";
            }

            leaf average-address-usage-ratio {
              type percent;
              description
                "The average usage rate of the port range.";
            }
          }  // list port-range
        }  // container address-pool-entries
      }  // list address-pool
    }  // container address-pool-status
  }  // module ietf-address-pool