Hi,

I don't know if getting rid of /foo-state is such a great idea,
especially wrt/ counters and other objects that are not
related to intended config vs. applied config.

Q1) how does a client know the difference between an auto-generated
foo-state.yang and a real foo-state.yang?  Seem like a YANG extension
is needed to flag an auto-generated foo-state.yang

Q2) How does XPath reference an operational node if the /foo-state
subtree has been moved to the /foo config subtree?

module foo {

     container foo {
          leaf stat-collect-type {
             type enumeration {
               enum stat-set1;
               enum stat-set2;
             }
           }
      }

     container foo-state {
          config false;
          leaf stat-collect-type {
             type enumeration {
               enum stat-set1;
               enum stat-set2;
             }
           }
           container stat-set1 {
              when "../stat-collect-type = 'stat-set1'";
              ...
           }
           container stat-set2 {
              when "../stat-collect-type = 'stat-set2'";
              ...
           }
     }
}

In this example, there is a request stat collect type /foo/stat-collect-type
and there is an operational value (what the server/device is capable
of collecting -- e.g. client requests stat-set2 knowing the server
will change it to stat-set1 if set2 not supported)

So if /foo-state is folded into /foo (because that is the intent -- to get
rid of this extra stat-collect-type leaf), then how do the when-stmts
get applied to the operational value instead of the configured value?
The same issue applies if the when-stmts are within an augment-stmt

WANT:

 augment /foo-state {
    when "stat-collect-type = 'stat-set1'";
    container stat-set1 {
       ...
    }
 }

RD Provides:

  augment /foo {
    when "stat-collect-type = 'stat-set1'";
    container stat-set1 {
       config false;
       ...
    }
 }

There is no way to use when-stmt to reference the operational value.
This is a rather common usage of the when-stmt, so it should not
be removed if RD is used.



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

Reply via email to