Blob Blame History Raw
module features {
  yang-version 1.1;
  namespace "urn:features";
  prefix f;

  feature a;
  feature aa {
    if-feature a;
  }
  feature b;

  grouping grp {
    leaf grp {
      type string;
    }
  }

  uses grp {
    if-feature a;
  }

  container cont {
    presence "";
    if-feature a;
  }

  leaf lf {
    type string;
    if-feature "a and b";
  }

  leaf-list ll {
    type string;
    if-feature "a or b";
  }

  list lst {
    key id;
    if-feature "not a";
    
    leaf id { type string; }
  }

  choice ch {
    if-feature "not (a and b)";
    case ch1 {
      if-feature a;
      leaf ch1 { type string; }
    }
    case ch2 {
      if-feature b;
      leaf ch2 { type string; }
    }
    case ch3 {
      leaf ch3 { type string; }
    }
  }

  anyxml axml {
    if-feature "not (a or b)";
  }
  
  rpc rpc1 {
    if-feature aa;
  }

  notification notif1 {
    if-feature aa;
  }

  augment "/f:cont" {
    if-feature aa;
    leaf aug { type string; }
  }
}