mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
Navigating interfaces now work, and the tree follows the accordion style like the rest of the UI. Also, some updates to the curated pages: online help, lists of leafrefs instead of hard-coded list options. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
82 lines
1.8 KiB
YANG
82 lines
1.8 KiB
YANG
module deviate {
|
|
prefix "d";
|
|
namespace "urn:d";
|
|
|
|
typedef derived-string {
|
|
type string;
|
|
default "barnacles";
|
|
}
|
|
|
|
grouping substmts {
|
|
leaf config { type string; }
|
|
leaf default { type string; }
|
|
leaf default-typedef { type derived-string; }
|
|
leaf-list default-list { type string; default "foo"; default "bar"; }
|
|
leaf-list default-list-typedef-default { type derived-string; }
|
|
leaf mandatory { type string; }
|
|
leaf-list max-elements { type string; }
|
|
leaf-list min-elements { type string; }
|
|
leaf-list max-and-min-elements { type string; }
|
|
leaf type { type string; }
|
|
// TODO(robjs): unique requires a list target
|
|
leaf units { type uint16; }
|
|
}
|
|
|
|
container target {
|
|
container add {
|
|
uses substmts;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/config {
|
|
deviate add {
|
|
config false;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/default {
|
|
deviate add {
|
|
default "a default value";
|
|
}
|
|
}
|
|
|
|
deviation /target/add/default-list {
|
|
deviate add {
|
|
default "foo";
|
|
// TODO(wenovus): support multiple default statements for deviate.
|
|
//default "baz";
|
|
}
|
|
}
|
|
|
|
deviation /target/add/mandatory {
|
|
deviate add {
|
|
mandatory true;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/min-elements {
|
|
deviate add {
|
|
min-elements 42;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/max-elements {
|
|
deviate add {
|
|
max-elements 42;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/max-and-min-elements {
|
|
deviate add {
|
|
max-elements 42;
|
|
min-elements 42;
|
|
}
|
|
}
|
|
|
|
deviation /target/add/units {
|
|
deviate add {
|
|
units "fish per second";
|
|
}
|
|
}
|
|
}
|