netconfcentral logo


  module yuma-time-filter {

    yang-version 1;


    prefix timefilter;

    import ietf-yang-types {
      prefix yang;
    import ietf-netconf-monitoring {
      prefix mon;
    import ietf-netconf {
      prefix nc;

    organization "Netconf Central";

      "Andy Bierman <>.";

      "Yuma <datastore> extension for optimizing datastore
       polling mechanisms by allowing the client to
       request datastore content only if it has been modified since
       a specified date and time.

       If the netconfd server advertises this module then
       the 'last-modified' XML attribute will be added
       to the <rpc-reply> element if there was no 'last-modified'
       attribute in the <rpc> element.  This is only done
       for the NETCONF <get> and <get-config> protocol operations.


       <rpc message-id='2' 
         <get />

       <rpc-reply message-id='2' 
         <data> ... </data>

     Copyright (c) 2011 - 2012 Andy Bierman 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 BSD 3-Clause License";

      "RFC 2616: Last-Modified and If-Modified-Since headers";

    revision "2012-11-15" {
        "Use import of ietf-netconf instead of yuma-netconf
           so the ietf-netconf module can be advertised in the
           hello and clients will know which version is used
           for imported data types.";

    revision "2011-08-13" {
      description "Initial version.";

    augment /mon:netconf-state/mon:datastores/mon:datastore {
      leaf last-modified {
        type yang:date-and-time;
          "The date and time when the server last detected
           that the datastore was changed, or last initialized
           if no changes have been made.  Note that state data
           is not included in a datastore, and modifications
           to state data do not affect this timestamp.";

    grouping if-modified-since-parm {
      leaf if-modified-since {
        type yang:date-and-time;
          "If this parameter is present, then the server will
           only process the retrieval request if the
           corresponding 'last-modified' timestamp is
           more recent than this timestamp. If so, then the
           retrieval request is processed as normal.
           If not, an empty <data> element will be returned.";
    }  // grouping if-modified-since-parm

    augment /nc:get-config/nc:input {
      uses if-modified-since-parm;

    augment /nc:get/nc:input {
      uses if-modified-since-parm;
  }  // module yuma-time-filter