06-14-2017 06:17 AM - edited 03-01-2019 03:52 AM
Hi,
I am looking for examples how to devide a NSO Service-model (YANG + XML) into several small servicees which can be reused in other services.
Thx
Dirk
Solved! Go to Solution.
06-14-2017 01:41 PM
Some pseudo YANG/templates below.
The top service would create instances of the lower services (bottom-1 and bottom-2), the bottom services are usually "normal" services, i.e. writing config to a device (but they can invoke more stacked services as well).
Hope it makes sense.
list top {
ncs:servicepoint top;
leaf device {}
leaf a {}
leaf b {}
}
top-template.xml:
<config-template xmlns="http://tail-f.com/ns/config/1.0"
servicepoint="top">
<bottom-1>
<name>XXX</name>
<device>{/device}</device>
<bottom-a>{/a}</bottom-a>
</bottom-1>
<bottom-2>
<name>XXX</name>
<device>{/device}</device>
<bottom-b>{/b}</bottom-b>
</bottom-2>
</config-template>
list bottom-1 {
ncs:servicepoint bottom-1;
leaf device {}
leaf bottom-a {}
}
list bottom-1 {
ncs:servicepoint bottom-1;
leaf device {}
leaf bottom-b {}
}
06-14-2017 01:41 PM
Some pseudo YANG/templates below.
The top service would create instances of the lower services (bottom-1 and bottom-2), the bottom services are usually "normal" services, i.e. writing config to a device (but they can invoke more stacked services as well).
Hope it makes sense.
list top {
ncs:servicepoint top;
leaf device {}
leaf a {}
leaf b {}
}
top-template.xml:
<config-template xmlns="http://tail-f.com/ns/config/1.0"
servicepoint="top">
<bottom-1>
<name>XXX</name>
<device>{/device}</device>
<bottom-a>{/a}</bottom-a>
</bottom-1>
<bottom-2>
<name>XXX</name>
<device>{/device}</device>
<bottom-b>{/b}</bottom-b>
</bottom-2>
</config-template>
list bottom-1 {
ncs:servicepoint bottom-1;
leaf device {}
leaf bottom-a {}
}
list bottom-1 {
ncs:servicepoint bottom-1;
leaf device {}
leaf bottom-b {}
}
01-11-2018 04:19 AM
Shouldn't that be
...
list bottom-1 {
ncs:servicepoint bottom-1;
leaf device {}
leaf bottom-a {}
}
list bottom-2 {
ncs:servicepoint bottom-2;
leaf device {}
leaf bottom-b {}
}
Regards
Lothar
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide