In advance I just want to explain that I'm NSO newbie, so please don't be offended by the meritoric quality of my questions.
I picked the L3VPN service case to present my questions as it should be good example of what I want to achieve.
I like the approach of stacked services so decided it should be nice to split whole L3 service configuration to smaller parts (which can be reused in other services). By doing that I encountered some obstacles and based on simplified example I'd like to get some more information how to proceed with it.
On attached draw there are three services: "L3VPN" (CFS, umbrella service), "GLOBAL_VRF_DEF" (RFS) and "BGP_VRF_DEF" (RFS).

Both RFS services are using some common pieces of information to configure device: vrf_name and vrf_address_families.
What I want to achieve is:
- based on CFS level defined parameters (vrf_name, vrf_address_families) they should be inherited by both RFS services
- Yang models of RFS services shouldn't(?) contain objects of above mentioned parameters at all (just the CFS Yang model) (or more precisely the user shouldn't be asked of such again)
So basically my question is how to pass parameters between services, are there some kind of constrains, what is the best approach, is it even possible at all or I'm missing the intention of NSO "logic" completely?
All of the above services are python-and-template based.
I'll appreciate any advice.
YANG models
L3VPN
-----
list L3VPN {
key name;
leaf name {
type string;
}
leaf device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
leaf vrf_name {
type string;
}
leaf vrf_afi {
type enumeration {
enum "ipv4";
enum "ipv6";
}
}
leaf vrf_safi {
type enumeration {
enum "unicast";
enum "multicast";
}
}
}
GLOBAL_VRF_DEF & BGP_VRF_DEF (common Yang model parts)
----------------------------
list GLOBAL_VRF_DEF {
key name;
leaf name {
type string;
}
// here object is leaf-list as this RFS service can be reused or executed as standalone to configure multiple devices at the same time
leaf-list device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
// what about the rest of the parameters (vrf_name, vrf_afi, vrf_safi?)
}
XML templates
L3VPN