Hi, Folks:
Choice case seems interchangeable with Container+when, here is the example of 
Choice case
     container system {
       description
         "Contains various system parameters.";
       choice services {
         description
           "Configure externally available services.";
         case ssh {
           description
             "SSH service-specific configuration.";
           // more leafs, containers, and stuff here...
         }
         case tls {
           description
             "TLS service-specific configuration.";
           // more leafs, containers, and stuff here...
         }
       }
     }
I think it can be replaced with container+when representation as follows:
    container system {
       description
         "Contains various system parameters.";
       container services {
         description
           "Configure externally available services.";
         leaf transport {
           enum ssh {
            description
             "ssh";
          }
           enum tls {
           description
            "tls";
          }
         }
         container "ssh" {
           when "../transport=ssh" {
            description
            "active only when the transport is ssh";
           }
           description
             "SSH service-specific configuration.";
           // more leafs, containers, and stuff here...
         }
         container "tls" {
           when "../transport=tls" {
            description
            "active only when the transport is tls";
           }
           description
             "TLS service-specific configuration.";
           // more leafs, containers, and stuff here...
         }
       }
     }
However I didn't see any guidance on when to use Choice case or when to use 
Container+when?
Any thought about this?

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

Reply via email to