dhcp-client-ext

This module is used to add dhcp client status in base yang. Copyright (c) 2016 Fujitsu Ltd. All rights reserved.

  • Version: 2016-04-05

    dhcp-client-ext@2016-04-05


    
      module dhcp-client-ext {
    
        yang-version 1;
    
        namespace
          "urn:fujitsu:params:xml:ns:dhcp-client-ext";
    
        prefix dhcp-ext;
    
        import ietf-inet-types {
          prefix inet;
        }
        import dhcp-client {
          prefix dhcp;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-ip {
          prefix ip;
        }
        import tailf-common {
          prefix tailf;
        }
        import fujitsu-system {
          prefix sys;
        }
        import ietf-yang-types {
          prefix yang;
          revision-date "2013-07-15";
        }
    
        organization "Fujitsu Ltd.";
    
        contact
          "Fujitsu Ltd.
    
    Address: 2801 Telecom Parkway
    Richardson, Texas 75082
    
    Tel: +1-800-USE-FTAC (1-800-873-3822)
    Email: ftac@fnc.fujitsu.com
    Web: www.fujitsu.com/us/services/telecom";
    
        description
          "This module is used to add dhcp client status in base yang.
    Copyright (c) 2016 Fujitsu Ltd.
    All rights reserved. ";
    
        revision "2016-04-05";
    
        augment /dhcp:clientv4 {
          container dhcpClientStatus {
            list client-if {
              tailf:callpoint "dhcp-client-oper";
              key "ifName";
              config false;
              leaf ifName {
                type string;
                description
                  "Interface name which has DHCP Address";
              }
    
              leaf clientIpAddr {
                type inet:ipv4-address;
                description
                  "Specify the IP address obtained from DHCP server on the interface";
              }
    
              leaf-list dnsServerIpAddr {
                type inet:ipv4-address;
                description
                  "Specify the DNS server IP address obtained from DHCP server on the interface";
              }
    
              leaf leaseTime {
                type yang:timeticks;
                mandatory true;
                description
                  "Lease time for DHCPv4 address";
              }
            }  // list client-if
          }  // container dhcpClientStatus
        }
    
        augment /dhcp:clientv4 {
          list client-if {
            key "ifName";
            description
              "A client may have several
    interfaces, it is more reasonable to
    configure and manage parameters on
    the interface-level. The list defines
    specific client interfaces and their
    data. Different interfaces are distinguished
    by the key which is a configurable string
    value.";
            leaf ifName {
              type string;
              must
                "(((re-match(., 'ip-.*(LCN2)') = 'true') and (/sys:system/sys:neMgmtMode = 'Router')) or (re-match(., 'ip-.*(LCN|LCN1)') = 'true'))" {
                error-message
                  "TYPE not supported (or) LCN2 is only allowed in Router mode.";
              }
              description
                "Specify the interface name that dhcp client configured on";
            }
    
            leaf enable {
              type boolean;
              must
                "(((current() = 'false') and  (((count (/if:interfaces/if:interface[if:name=current()/../ifName]/ip:ipv4/ip:address) > 0) and (/if:interfaces/if:interface[if:name=current()/../ifName]/ip:ipv4/ip:enabled = 'true'))))or (current() = 'true'))" {
                error-message
                  "No Static IPV4 address assigned/Enabled for this interface";
              }
              default "true";
              description
                "Enable or disable dhcp client function";
            }
          }  // list client-if
        }
      }  // module dhcp-client-ext
    

© 2023 YumaWorks, Inc. All rights reserved.