Hi I have a question about the usage of if-feature.  Assume the following
YANG module:

 

module performance-management {

  namespace "http://www.example.com/performance-management";;  

  prefix if-pm;

  

  import ietf-interfaces {

    prefix if;

  }

  

  feature performance-24hr {

    description

      "Indicates that collection of 24 hour performance intervals

       is supported";

  }

 

  augment "/if:interfaces-state/if:interface" {

    description 

      "Data nodes for the performance status parameters";

      

    container performance {

      description

        "Performance parameters";

 

      container intervals-24hr {

        if-feature performance-24hr;

        description

          "24 hour interval performance history";

 

        container current {

          description 

            "Contains the counts that are currently accumulating.";

        }

 

        list history {

          key interval-number;

          max-elements 7;

          description 

            "A history of 24 hour intervals.";

 

          leaf interval-number {

            type uint16;

            description 

              "The number of the interval relative to the current

               interval.";

          }

        }

      }

    }

  }

}

 

Another YANG module augments the container which is defined under a feature.

 

module use-performance-management {

  yang-version 1.1;

  namespace "http://www.example.com/use-performance-management";;

  prefix use-pm;

 

  import ietf-interfaces {

    prefix if;

  }

 

  import performance-management {

    prefix if-pm;

  }

 

  augment '/if:interfaces-state/if:interface/if-pm:performance/'

        + 'if-pm:intervals-24hr/if-pm:current' {

    description

      "Augment the current 24 hour interface performance counts with

       Ethernet specific attributes.";

 

    container ethernet {

      description

        "Current 24 hour Ethernet performance counters.";

      leaf some-value {

        type uint32;

      }

    }

  }

}

 

According to me an if-feature statement is missing here: how can a module
augment a container defined under the 'restriction" of a feature.  If the
feature is not supported then the container is not there and hence one can't
augment that container in another YANG module.  Is my understanding correct?


 

 

Best regards - Vriendelijke groeten,

Bart Bogaert

Broadband-Access System Architect Data

Contact number +32 3 2408310 (+32 477 673952)

 

NOKIA

Copernicuslaan 50, 2018 Antwerp, Belgium
Fortis 220-0002334-42
VAT BE 0404 621 642 Register of Legal Entities Antwerp



<<
This message (including any attachments) contains confidential information
intended for a specific individual and purpose, and is protected by law. If
you are not the intended recipient, you should delete this message. Any
disclosure, copying, or distribution of this message, or the taking of any
action based on it, is strictly prohibited without the prior consent of its
author.
>> 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to