Subject: [netmod] conformance-stmt (netconf RPC example)

From: Andy Bierman <[email-masked]>
Date: Thu, 01 May 2008 22:35:56 -0700

Hi,

A little more detail:

   - multiple when-capability statements are ANDed together

 From netconf.yang:

    rpc commit {
       description
         "Only available if 'candidate' capability is supported.

          When a candidate configuration's content is complete, the
          configuration data can be committed, publishing the data set to
          the rest of the device and requesting the device to conform to
          the behavior described in the new configuration.

          To commit the candidate configuration as the device's new
          current configuration, use the <commit> operation.

          The 'commit' operation instructs the device to implement the
          configuration data contained in the candidate configuration.
          If the device is unable to commit all of the changes in the
          candidate configuration datastore, then the running
          configuration MUST remain unchanged.  If the device does
          succeed in committing, the running configuration MUST be
          updated with the contents of the candidate configuration.

          If the system does not have the :candidate capability, the
          'commit' operation is not available.";

       reference "RFC 4741, section 8.3.4.1";

       ncx:rpc-type "config";

       input {
         leaf confirmed {
           description
             "Request a confirmed commit.  Only available if
              'confirmed-commit' capability is supported.";
           reference "RFC 4741, section 8.4.5.1";
           type empty;
         }

         leaf confirm-timeout {
           description
             "Request a specific timeout period for a confirmed commit
              if 'confirmed-commit' capability supported.";
           reference "RFC 4741, section 8.4.5.1";
           type ConfirmTimeoutType;
         }
       }
    }

    conformance "2006-12-01" {

       ...

       requires "/commit" {
           // special-case: RPC allowed without any parameters
          when-capability "nc:candidate";
       }

       requires "/commit/input/confirmed" {
          when-capability "nc:candidate";
          when-capability "nc:confirmed-commit";
       }

       requires "/commit/input/confirm-timeout" {
          when-capability "nc:candidate";
          when-capability "nc:confirmed-commit";
       }
     }

Andy

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