module mod5 {
prefix abc;
namespace "urn:cesnet:mod5";
container ccc {
list ll1 {
description "test";
reference "test";
status current;
key key;
leaf key {
type string;
}
leaf name {
type string {
pattern '[a-z]+';
}
}
when "../keys";
}
leaf keys {
type boolean;
}
}
container state-data {
list ll1 {
description "test";
reference "test";
status current;
config false;
// missing key - OK, because ll1 represents state data
leaf key {
type string;
}
leaf name {
type string {
pattern '[a-z]+';
}
}
when "../key";
}
leaf key {
type boolean;
}
}
container cont {
grouping name {
leaf name {
type string {
pattern '[a-z]+';
length "1..255";
}
}
container presence {
presence "enable";
}
}
list ll1 {
description "test";
reference "test";
status current;
key key;
leaf key {
type string;
}
uses name;
list ll2 {
key "login";
uses login;
}
}
leaf key {
type boolean;
}
}
grouping login {
leaf login {
type string;
}
leaf password {
type string {
length "8..64";
}
}
}
list mandatory {
key "mand default normal";
leaf mand {
type uint8;
mandatory true;
description "mandatory leaf";
}
leaf default {
type string;
default "default";
}
leaf normal {
type boolean;
}
leaf k {
type empty;
description "this leaf can be empty";
}
leaf str {
type string;
}
}
}