module mod4 {
prefix abc;
namespace "urn:cesnet:mod4";
grouping global {
container ssh {
presence "enable";
}
}
notification notif1 {
reference "test";
typedef my1 {
type string {
pattern '[a-zA-Z0-9]+';
length "4..255";
}
default "my123";
}
grouping gr {
leaf user { type my1; }
leaf time { type t_time; }
}
typedef t_time {
type string {
pattern '[0-9]+\-[0-9]+\-[0-9]+';
length 10;
}
}
uses gr;
}
notification notif2 {
if-feature f2;
container config {
config false; // ignore config
container presence {
presence "enable";
leaf conf {
type string;
config true; // ignore config
}
}
}
}
notification notif3 {
leaf mand {
type uint8;
mandatory true;
}
container cont {
leaf mandatory {
type string;
mandatory true;
}
}
list list {
key keys;
leaf keys { type int32; }
leaf mand {
type boolean;
mandatory true;
}
}
}
notification notif4 {
choice ch1 {
default number;
case ca {
leaf string { type string; }
}
leaf number {
type uint8;
default 42;
}
}
}
notification notif5 {
anyxml any {
mandatory true;
description test;
}
choice ch1 {
mandatory true;
case ca {
container ssh {
presence "enable";
}
}
leaf-list ll {
type string;
min-elements 1;
}
}
}
feature f2;
feature f3;
notification notif6 {
if-feature f2;
leaf-list ll {
min-elements 1;
type int32;
description "ll first";
}
leaf-list ssh {
type string;
description "ll second";
}
anyxml any;
if-feature f3;
}
notification notif7 {
uses global {
when "cont/top = 'false'";
}
container cont {
presence "enable";
leaf top {
type boolean;
}
}
leaf leaf {
type string;
when '../cont';
}
}
notification notif8 {
leaf-list llist {
type string;
min-elements 2;
}
leaf top {
type empty;
}
}
}