47 lines
1,011 B
YANG
47 lines
1,011 B
YANG
module example {
|
|
prefix ex;
|
|
import ietf-interfaces {
|
|
prefix if;
|
|
}
|
|
import ietf-ip {
|
|
prefix ip;
|
|
}
|
|
import ietf-routing {
|
|
prefix rt;
|
|
}
|
|
import iana-if-type {
|
|
prefix ianaift;
|
|
}
|
|
description
|
|
"Example code that includes ietf-ip and ietf-routing";
|
|
/* Example interface type for tests, local callbacks, etc */
|
|
identity eth {
|
|
base if:interface-type;
|
|
}
|
|
identity loopback {
|
|
base if:interface-type;
|
|
}
|
|
/* Translation function example - See also example_cli */
|
|
|
|
list translate{
|
|
leaf value{
|
|
type string;
|
|
}
|
|
}
|
|
rpc client-rpc {
|
|
description "Example local client-side RPC that is processed by the
|
|
the netconf/restconf and not sent to the backend.
|
|
This is a clixon implementation detail: some rpc:s
|
|
are better processed by the client for API or perf reasons";
|
|
input {
|
|
leaf request {
|
|
type string;
|
|
}
|
|
}
|
|
output {
|
|
leaf result{
|
|
type string;
|
|
}
|
|
}
|
|
}
|
|
}
|