://localhost/streams).
* Example: new stream "foo" will get access URL: https://localhost/streams/\
foo
* Optional pub/sub support enabled by ./configure --enable-publish
* Set publish URL base with: CLICON_STREAM_PUB_PREFIX (default http://local\
host/pub)
* Example: new stream "foo" will get pub URL: https://localhost/pub/foo
73 lines
1.8 KiB
YANG
73 lines
1.8 KiB
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;
|
|
}
|
|
}
|
|
/* State data (not config) for the example application*/
|
|
container state {
|
|
config false;
|
|
description "state data for the example application (must be here for example get operation)";
|
|
leaf-list op {
|
|
type string;
|
|
}
|
|
}
|
|
/* Example notification as used in RFC 5277 and RFC 8040 */
|
|
notification event {
|
|
description "Example notification event.";
|
|
leaf event-class {
|
|
type string;
|
|
description "Event class identifier.";
|
|
}
|
|
container reportingEntity {
|
|
description "Event specific information.";
|
|
leaf card {
|
|
type string;
|
|
description "Line card identifier.";
|
|
}
|
|
}
|
|
leaf severity {
|
|
type string;
|
|
description "Event severity description.";
|
|
}
|
|
}
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|