module simple_yang_test {

    namespace "http://netconfcentral.org/ns/simple_yang_test";
    prefix "syt";

    revision 2011-11-21 {
        description "Initial revision.";
    }

    container protocol {
      choice name {
        case udp {
          leaf udp {
            type empty;
          }
        }
        case tcp {
          leaf tcp {
            type empty;
          }
        }
      }
   }

   container interface {
      leaf ifType {
         type enumeration {
            enum ethernet;
            enum atm;
         }
      }
      leaf ifMTU {
         type uint32;
      }
      must "ifType != 'ethernet' or " +
           "(ifType = 'ethernet' and ifMTU = 1500)" {
         error-message "An ethernet MTU must be 1500";
      }
      must "ifType != 'atm' or " +
           "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" {
         error-message "An atm MTU must be between 64 and 17966";
      }
   }
}
