09-20-2017 04:21 AM - edited 03-01-2019 03:59 AM
Hi Experts
I am seeking your guidance on how can we achieve/resolve the below points regarding some pre checks
1. Combining “tailf:link” with “must” condition
For the leaves like “vpn_id, route_target”, we need to validate that the value on both PE routers are identical so we used “tailf:link”, and at the same time validate using “must” that the values are unique within the different containers in the same instance and also for different instances of the service model.
The problem is that we cannot combine both “tailf:link” and “must” condition under the same leaf.
What would be the correct way to achieve this ?
2. Physical interfaces device validation
For physical interfaces like GigabitEthernet, we use a “must” condition to validate that the interface selected is not used in different portions of the same instance or in different instances of the service model, not to overwrite the interface configuration.
The challenge here is that there will be other interfaces on the PE routers that has running services other than the Media GateWay and we need to find a proper logic to validate that the selected interfaces are free/unused interfaces on the actual device not the service models.
Either ways, determining the free physical interface will remain a task that the customer will do beforehand similar to assigning IP Addresses and VLANs, and this validation will be a secondary failsafe if the customer mistakenly chose a wrong interface.
3. Validation with an empty leaf
Each Media GateWay is provisioned on two PE routers, however the customer might decide that he will provision on one PE only.
The leaves like “vpn_id, route_target”, are validated with a “must” condition to match on both PE routers, this validation fails if one of leaves is empty on the second device.
However if we changed the logic of the “must” condition to “must not” it works and doesn’t fail, the question here is this how its supposed to work or there is a better way to achieve this ?
The NSO version we are currently using is 4.4.3.1 and IOS-XR NED version is 6.2.3
Thanks,
09-20-2017 06:15 PM
Hi,
Just a thought, if the checks are getting too sophisticated to model in YANG, another option to consider is to perform them within the service-logic/service-callback[s]. This gives the options of using Java/Python and then one can structure these checks across multiple routines which may provide structure and improve readability.
Thanks.
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