Skip to content
Snippets Groups Projects
Commit ef8ff597 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Consolidate documentation examples.

parent 869ba26b
No related branches found
No related tags found
No related merge requests found
......@@ -2,5 +2,7 @@
*.dsdl
*.rng
*.rnc
*.xml
*.xsl
*.yin
model.tree
<?xml version="1.0" encoding="utf-8"?>
<module name="example-1"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ex1="http://example.com/example-1">
<yang-version value="1.1"/>
<namespace uri="http://example.com/example-1"/>
<prefix value="ex1"/>
<leaf name="greeting">
<type name="string"/>
<default value="Hello, world!"/>
</leaf>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<greeting xmlns="http://example.com/example-1">Hi!</greeting>
</data>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>http://example.com/example-1?module=example-1&amp;features=</capability>
</capabilities>
</hello>
<?xml version="1.0" encoding="utf-8"?>
<module name="example-2"
xmlns="urn:ietf:params:xml:ns:yang:yin:1"
xmlns:ex2="http://example.com/example-2">
<yang-version value="1.1"/>
<namespace uri="http://example.com/example-2"/>
<prefix value="ex2"/>
<container name="top">
<leaf-list name="foo">
<type name="uint8"/>
</leaf-list>
<leaf name="bar">
<type name="boolean"/>
</leaf>
</container>
</module>
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<top xmlns="http://example.com/example-2">
<foo>1</foo>
<foo>2</foo>
<bar>true</bar>
</top>
</data>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>http://example.com/example-2?module=example-2&amp;features=</capability>
</capabilities>
</hello>
module example-3-a {
yang-version "1.1";
namespace "http://example.com/example-3/a";
prefix "ex3a";
include example-3-suba {
revision-date 2016-07-21;
}
revision 2016-06-18;
feature fea1;
feature fea2;
identity idX;
container top {
leaf foo {
if-feature "fea1";
type empty;
}
}
}
module example-3-b {
yang-version "1.1";
namespace "http://example.com/example-3/b";
prefix "ex3b";
import ietf-inet-types {
prefix "oin";
revision-date 2010-09-24;
}
import example-3-a {
prefix "ex3a";
}
revision 2016-08-22;
identity idY;
identity idZ {
base ex3a:idX;
base idY;
}
augment "/ex3a:top" {
if-feature "ex3a:fea1 or ex3a:fea2";
leaf baz {
type oin:port-number;
}
}
}
submodule example-3-suba {
yang-version "1.1";
belongs-to example-3-a {
prefix "ex3a";
}
import ietf-inet-types {
prefix "inet";
revision-date 2013-07-15;
}
revision 2016-07-21;
augment "/ex3a:top" {
leaf bar {
if-feature "fea2";
type inet:ipv4-address-no-zone;
}
}
}
{
"ietf-yang-library:modules-state": {
"module-set-id": "1c663505cbf729d39312b8234c81462614aae0c6",
"module": [
{
"name": "example-3-a",
"feature": [
"fea1",
"fea2"
],
"namespace": "http://example.com/example-3/a",
"revision": "2016-06-18",
"conformance-type": "implement",
"submodule": [
{
"name": "example-3-suba",
"revision": "2016-07-21"
}
]
},
{
"name": "example-3-b",
"namespace": "http://example.com/example-3/b",
"revision": "2016-08-22",
"conformance-type": "implement"
},
{
"name": "ietf-inet-types",
"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types",
"revision": "2010-09-24",
"conformance-type": "import"
},
{
"name": "ietf-inet-types",
"namespace": "urn:ietf:params:xml:ns:yang:ietf-inet-types",
"revision": "2013-07-15",
"conformance-type": "implement"
}
]
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment